Linux installation Redis

Source: Internet
Author: User
Tags redis version install redis redis server

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.