Linux Building Redis Database

Source: Internet
Author: User
Tags download redis

The steps to build a Redis database on a Linux server are

1. Download Redis resource File

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

2. Extracting Redis Resource issues

TAR-ZXF redis-3.0. 4. tar.gz

3. Enter the Redis folder after decompression

CD redis-3.0. 4

4.make Installing the Redis service

Make

5. Start the Redis service (in fact, this step has been set up, as long as the implementation./redis-server but not recommended, because this is in the Redis installation directory to do the Redis operation, we generally will need to use the resource file CP to another directory A, Working with Redis in the A directory)

Create a Redis directory

cd/usr/Localmkdir Redis

6. Create the resource files directory for the bin Redis, the ETC Redis profile directory, and the var redis log directory

Var

7. Copy the resource file to the bin directory

7 . 1 Enter the Redis installation directory CD Redis-3.0. 4/src/7.2  Copy the resource file to the bin directory cp mkreleasehdr.sh Redis-benchmark redis-check-dump redis-cli redis-server/usr/local/redis/bin/

8. Copy the redis.conf file into the ETC Configuration folder

CP redis-3.0. 4/redis.conf/usr/local/redis/etc/

9. Change the redis.conf configuration file

# when Redis is running in the background, Redis defaults to putting the PID file on/var/run//var/run/redis.pid

Redis Port Configuration

6379

Configure the log file path for Redis

# config log file address # Default value is stdout, standard output, if background mode is output to /dev/null/usr/local/redis/var/ Redis.log

# Number of available databases # default is 16, default database is 0, database range is 0-(database-1

# Local Persistent database file name, default value is Dump.rdbdbfilename Dump.rdb

# Master-slave replication. Set the database as the slave database for the other database. # Set the IP address and port of the master service when this machine is Slav, and it automatically synchronizes data from Master when Redis starts # #slaveof IP port

123456

10. Start the service

start the Redis service #进入redis的bin目录cd usr/local/redis/bin#. /redis-server/usr/local/redis/etc/redis.conf &#启动客户端服务 for Redis testing. 123456 172.0. 0.1:6379>#end172.0. 0.1:63790-15.

  

For additional information on the configuration file, see address http://www.cnblogs.com/cxd4321/archive/2012/12/14/2817669.html

  

  

 

  

  

  

  

  

  

  

  

  

  

Linux Building Redis 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.