redis 设为自启动
程序员文章站
2022-07-11 12:48:33
...
进入安装目录/src/
mkdir /etc/redis
cp redis.conf /etc/redis/
vim ../utils/redis_init_script
修改配置
EXEC=/opt/redis-4.0.11/src/redis-server
CLIEXEC=/opt/redis-4.0.11/src/redis-cli
PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/etc/redis/redis.conf"
cd ../utils/
cp redis_init_script /etc/init.d/redisd
#设置为开机自启动服务器
chkconfig redisd on
#打开服务
service redisd start
#关闭服务
service redisd stop
mkdir /etc/redis
cp redis.conf /etc/redis/
vim ../utils/redis_init_script
修改配置
EXEC=/opt/redis-4.0.11/src/redis-server
CLIEXEC=/opt/redis-4.0.11/src/redis-cli
PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/etc/redis/redis.conf"
cd ../utils/
cp redis_init_script /etc/init.d/redisd
#设置为开机自启动服务器
chkconfig redisd on
#打开服务
service redisd start
#关闭服务
service redisd stop
下一篇: mysql 级联删除