redis啟動(dòng),停止,及端口占用處理方法
啟動(dòng)
進(jìn)入etc目錄下 啟動(dòng)redis
sudo ../bin/redis-server ./redis.conf
停止 ./redis-cli shutdown 注釋:這里關(guān)閉默認(rèn)端口號(hào) ./redis-cli -h 127.0.0.1 -p 7001 shutdown 注釋:關(guān)閉指定端口號(hào) 實(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í)例redis Sorry, 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è)參考,也希望大家多多支持腳本之家。
相關(guān)文章
?Redis 串行生成順序編碼的方法實(shí)現(xiàn)
本文主要介紹了?Redis 串行生成順序編碼的方法實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2022-04-04Redisson分布式限流器RRateLimiter的使用及原理小結(jié)
本文主要介紹了Redisson分布式限流器RRateLimiter的使用及原理小結(jié),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2024-06-06redisson中RRateLimiter分布式限流器的使用
Redisson Ratelimiter是Redisson框架中的一種限流算法,用于限制對資源的訪問頻率,本文主要介紹了redisson中RRateLimiter分布式限流器的使用,感興趣的可以了解一下2024-06-06