1, download, compile, install
Https://redis.io/download
wget xxxxx 2, set up service automatic background start
(1), copy initialization script
First, the Utils/redis_init_script file is copied to the/ETC/INIT.D, and the REDISD is easily named. Execute command
Cp/usr/local/redis-3.0.2/utils/redis_init_script/etc/init.d/redisd
Then execute the command, VI/ETC/INIT.D/REDISD, and add in the second line of the document
# chkconfig:2345 90 10
# Description:redis Server
# This definition is run level, priority, shutdown, etc.
If there are no redis-server and redis-cli files in the/usr/local/redis/bin, we need to copy one from our installation directory. Otherwise, Redis-server cannot be found at service startup.
(here if there is no problem in the installation, generally will have)
(2), copy the configuration file
Mkdir/etc/redis
Cp/usr/local/redis-3.0.2/redis.conf/etc/redis/6379.conf
3, complete the above operation, you can register the service:
(1), Chkconfig--add Redis
and start the Redis service.
(2), service Redis start
So we're going to register the Redis service,