如果你傲娇,不想拷贝!就一定要睁大你迷人的小眼睛,千万别敲错!!!
[Unit]
Description=redis-server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/redis6/bin/redis-server /usr/local/redis6/redis.conf
PrivateTmp=true
[Install]
WantedBy=multi-user.target
其中,
/usr/local/redis6/
是自己redis安装文件所在的系统目录。
systemctl daemon-reload
systemctl enable redis
systemctl start redis
systemctl status redis -l
systemctl stop redis
systemctl restart redis