Installation and deployment of Redis under Linux

Source: Internet
Author: User
Tags download redis

Redis the installation

1, First officer network Download Redis compressed package, address: Http://redis.io/download Download stable version, here use redis-3.2.8.tar.gz,yht002 on/home/dev under

2, Decompression: TAR–ZXVF redis-3.2.8.tar.gz

3. Go to Redis folder, perform make to compile files after Redis decompression

4, after the successful compilation, there will be corresponding SRC, conf and other folders, into the SRC folder, execute make install for Redis installation

Redis the deployment

for ease of management, the Redis in the file conf configuration files and common execution commands are moved to the unified file

    • Create bin and etc folder (bin to put common execution commands, etc in the Conf profile )

  

    • Move the file to the new folder

  

  

Execution Redis-server command, start Redis Service

Note: The Redis service, which executes the redis-server boot directly, is run directly in the foreground (as an effect), that is, if LUnix closes the current session after executing the command, the Redis service is closed. Under normal circumstances, starting the Redis service requires booting from the background and specifying a startup configuration file.

Redis is not like other Linux boot daemon, add a "&" at the end of the startup command can solve the problem, he needs to modify the Conf file.

Background Boot Redis Service

First edit the conf file, change the Daemonize property to Yes (indicating that you need to run in the background)

New dump file, process pid,log directory, etc., usually placed in the /var/directory

Modify all Redis hosts to access

Set access password

Start the Redis service again and specify the startup service profile: redis-server/home/dev/redis/etc/redis.conf

Set alias Alias

Finally start your own client test

The action is similar to Memcache, which sets a key value through the client and then takes value out of this key.

Installation and deployment of Redis under Linux

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.