下载redis源码包
software]# wget https://download.redis.io/releases/redis-5.0.9.tar.gz
解压
software]# tar -zxvf redis-5.0.9.tar.gz
进入解压后的目录,有Makefile文件就可以直接编译了
redis-5.0.9]# make
安装到指定目录
redis-5.0.9]# make install PREFIX=/usr/local/redis
redis 后台启动
redis-5.0.9]# cp redis.conf /usr/local/redis/bin/
redis.conf 在源码里面
修改配置文件中的 daemonize
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes
后台启动
bin]# nohup ./redis-server ./redis.conf &
[root@zhdc bin]# ps aux | grep redis
root 26777 0.0 0.7 153996 7564 ? Ssl 15:51 0:00 ./redis-server 127.0.0.1:6379
root 26782 0.0 0.0 112824 980 pts/1 R+ 15:52 0:00 grep --color=auto redis
网友评论