Installing Redis on Linux

Source: Internet
Author: User

Installing Redis on Linux

website Address: http://redis.io/

: http://download.redis.io/releases/redis-3.0.0.tar.gz

The first step: installing CentOS in VMware

Step two: in Install the GCC environment under Linux (This step can be omitted, theCentOS default comes with C environment)

[email protected] redis-3.0.0]# Yum install gcc-c++

Step three: Download the Redis Source package uploaded to Linux server

It's best to create a folder that holds Redis, and I'm using a tool to upload it. or drag files directly into the virtual machine

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8F/D8/wKiom1js-zORENGOAAQ91YY75j8568.png-wh_500x0-wm_ 3-wmp_4-s_2224102626.png "title=" Redis upload. png "alt=" wkiom1js-zorengoaaq91yy75j8568.png-wh_50 "/>


Fourth step: Unzip Redis Source Package (after the decompression is completed as shown, will be more than one folder)

[Email protected] ~]# TAR-ZXF redis-3.0.0.tar.gz

650) this.width=650; "Src=" Https://s5.51cto.com/wyfs02/M01/8F/D7/wKioL1js--rgtEXIAADaUyxS7jg318.png-wh_ 500x0-wm_3-wmp_4-s_2582841609.png "title=" decompression redis.png "alt=" Wkiol1js--rgtexiaadauyxs7jg318.png-wh_50 "/>

Fifth Step: Compiling redis source code

Go to the folder of the Redis you just extracted, and then execute the Make command (due to the length of the compilation)

[Email protected] ~]# CD redis-3.0.0

[[email protected] redis-3.0.0]# make

650) this.width=650; "Src=" Https://s5.51cto.com/wyfs02/M00/8F/D7/wKioL1js_LySxIxtAAHN2goTPZw386.png-wh_ 500x0-wm_3-wmp_4-s_754789069.png "title=" compiles. png "alt=" wkiol1js_lysxixtaahn2gotpzw386.png-wh_50 "/>

Sixth step: Install Redis (you can specify the appropriate file path according to your needs)

[[email protected] redis-3.0.0]# make install prefix=/usr/local/redis0707

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/8F/D7/wKioL1js_XSxkgf8AABvze-ZZWQ188.png-wh_500x0-wm_ 3-wmp_4-s_3105389383.png "title=" installation. png "alt=" wkiol1js_xsxkgf8aabvze-zzwq188.png-wh_50 "/>

How do I detect that the Redis installation is successful? The best way is to start it.

Go to the directory where Redis is installed cd/usr/local/redis0707 use the LL command to view the information below the folder, there will be a bin


650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/8F/D8/wKiom1js_nPDT4Y-AAArKVZMo9o691.png-wh_500x0-wm_ 3-wmp_4-s_1422508516.png "title=" into the installation directory. png "alt=" wkiom1js_npdt4y-aaarkvzmo9o691.png-wh_50 "/>

Use the CD bin to enter the folder under use./redis-server

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8F/D7/wKioL1js_uyg1rTWAAAcFJxB8mM972.png-wh_500x0-wm_ 3-wmp_4-s_975907459.png "title=" Start Redis.png "alt=" Wkiol1js_uyg1rtwaaacfjxb8mm972.png-wh_50 "/>

Appears as shown in the proof of Redis boot success

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8F/D7/wKioL1js_0rxm-qMAACmYC4atHk227.png-wh_500x0-wm_ 3-wmp_4-s_1965925539.png "title=" started successfully. png "alt=" wkiol1js_0rxm-qmaacmyc4athk227.png-wh_50 "/>

Turn off Redis

Force off (not recommended) CTRL + C

Shut down normally./REDIS-CLI shutdown The command recommends that you enable a window to enter the Redis installation directory to execute


Since this startup has drawbacks that are not conducive to development, here's how to use other methods to start Redis

The first step is to copy the redis.conf file from the extracted Redis folder to the bin directory of the installation path

cp/root/redis-3.0.0/redis.conf./

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8F/D7/wKioL1jtAlzSxtLsAAC0Pw-5vec228.png-wh_500x0-wm_ 3-wmp_4-s_2192648847.png "title=" Copy configuration file. png "alt=" wkiol1jtalzsxtlsaac0pw-5vec228.png-wh_50 "/>

The second part modifies the redis.conf file,

Vim redis.conf

After the modification page appears, enter/dae to find the fields that need to be modified, find and then enter I then modify, after the successful modification, press the ESC key to enter: (colon) and then enter Wq (part of the Linux command Baidu) so long quit the modification page

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/8F/D7/wKioL1jtA7GjXQUQAAC-8fnRDlA911.png-wh_500x0-wm_ 3-wmp_4-s_2038607614.png "title=" Modify the configuration file. png "alt=" wkiol1jta7gjxquqaac-8fnrdla911.png-wh_50 "/>

Step three use the command to start Redis

./redis-server redis.conf

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8F/D9/wKiom1jtBQPhyilVAAAUUM4S3Hw671.png-wh_500x0-wm_ 3-wmp_4-s_946237821.png "title=" Start command. png "alt=" wkiom1jtbqphyilvaaauum4s3hw671.png-wh_50 "/>

Fourth step to see if Redis starts

Since the third step starts successfully after the page does not show what, so by looking at the way the thread to see if Redis started the command as follows

Ps-aux | grep Redis

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8F/D9/wKiom1jtBa7CuH8_AABLIVwnMJo965.png-wh_500x0-wm_ 3-wmp_4-s_2260414542.png "title=" Start success 22.png "alt=" Wkiom1jtba7cuh8_aablivwnmjo965.png-wh_50 "/>

Turn off Redis

Kill-9 9554 (Close according to your own port number)

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8F/D7/wKioL1jtBpKAXQrzAACFxiKc0HM450.png-wh_500x0-wm_ 3-wmp_4-s_3998916467.png "title=" off. png "alt=" wkiol1jtbpkaxqrzaacfxikc0hm450.png-wh_50 "/>


Note: Because I level limited, the article has what wrong place, please point out, good timely modification. QQ Group: 417622877

This article is from the "10986051" blog, please be sure to keep this source http://10996051.blog.51cto.com/10986051/1915073

Installing Redis on Linux

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.