Version
Linux version:
Redis version: 3.0.0
Installing gcc-c++
Redis is a C language development, the installation of Redis need to first download the source code to compile, compilation depends on the GCC environment.
Input command Yum install gcc-c++
If your system already has GCC installed, you'll be told that it's already loaded.
If not installed, alerts you if you need to install
Enter Y to agree to the download.
Enter Y to agree to the installation.
Install GCC successfully!
Installing Redis
First, the pre-downloaded redis-3.0.0.tar.gz is uploaded to the server via the FTP tool.
After uploading successfully, check the results as follows:
Decompression redis-3.0.0.tar.gz
Unzip successfully, go to redis-3.0.0 folder
Enter make to compile Redis
Compile successfully! If GCC is not installed, the compilation will appear with an error message. (If the installation fails, you must delete the folder, rewrite the unzip)
Enter make Prefix=/usr/local/redis install Redis to directory/usr/local/redis
The above reminders indicate that the installation was successful.
Go to the installation directory and view the files in the bin directory
which
Redis-benchmark----Performance Testing tools
redis-check-aof----aof File Repair Tool
Redis-check-dump----RDB File Check tool (snapshot persistence file)
redis-cli ----command-line Client
redis-server ----redis Server Start command
Configure redis.conf
Redis boot requires a configuration file that can modify information such as port numbers.
Go to the beginning of the extracted folder, enter the LL command, you will find a redis.conf file
Enter the command CP redis.conf/usr/local/redis Copy the redis.conf file to the installation directory. Enter the installation directory as shown below, enter the LL command and discover that the redis.conf file is already in the installation directory
Input command vim/usr/local/redis/redis.conf, modify the redis.conf configuration file (for VIM operation refer to http://www.cnblogs.com/dichuan/p/8967912.html)
Modify Daemonize No to daemonize yes so that it can be started in the later-end mode.
Start Redis Service
Go to installation directory/usr/local/redis/, command line: cd/usr/local/redis/
Enter the command./bin/redis-server./redis.conf
Indicates that the Redis service started successfully.
Start the Redis client
Under installation directory/usr/local/redis/, enter the command./BIN/REDIS-CLI
Indicates that the Redis client started successfully.
Linux installation Redis