Quickly build a Redis cache database

Source: Internet
Author: User
Tags redis version

a previous essay-- Redis installation and master-slave configuration have been described in detail for redis installation in configuration. This article is about how to quickly create a new Redis cache database on a machine that already has Redis installed.

I. Introduction to the Environment

1) Linux version: Red Hat Enterprise Linux Server release 6.1 (Santiago)

2) Redis version: Redis 2.6.16

3) Redis Installation path:/usr/local/webserver/redis

Second, installation steps

1) Copy the/usr/local/webserver/redis file to the sibling directory and rename it, for example:/usr/local/webserver/redis9736

2) Edit the start.sh below the redis9736 folder as follows:

#!/bin/Bash/usr/local/webserver/redis9736/redis-server/usr/local/webserver/redis9736/conf/redis.conf

3) Edit the stop.sh below the redis9736 folder as follows:

#!/bin/bashkill 'cat /usr/local/webserver/redis9736/run/redis.pid '

4) Modify the redis.conf file under the Redis9736/conf folder as follows:

Pidfile/usr/local/webserver/redis/run/redis.pid  -  pidfile/usr/local/webserver/redis9736/run/   6379--    9736dir   /usr/local/webserver/redis/db   - - Dir /usr/local/webserver/redis9736/db

Third, open the service

1) Assign permissions to files under the redis9736 folder: chmod 777 *

2) turn on the service./start.sh

3) Close the service./stop.sh

4) Turn on the Redis client./redis-cli–p 9736

Quickly build a Redis cache database

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.