ubuntu14.04 Installing Redis

Source: Internet
Author: User
Tags redis redis server

Transferred from: http://blog.csdn.net/gebitan505/article/details/17076333

1. Access to Redis source code

Http://redis.io

2. Unzip, set permissions

3.make & make install (optional, if install is executed, REDIS-SERVER,REDIS-CLI will be generated into/usr/local/bin)

4. Copy the key files to the target directory

# CP redis.conf/etc/
# CD SRC
# CP Redis-benchmark REDIS-CLI redis-server/usr/bin/

5. Start the service and verify

After starting Redis, we see a warning message and we follow the prompts to

vm.overcommit_memory = 1

Append to

/etc/sysctl.conf

End of File and execute

sysctl Vm.overcommit_memory=1

Command

Restart Redis, no more warnings, everything OK:

Verify the startup status, everything is OK:

6. Simple test with Telnet

Use Telnet to connect to Redis and perform a simple command to test.

Note: To open a new window, just the server window is running Redis-server



The following is a simple command to test (note: Here the SET command format is set key value ) (you can also use the REDIS-CLI set Key1 value1 to set the key/value pair)


7. Close the service

The Redis Server service can be shut down by command redis-cli shutdown (you can also use Redis-cli-p 6397 shutdown off)

After the command is executed, the server window displays:


Attached: Redis boot: redis-server/etc/redis.conf using: redis-cli client or telnet localhost 6379 OFF: Use shutdown in the REDIS-CLI client to turn off the Redis service or use the kill-9 PID

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.