啟動(dòng)
進(jìn)入etc目錄下 啟動(dòng)redis
sudo ../bin/redis-server ./redis.conf
停止 ./redis-cli shutdown 注釋:這里關(guān)閉默認(rèn)端口號 ./redis-cli -h 127.0.0.1 -p 7001 shutdown 注釋:關(guān)閉指定端口號 實(shí)時(shí)查看日志 tail -f /usr/local/redis/log-redis.log //----------------端口占用問題處理 $ ps aux | grep redis Find the port that its running on.. In my case..
MyUser 8821 0.0 0.0 2459704 596 ?? S 4:54PM 0:03.40 redis-server *:6379
And then close the port manually
$ kill -9 8821
Re-run redis
$ redis-server//------------------同一臺(tái)機(jī)器啟動(dòng)多個(gè)實(shí)例redisSorry, the cluster configuration file nodes.conf is already used by a different Redis Cluster node. Please make sure that differen t nodes use different cluster configuration files.需要在redis.conf配置文件中配置cluster-config-file nodes.conf為不同名稱
以上這篇redis啟動(dòng),停止,及端口占用處理方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持武林網(wǎng)。
新聞熱點(diǎn)
疑難解答
圖片精選