linux(ubuntu20.10) :编译安装redis6.0.9 - 刘宏缔的架构森林 - 博客园
mkdir -p /usr/local/soft/redis6
make MALLOC=libc
make PREFIX=/usr/local/soft/redis6 install
/usr/local/soft/redis6/bin
mkdir /usr/local/soft/redis6/conf
cp redis.conf /usr/local/soft/redis6/conf/
cd utils/
cp -axv redis_init_script /etc/init.d/redis
mkdir -p /data/redis6
mkdir -p /data/redis6/logs
mkdir -p /data/redis6/data
cd /usr/local/soft/redis6/conf/
vi redis.conf
1,绑定ip:这里使用默认值即可
bind 127.0.0.1
2,以daemon方式运行
daemonize yes
3,日志保存目录
logfile "/data/redis6/logs/redis.log"
4,数据保存目录:
dir /data/redis6/data/
5,使用的最大内存容量
maxmemory 128MB
vi /etc/init.d/redis
REDISPORT=6379
EXEC=/usr/local/soft/redis6/bin/redis-server
CLIEXEC=/usr/local/soft/redis6/bin/redis-cli
PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/usr/local/soft/redis6/conf/redis.conf"
chmod +x /etc/init.d/redis
update-rc.d redis defaults
service redis start
ss -lntp | grep redis
ss -lntp | grep redis
/usr/local/soft/redis6/bin/redis-server -v
vim /etc/profile
export PATH=/usr/local/soft/redis6/bin:$PATH
source /etc/profile
redis-cli
more /etc/os-release