Redis安装#
https://redis.io/download
下载 安装#
建议安装在/usr/local/目录下
$ wget https://download.redis.io/releases/redis-6.0.9.tar.gz
$ tar xzf redis-6.0.9.tar.gz
$ mv redis-6.0.9 /usr/local/redis
$ cd redis-6.0.9
$ make
开机自启#
vi /usr/local/redis/redis.conf
daemonize yes
mkdir /etc/redis
cp /usr/local/redis/redis.conf /etc/redis/6379.conf
find / -name redis_init_script
cp /usr/local/redis/utils/redis_init_script /etc/init.d/redis
vi /etc/init.d/redis
REDISPORT=6379
EXEC=/usr/local/redis/bin/redis-server
CLIEXEC=/usr/local/redis/bin/redis-cli
PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/etc/redis/${REDISPORT}.conf"
service redis start/stop
chkconfig redis on (开机启动)