1. 程式人生 > >redis-4.0.11快速安裝__2018_lcf

redis-4.0.11快速安裝__2018_lcf

1. 下載安裝

# wget http://120.52.51.15/download.redis.io/releases/redis-4.0.11.tar.gz

# tar -xf redis-4.0.11.tar.gz

# cd redis-4.0.11

 # make install

2. 初始化指令碼安裝,並啟動服務 

]# ./install_server.sh 
Welcome to the redis service installer
This script will help you easily set up a running redis server

Please select the redis port for this instance: [6379] 
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf] 
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log] 
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379] /data/redis
Please select the redis executable path [/usr/local/bin/redis-server] /usr/local/redis/src/redis-server


Selected config:
Port           : 6379
Config file    : /etc/redis/6379.conf  //配置檔案路徑
Log file       : /var/log/redis_6379.log  //日誌路徑
Data dir       : /data/redis   // 資料存放路徑
Executable     : /usr/local/redis/src/redis-server   //這個是啟動指令碼的預設路徑
Cli Executable : /usr/local/bin/redis-cli  //其它功能指令碼路徑
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!

# chkconfig --add redis_6379  設定開機自啟

到這裡就安裝好了 ,可以通過service去控制。