大数据 爬虫Python AI Sql

centos7 源码编译安装redis 5.0

2019-12-04  本文已影响0人  热血大桃子

redis 5.0 安装方法

tar -zxvf redis-5.0.7.tar.gz
cd redis-5.0.5/
make && make install PREFIX=/usr/local/redis
bind 0.0.0.0
protected-mode no
port 6379
daemonize yes
requirepass 123456
/usr/local/bin/redis-server  /root/redis-5.0.7/redis.conf >> /var/log/redis.log &
vim /usr/lib/systemd/system/redis.service
# 添加如下内容
 [Unit]
Description=redis.server
After=network.target

[Service]
Type=forking
PIDFILE=/var/run/redis_6379.pid
ExecStart=/usr/local/bin/redis-server  /root/redis-5.0.7/redis.conf
ExecRepload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
# 重新载入服务
systemctl daemon-reload
# 允许开机自启动
systemctl enable redis.service
上一篇下一篇

猜你喜欢

热点阅读