1,下载redis
#cd /usr/local/src/
#wget http://download.redis.io/releases/redis-3.0.7.tar.gz
#
#tar zxvf redis-3.0.7.tar.gz
#
#cd /usr/local/src/redis-3.0.7
#
#make MALLOC=jemalloc
#
#make PREFIX=/opt/apps/redis install
1,下载redis
#cd /usr/local/src/
#wget http://download.redis.io/releases/redis-3.0.7.tar.gz
#
#tar zxvf redis-3.0.7.tar.gz
#
#cd /usr/local/src/redis-3.0.7
#
#make MALLOC=jemalloc
#
#make PREFIX=/opt/apps/redis install
5.0.7 和3.x 安装方式一样
2.启动方式
cat > /lib/systemd/system/redis.service <<EOF
[Unit]
Description=Redis persistent key-value database
After=network.target
[Service]
ExecStart=/data/apps/reids/bin/redis-server /data/apps/reids/etc/redis.conf --supervised systemd
ExecStop=/bin/kill -s QUIT \$MAINPID
Type=notify
User=redis
Group=redis
RuntimeDirectory=redis
RuntimeDirectoryMode=0755
LimitNOFILE=1000000
[Install]
WantedBy=multi-user.target
cat > /lib/systemd/system/redis.service <<EOF
[Unit]
Description=Redis persistent key-value database
After=network.target
[Service]
ExecStart=/data/apps/reids/bin/redis-server /data/apps/reids/etc/redis.conf --supervised systemd
ExecStop=/bin/kill -s QUIT \$MAINPID
Type=notify
User=redis
Group=redis
RuntimeDirectory=redis
RuntimeDirectoryMode=0755
LimitNOFILE=1000000
[Install]
WantedBy=multi-user.target
- reload
systemctl daemon-reload
systemctl enable --now redis
systemctl daemon-reload
systemctl enable --now redis