Getting Started with Redis (i) System installation

Source: Internet
Author: User
Tags benchmark redis server

Hardware Environment: Thinkpad T450,intel i5-5200u CPU @ 2.20ghzx4, 8GB RAM

Software Environment: Ubuntu 14.04.4 (trusty)

First, Software Installation

#wget http://download.redis.io/releases/redis-2.8.12.tar.gz#tar xzf redis- 2.8. . Tar . GZ#CD Redis-2.8.  A #  Make # sudo  Make Install

After installation, Redis is installed by default into the/usr/local/bin directory with the following information:

[Email protected]:/usr/local/bin$ cd/usr/local/bin[email protected]lsredis-benchmark  redis-check-dump  redis-serverredis-check-aof  redis-cli

The functions of these procedures are as follows:

redis- Server:redis server daemon boot program redis - CLI:redis Command-line Operations tool. You can also use Telnet to manipulate Redis based on its plain text protocol- Benchmark:Redis Performance testing tool to test Redis's read and write performance in the current system Redis -check- aof: data repair Redis -check-dump:Check the Export tool

Second, system and software configuration

Set up the system:

echo vm.overcommit_memory=1 >>/etc/sysctl.confb) sysctl vm.overcommit_memory=  1 or perform echo vm.overcommit_memory=1 >>/proc/sys/vm/overcommit_memory

Where the numeric meaning of the parameter is:

  0, indicates that the kernel will check for sufficient available memory to be used by the process, and if sufficient memory is available, the memory request is allowed; otherwise, the memory request fails and the error is returned to the application process.

  1, which means that the kernel allows all physical memory to be allocated regardless of the current memory state.

  2, which indicates that the kernel allows allocating memory that exceeds the sum of all physical memory and swap space.

Set up Redis so that it can run in the background:

CP ./redis.conf/etc//vi  REDIS.CONFD) Modify daemonize Yes        # to make the process run    in the background 

Third, system start-up and simple test

  Start the Redis service, and note that the configuration file parameter (the default is to read the local configuration file) is followed:

[Email protected]:/usr/local/bin$ cd/usr/local/bin/[email protected]-thinkpad-t450:/usr/local/bin$. Redis-server/etc/redis.conf

Start a client and test the effect:

[Email protected]:/usr/local/bin$./redis-127.0. 0.1:6379> set name victook127.0. 0.1:6379> get name"victo"

Getting Started with Redis (i) System installation

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.