Linux Redis 安装
作者:互联网
下载并解压Redis
wget https://download.redis.io/releases/redis-6.2.6.tar.gz
解压redis
tar xzf redis-6.2.6.tar.gz
移动redis目录,一般都会将redis目录放置到 /usr/local/redis目录
mv redis-6.2.6 /usr/local/redis
编译并安装redis
cd /usr/local/redis make
执行下面命令安装redis,并指定安装目录
make install PREFIX=/usr/local/redis
启动redis
./bin/redis-server redis.conf
把redis配置成服务,开机自启动
cp utils/redis_init_script /etc/rc.d/init.d/redis vi /etc/rc.d/init.d/redis EXEC=/usr/local/redis/bin/redis-server CLIEXEC=/usr/local/redis/bin/redis-cli PIDFILE=/var/run/redis_${REDISPORT}.pid CONF="/usr/local/redis/redis.conf" $EXEC $CONF &
chkconfig --add redis
开机自启动
chkconfig redis on
标签:tar,安装,redis,init,usr,Linux,Redis,local,6.2 来源: https://www.cnblogs.com/catyxiao/p/16355810.html