首页 > 代码库 > CentOS7.2 安装Redis3.2.8

CentOS7.2 安装Redis3.2.8

Redis3.2.8 下载

下载Redis3.2.8.tar.gz

将文件放置在usr/local/redis/中

解压文件

安装:

make && make install
[root@localhost redis-3.2.8]# make && make install

进入usr/local/redis/redis-3.2.8/utils文件夹

./install_server.sh

详情:

[root@localhost utils]# ./install_server.shWelcome to the redis service installerThis script will help you easily set up a running redis serverPlease select the redis port for this instance: [6379] Selecting default: 6379Please select the redis config file name [/etc/redis/6379.conf] Selected default - /etc/redis/6379.confPlease select the redis log file name [/var/log/redis_6379.log] Selected default - /var/log/redis_6379.logPlease select the data directory for this instance [/var/lib/redis/6379] Selected default - /var/lib/redis/6379Please select the redis executable path [/usr/local/bin/redis-server] Selected config:Port           : 6379Config file    : /etc/redis/6379.confLog file       : /var/log/redis_6379.logData dir       : /var/lib/redis/6379Executable     : /usr/local/bin/redis-serverCli Executable : /usr/local/bin/redis-cliIs this ok? Then press ENTER to go on or Ctrl-C to abort.Copied /tmp/6379.conf => /etc/init.d/redis_6379Installing service...Successfully added to chkconfig!Successfully added to runlevels 345!Starting Redis server...Installation successful!

从上面可以看出redis的配置文件路径。

启动服务:

systemctl start redis_6379systemctl status redis_6379

详情:

[root@localhost ~]# systemctl start redis_6379[root@localhost ~]# systemctl status redis_6379● redis_6379.service - LSB: start and stop redis_6379   Loaded: loaded (/etc/rc.d/init.d/redis_6379; bad; vendor preset: disabled)   Active: active (exited) since 六 2017-04-08 23:03:01 CST; 9s ago     Docs: man:systemd-sysv-generator(8)  Process: 10566 ExecStart=/etc/rc.d/init.d/redis_6379 start (code=exited, status=0/SUCCESS)4月 08 23:03:01 localhost.localdomain systemd[1]: Starting LSB: start and stop red....4月 08 23:03:01 localhost.localdomain redis_6379[10566]: /var/run/redis_6379.pid ex...4月 08 23:03:01 localhost.localdomain systemd[1]: Started LSB: start and stop redi....Hint: Some lines were ellipsized, use -l to show in full.

 

修改6379.conf

修改 bind 127.0.0.1 为 bind 0.0.0.0

 

http://www.cnblogs.com/cndavidwang/p/6429406.html

CentOS7.2 安装Redis3.2.8