Redis installation configuration: Inux system for CentOS 64-bit

Source: Internet
Author: User
Tags download redis

Download Redis-4.0.6.tar.gz Package

I downloaded to my default directory under/root/software/

1. Then unzip to this directory

/usr/local/src/

  

Decompression command:

TAR-XZF redis-4.0.6.tar.gz-c/usr/local/src/

  

2. Go to the/usr/local/src/redis-4.0.6 directory to compile and install to the specified directory

Makemake Install Prefix=/usr/local/redis

  

3. Go to the Redis directory to see the bin folder

4. Into the bin folder, you can see the service side of Redis, the client

Found no: redis.conf file

To the original extracted directory:/usr/local/src/redis-4.0.6 directory will: redis.conf Copy to/usr/local/redis/bin directory

5. Modify the configuration file, change the daemon option to Yes, support background startup mode

6. Press ESC and ENTER: Wq Save and exit, and then enter the command to start Redis with the specified Redis profile

./redis-service redis.conf

  

7. View background processes

Ps-ef|grep Redis

  

8/Connect test with Redis client, you can see that you have successfully

redis.conf configuration file Configuration item resolution

  • Daemonize: If you need to run in the background, change the value of the item to Yes
  • Pdifile: Put PID file in/var/run/redis.pid, can be configured to other address
  • Bind: Specifies that Redis receives only requests from that IP, and if not set, all requests are processed and it is best to set the item in the production process
  • Port: Listening ports, default is 6379
  • Timeout: Time-out when setting client connections in seconds
  • LogLevel: Grades are divided into 4 levels, debug,revbose,notice and warning. General open notice under production environment
  • LogFile: Configure the log file address, which is printed on the port of the command line terminal by default using standard output
  • Database: Set the number of databases, the default database used is 0
  • Save: Set the frequency of Redis for database mirroring
  • Rdbcompression: Whether to compress during a mirrored backup
  • Dbfilename: File name for mirrored backup files
  • Dir: path to file placement for database mirroring backups
  • Slaveof: Set the database to be a slave database for other databases
  • Masterauth: When the primary database connection requires password authentication, set it here
  • Requirepass: Set the password to be used before any other specified client connection is made
  • MaxClients: Limit the number of simultaneous clients
  • MaxMemory: Set the maximum memory that Redis can use
  • AppendOnly: When AppendOnly mode is turned on, Redis appends each received write to the appendonly.aof file, and when Redis restarts, the previous state is recovered from the file
  • Appendfsync: How often to set the appendonly.aof file for synchronization
  • Vm_enabled: Whether to turn on virtual memory support
  • Vm_swap_file: Set the path of the swap file for virtual memory
  • Vm_max_momery: Set the maximum amount of physical memory that Redis will use when virtual memory is turned on, default is 0
  • Vm_page_size: Setting the size of virtual memory pages
  • Vm_pages: Set the total page number of the swap file
  • Vm_max_thrrads: Set the number of simultaneous threads used by VM IO

Redis installation configuration: Inux system for CentOS 64-bit

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.