Install Redis4.0.7 in centos 7, centos 7 Redis4.0.7

Source: Internet
Author: User
Tags download redis

Install Redis4.0.7 in centos 7, centos 7 Redis4.0.7
Introduction Redis is an advanced key-value database. It is similar to memcached, but data can be persistent and supports a wide range of data types. There are string, linked list, set and ordered set. Allows you to compute, merge, and merge sets (difference) on the server side. It also supports multiple sorting functions. So Redis can also be seen as a data structure server.

All Redis data is stored in the memory (high efficiency) and stored to the disk asynchronously from time to time (this is called the "semi-persistent mode "); you can also write every data change to an append only file (aof) (this is called "Full persistence mode ").

For more information about Redis, refer to the Chinese version of the official Redis website. Here I only provide the installation and deployment of Redis on Centos7.
Download the Redis Installation Package 1. Download redis through wget in centOS

cd /home/rthd01/downloadswget http://download.redis.io/releases/redis-4.0.7.tar.gz

2. Download from Firefox in CentOS7, or go to the official website on Windows and upload it to CentOS.


Decompress the compiled source program
tar -xzvf redis-4.0.7.tar.gz
Go to the decompressed folder to compile
cd /usr/local/src/redis-4.0.7make
Then there will be a lot of things starting with CC, lasting for a period of time and then entering src to install Redis
make install
Start Redis Service
./redis-server 


Configure Redis to start with the system:
./utils/install_server.sh
Just press Enter.
Set the Redis background to start and modify the redis. conf file
vim /usr/local/redis/etc/redis.conf

Press I to enter the insert mode for editing

Change the daemonize configuration item to yes.

Save and exit

Press esc first and then

:wq
View, enable, and disable the Redis Service: a. view the redis process using the ps-ef | grep Redis command
B. Enable the Redis service operation by running the/etc/init. d/redis_6379 start command, or by using the (service redis_6379 start)
C. Disable the Redis service by running the/etc/init. d/redis_6379 stop command. You can also run the (service redis_6379 stop) command)
Configuration information of redis. conf 1. If daemonize needs to be run in the background, change this item to yes
2. The address of multiple PIDs configured in pidfile is/var/run/redis. pid by default.
3. bind an ip address. After the binding, only requests from the ip address are accepted.
4. port listening port. The default value is 6379.
5. loglevel is divided into four levels: debug verbose notice warning
6. logfile is used to configure the log file address.
7. Set the number of databases for databases. The default value is 0.
8. save sets the frequency for redis to perform database mirroring.
9. Does rdbcompression perform compression during image backup?
10. Name of the backup file of the dbfilename Image
11. Path of the files backed up by the Dir database image
12. Set Slaveof as the slave database of another database
13. Password verification required for Masterauth primary database connection
14. Use a password for Requriepass Login
15. Maxclients limits the number of customers simultaneously used
16. Maxmemory sets the maximum memory available for redis
17. Enable append only mode for Appendonly
18. Appendfsync sets the synchronization frequency of appendonly. aof files (the second method for data backup)
19. Whether virtual memory support is enabled for vm-enabled (all parameters starting with vm are configured with virtual memory)
20. vm-swap-file: Set the swap file path for the virtual memory
21. vm-max-memory: set the maximum physical memory used by redis.
22. vm-page-size: Set the page size of the virtual memory.
23. vm-pages: Set the total number of pages for swap files
24. vm-max-threads sets the number of threads simultaneously used by vm io.
25. Glueoutputbuf stores small output caches together
26. Set hash-max-zipmap-entries to critical values
27. Activerehashing re-hash

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.