當redis記憶體資料庫安裝完畢之後,需要對redis進行操作使用,可以通過cs客戶端,或者直接通過shell端進行連線redis然後對記憶體資料庫進行操作使用。
檢視服務是否自啟動
# tail -f /usr/local/redis/logs/redis.log
server started, redis version
3.0.3
使用自帶客戶端工具測試key-value訪問功能
# cd /usr/local/redis/bin
# ./redis-cli
127.0
.0.1:6379> keys *
(empty list or
set)
127.0
.0.1:6379> set test "hello world"
ok127.0
.0.1:6379> get test
"hello world"
關閉服務
# service redisd stop
stopping ...
redis stopped
啟動服務
# service redisd start
starting redis server...
shell簡單使用
按上和下可以遍歷最近輸入的命令 後進入增量模式 這個可以檢視之前的2000條歷史 vim bash history 先執行command1,不管command1是否出錯,接下來執行command2 command1 command2 只有當command1正確執行完畢後,才執行command2 co...
SQLite的shell簡單使用
解壓後得到 sqlite3.exe1 1 建立資料庫 c sqlite3 sqlite3.exe dbname.db 2 建立資料表 sqlite create table users userid varchar 20 primary key,age int,birthday datetime 3...
shell 陣列的簡單使用
ipts 16.0.0.1 16.0.0.2 16.0.0.3 使用 進行定義,裡面的元素都需要空格進行分割。root izbp1e44zna0rzyna76eszz lvhuiqi ipts 16.0.0.1 16.0.0.2 16.0.0.3 注意 如果直接獲取itps變數,只能獲取陣列中第乙個...