Ubuntu Installation free Redis Boot up automatically
#1 Environmental Science
#2 demand
#3 Start
#3.1 install Redis
Ubuntu Installation free Redis Boot up automatically
#1 Environmental Science
Ubuntu16.04
#2 demand
Installation free , Directly decompress the compressed package to use Redis
To configure Redis Boot up automatically
#3 Start
#3.1 install Redis
Redis The installation path : /usr/local/redis/
install Redis
download Redis package
link :https://pan.baidu.com/s/11K5ILUvzpTdf7kLYCBurLQ password :ysuc
Unzip to /usr/local/ Under the table of contents
unzip redis.zip
Configure boot auto start
Enter the extracted file
find utils/redis_init_script
take utils/redis_init_script Copied to the /etc/init.d/redis
sudo cp redis_init_script /etc/init.d/redis
# Get access to
sudo chmod +x /etc/init.d/redis
# Load to system boot file
sudo update-rc.d redis defaults
2. The test results
sudo update-rc.d redis defaults
service redis start
3. Other commands
# Start the service
service redis start
# Out of Service
service redis stop
# Restart the service
service redis restart
4. remarks
This article USES redis2.x edition , If you are installing a higher version of redis, Corresponding redis.conf Documents need to be changed , Concrete redis.conf The document can be downloaded from the official website
In the installation redis After completion , It can be in the installation path , Manual start redis-server and redis-cli, To ensure that it can be used normally