> /etc/prof_redis安装版">
赞
踩
# 默认安装gcc版本4.8.5
yum -y install gcc
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash #临时配置
echo "source /opt/rh/devtoolset-9/enable" >> /etc/profile #永久配置
gcc -v
__________________________________________________
gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)
__________________________________________________
# 下载安装包
wget http://download.redis.io/releases/redis-6.0.3.tar.gz
tar -zxvf redis-6.0.3.tar.gz -C /opt/software/
cd /opt/software
mv redis-6.0.3 redis603
cd /opt/software/redis603
make
make instal
vim redis.conf
port 6379
daemonize yes #改为yes,启动后台启动,默认非后台启动
#bind 127.0.0.1 #注释该语句
requirepass 12345678 #配置访问密码
appendonly yes #混合持久化配置一
aof-use-rdb-preamble yes #混合持久化配置二
redis-server /opt/software/redis603/redis.conf
ps -aux|grep redis
redis-cli -h localhost -p 6379 -a 12345678
redis-cli shutdown
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。