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