// You need tcl 8.5 or newer in order to run the Redis test
http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
tar -zxvf tcl8.6.1-src.tar.gz
cd tcl8.6.1/
cd unix/
./configure
make
make install //安装成功 tcl
tar -xzvf redis-5.0.7.tar.gz
yum install gcc
///yum install tcl //replace by new version.
cd redis-5.0.7/
make MALLOC=libc // 避免提示找不到 jemalloc/jemalloc.h
make test //Test 安装成功 \o/ All tests passed without errors!
netstat -anp | grep 6379 //检查端口是否在使用中
firewall-cmd --add-port=6379/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports
/tmp/redis-6.2.1/src/redis-server /tmp/redis-6.2.1/src/redis.conf
redis-cli -h 192.168.20.33 -p 6379 -a password
# bind 127.0.0.1
daemonize yes
protected-mode no
//auto start
cd /lib/systemd/system
vi redis.conf
[Unit]
Description=Redis
After=network.target
[Service]
Type=forking
PIDFile=/var/run/redis_6379.pid ###need
ExecStart=/usr/local/soft/redis6/redis-server ##### /usr/local/soft/redis6/redis.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
install redis on centos 8
最新推荐文章于 2024-04-19 17:54:47 发布