Installing Redis && Configuring Redis boot from Linux CentOS7.2

Source: Internet
Author: User

1. Installing Redis

First step: Download the Redis installation package

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

Step two: Unpack the zip package

TAR-ZXVF redis-4.0.11.tar.gz

Step three: Yum installs GCC dependencies

Yum Install GCC

Fourth step: Jump to Redis decompression directory

cd/opt/

MV redis-4.0.11 Redis

CD Redis

Fifth step: Compile and install

Make MALLOC=LIBC

Add files from the/USR/LOCAL/REDIS-4.0.6/SRC directory to the/usr/local/bin directory

CD src && make instal

Sixth step: Test whether the installation is successful

Cd/opt/redis/src

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

2. Configuring Redis

1. Set Daemonize to Yes,requirepass as your Redis password in redis.conf to make sure the daemon is on, that is, it can be run in the background.

Vi/opt/redis/redis.conf

2. Copy the Redis profile (the startup script needs to use the profile content, so copy it)

Mkdir/etc/redis
Cp/opt/redis/redis.conf/etc/redis/6379.conf

3. Set daemonize in redis.conf to Yes to ensure that the daemon is turned on, that is, it can run in the background.
Find/-name Redis_init_script
Cp/opt/redis/utils/redis_init_script/etc/init.d/redis

4. Modify Startup Script Parameters
Vi/etc/init.d/redis

5. Start Redis

Open Redis Command: Service Redis start

Turn off Redis command: Service Redis stop

Set to boot: Chkconfig Redis on

Set to power off: chkconfig Redis off

Installing Redis && Configuring Redis boot from Linux CentOS7.2

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.