下面由redis教程欄目給大家介紹redis教程隊列實現歷史搜索功能的方法,希望對需要的朋友有所幫助!
centos 將 Redis 配置為系統服務
創建 redis.service
cd??/usr/lib/systemd/system touch?redis.service
編輯內容
[Unit] Description=Redis?Server After=network.target [Service] PIDFile=/var/run/redis_6379.pid ExecStart=/usr/local/bin/redis-server?/etc/redis.conf ExecStop=/usr/local/bin/redis-cli?-a?passwd?shutdown ExecReload=/bin/kill?-s?HUP?$MAINPID [Install] WantedBy=mutli-user.target
重新載入 systemctl 并啟動服務
systemctl?daemon-reload systemctl?start?redis.service
查看狀態
systemctl?status?redis.service
關閉 Redis
systemctl?stop?redis.service
開機自啟
systemctl?enable?redis.service
是否開機自啟
systemctl?is-enabled?redis.service
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END