Redis Services A lot of people are using
See how to install Redis first. The following is from the official website brought, not much to say.
$ wget http://download.redis.io/releases/redis-3.0.3.tar.gz$ tar xzf redis-3.0.3.tar.gz$ cd redis-3.0.3$ makesrc/ redis-server$ src/redis-cliredis> set foo barokredis> get foo "bar"
The default profile redis.conf read a few more times.
Today talk about how to start redis-server
Method 1:./src/redis-server &
Method 2: Start in daemonize mode
Sed-i s/daemonize no/daemonize yes/redis.conf./src/redis-server
Method 3: Is today to say supervisor, this method can manage a lot of source code compiled software, if the use of Yum installed software, there will be a system startup script, it is not recommended to use this method.
Yum Install supervisorvim/etc/supervisord.conf# end Add [Program:redis]command =/usr/local/redis-2.8.21/src/ Redis-server/usr/local/redis-2.8.21/redis.confautostart=true #随supervisord Start the autorestart=true #如果redis异常退出 together, Restart the startsecs=3
And then start
[[email protected] shell]#/etc/init.d/supervisord start[[email protected] shell]# supervisorctl Redis RUNNING PID 24595, uptime 0:17:42
If the error is as follows
Gave Up:redis entered FATAL state, too many start retries too quickly modify redis.conf daemonize to No
This article is from the "[email protected]" blog, please be sure to keep this source http://ribble.blog.51cto.com/3863110/1679690
Supervisor Start Redis Service