Linux Under-Build and install Redis

Source: Internet
Author: User
Tags install redis

1, first enter the directory to be installed, for example, I want to install Redis into the/usr/local/redis, then first into the/usr/local

Cd/usr/local

2. Then download the installation package and unzip

wget http://download.redis.io/releases/redis-3.0.2.tar.gz

TAR-XVF redis-3.0.2.tar.gz

MV redis-3.0.2 Redis

CD Redis

3. Compile and install

Make

Make install

4. Modify the configuration

VI redis.conf

Daemonize no//is running in the background, on no, yes Yes

Port 6379//ports default 6379

LogFile ""//log file address/var/log/redis.log

5. Start the service

redis-server/usr/local/redis/redis.conf//Specify configuration file mode to run

Test whether it started successfully

REDIS-CLI ping//Output Pong is successful

Close Service

REDIS-CLI shutdown

If the non-default port

Redis-cli-p Port shutdown

6. This redis password

Redis-cli

CONFIG SET Requirepass 123456

Then restart Reids

REDIS-CLI shutdown

Redis-server/usr/local/redis/redis.conf

Linux Under-Build and install 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.