CentOS下,yum安装redis

一,准备篇
1,配置网络&关闭SELINUX&配置防火墙

配置网络&关闭SELINUX&配置防火墙

二,安装篇
1,yum安装
yum -y install redis
2,启动redis服务器
CentOS 6
service redis start
chkconfig redis on
CentOS 7
systemctl start redis.service
systemctl enable redis.service
3,状态管理命令
CentOS 6
/etc/rc.d/init.d/redis
service redis start
service redis stop
service redis status
service redis restart
service redis condrestart
service redis try-restart
chkconfig redis  on                       #启用开机自启
chkconfig redis  off                      #禁用开机自启
CentOS 7
/usr/lib/systemd/system/redis.service
systemctl start redis.service       
systemctl stop redis.service           
systemctl restart redis.service        
systemctl status redis.service          
systemctl enable redis.service             #启用开机自启
systemctl disable redis.service            #禁用开机自启
4,相关软件目录及文件位置
/usr/bin/redis-server
/etc/redis.conf
/var/run/redis/redis.pid
三,优化篇

暂无

你可能感兴趣的:(CentOS下,yum安装redis)