1. Install the compilation environment
Redis is developed in the C language.
Installing Redis requires a C language compilation environment. If no GCC is required to be installed online. Yum Install gcc-c++
2. Installation steps:
The first step: the Redis source package is uploaded to the Linux system/home/redis-3.0.0.tar.gz.
The second step: Unzip the Redis. Tar zvxf redis-3.0.0.tar.gz
Step three: Compile. Enter the Redis source directory. Make
Fourth step: Install. Make install Prefix=/usr/local/redis
The prefix parameter specifies the installation directory for Redis. General software installed in/usr directory
3. Start Redis:
Cd/usr/local/redis/bin
Enter:./redis-server to start the Redis foreground program
If you want to start the Redis daemon:
Modify the/usr/local/redis/bin redis.conf file Daemonize No to daemonize Yes
Input:./redis-server redis.conf started.
Want to see if it started successfully
4. Connect to Redis:
[Email protected] bin]#./redis-cli
The default connection localhost runs on the 6379 Port Redis service.
[Email protected] bin]#/redis-cli-h 192.168.25.153-p 6379
-H: The address of the connected server
-P: Port number of the service
Close Redis:[[email protected] bin]#./REDIS-CLI shutdown
Linux installation Redis