#download |
cd |
wget http://download.redis.io/redis-stable.tar.gz |
#unfreeze |
tar xzf redis-stable.tar.gz |
#build |
cd redis-stable |
make |
make install |
#command and init script copy |
cp -p /root/redis-stable/src/redis-server /usr/bin/ |
cp -p /root/redis-stable/src/redis-cli /usr/bin/ |
cp ./utils/redis_init_script /etc/init.d/redis |
#make workdir and workuser |
groupadd redis |
useradd -s /sbin/nologin -M -g redis redis |
mkdir /etc/redis /var/run/redis /var/log/redis |
chmod 755 /etc/redis /var/run/redis /var/log/redis |
chown redis:redis /etc/redis /var/run/redis /var/log/redis |
#edit redis.conf |
vim redis.conf |
logfile /var/log/redis.log daemonize yes supervised systemd |
cp redis.conf /etc/redis/6379.conf |
cp -p /root/redis-stable/utils/redis_init_script /etc/init.d/redis |
/etc/init.d/redis start |
#redis start |
systemctl daemon-reload |
systemctl start redis |
systemctl status redis |
systemctl enable redis |
#cli check |
redis-cli ping |
コメント