Linux Redis Build

Source: Internet
Author: User
Tags download redis redis download install redis redis server

1, to the official website download Redis upload server or use wget download

wget redis Download Path

2. See if Linux installs the build environment GCC, without first installing

Yum-y Install GCC

3. Unzip the Redis

TAR-ZXVF redis-3.2. 9. tar.gz

4. Compile redis under the directory where Redis is unzipped

CD redis-3.2. 9  Make

5. Install Redis to the specified location

mkdir/srv/redismake Install PREFIX=/srv/redis

6. Copy the configuration file to the Redis installation directory

cp/mnt/pack/redis-3.2. 9/redis.conf/srv/redis/etc

7. Start Redis

/srv/redis/bin/redis-server/srv/redis/etc/redis.conf Note: The first one is to start the Redis server The second is the configuration required to load the boot server

8, by default, Redis is not running in the background, we need to put Redis in the background to run

vim/srv/redis/etc/redis.conf Modify the following properties to Yes:daemonize=yes

9. Configure boot-up Redis

vim/etc/Rc.local added under the change file:/srv/redis/bin/redis-server/srv/redis/etc/redis.conf

10. You can use the client to connect to the server

/srv/redis/bin/redis-cli

11. Stop the Service

/srv/redis/bin/redis-CLI shutdown or pkill redis--ef | grep rediskill off Redis process: Kill process ID

12. Several key points in the Redis installation directory (/src/redis/bin)

redis-Benchmark:redis Performance test Tool Redis-check-aof: Tools for checking aof logs Redis-check-Dump: tool Redis for checking RDB logs -CLI: Client redis-server:redis service process for connection

13, redis.conf configuration-related information

daemonize: If you need to run in the background, change the value of the item to Yespdifile: Put the PID file in /var/run/  Redis.pid, can be configured to other address bind: Specifies that Redis only receives requests from that IP, if not set, then all requests will be processed, it is best to set the key in the production process port: Listening port, default is 6379timeout: Set the timeout time for client connection, in seconds Logleve L: Grades are divided into 4 levels, debug,revbose,notice and warning. Production environment generally open Noticelogfile: Configure the log file address, the default use of standard output, that is, printed on the command line terminal Port database: Set the number of databases, The database used by default is 0save: Set the frequency of Redis for database mirroring rdbcompression: When a mirrored backup Whether to compress Dbfilename: The filename of the mirrored backup file dir: The path to the file placement of the database mirroring backup slaveof: Sets the database Masterauth from the database for the other database: when the primary database connection requires password authentication, Set Requirepass here: Set the client connection to use before any other specified password 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, restores the previous state from the file Appendfsync: Set the frequency of appendonly.aof files 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 to 0vm_page_ Size: Set virtual memory page sizes Vm_pages: Sets the total number of pages for the interchange file Vm_max_thrrads: Sets the number of threads used by VM IO concurrently

Linux Redis Build

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.