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去控制。

猜你喜欢

转载自blog.csdn.net/cbuy888/article/details/85224554
今日推荐