redis start stop and port occupation methods

  • 2020-06-15 10:29:10
  • OfStack

Start the

Go to the etc directory and start redis

sudo ../bin/redis-server ./redis.conf

Stop. / redis - cli shutdown annotation: close the default port number here. / redis - cli - h 127.0.0.1-7001 shutdown p annotation: close the specified port number real-time view logs tail - f/usr/local redis/log - redis. log / / -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - port problem handling $ ps aux | grep redis Find the port 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
//------------------ with 1 Machines start multiple instances 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.
 Need to be in 
redis.conf Configuration in a configuration file 
cluster-config-file nodes.conf
 For different names 

Related articles: