1. obtain the Redis source code and go to the Redis official website to obtain the latest stable version of Redis or download the Redis source code using the wget command. Compile; 2. compile Redis. Use cd
1. obtain Redis source code
Go to the official Redis website to obtain the latest stable version of Redis.
Or use the wget command to download the Redis source code.
2. Redis compilation
Use the tar-xvf redis-3.0.7.tar.gzcommand to decompress the redissource code compressed package redis-3.0.7.tar.gz;
2. compile Redis. Access the Redis source code directory through the cd redis-3.0.7/, execute make to compile Redis;
3. Redis installation and configuration
Install Redis and run make install. The executable files generated by make compilation are copied to the/usr/local/bin directory;
Run./utils/install_server.sh to configure the Redis configuration, and then Redis can be started with the system.
4. View, enable, and disable the Redis service
1. run the ps-ef | grep redis command to view the Redis process;
2. enable Redis service operation through/usr/local/bin/redis-server/usr/local/redis-3.0.7/redis. conf
3. shut down the Redis service through/usr/local/bin/redis-cli-h 127.0.0.1-p 6379-a esoon2016 (this is the password) shutdown
5. set the password and run it in the background.
Vi/usr/local/redis-3.0.7/redis. conf
Find
Requirepass
Write
Requirepass yourpassword
Set daemonize to yes
Start the client using/usr/local/bin/redis-cli
Use auth yourpassword to log on