Deployment and startup notes for Redis under Linux

Source: Internet
Author: User

deployment and startup of Redis under Linux
    • Download installation media

Redis website Address: http://www.redis.io/
Currently the latest version is redis-3.0.3.

can access http://download.redis.io/releases/redis-3.0.3.tar.gz download and use SCP to upload to server,

or download directly:

wget http://download.redis.io/releases/redis-3.0.3.tar.gz

    • Unzip and compile

[Email protected]:/data$ tar-zvxf redis-3.0.3.tar.gz

[Email protected]:/data$ CD./redis-3.0.3/

[Email protected]:/data/redis-3.0.3$ make

[Email protected]:/data/redis-3.0.3$ ls
00-releasenotes COPYING Makefile redis.conf runtest-sentinel tests
BUGS deps MANIFESTO runtest sentinel.conf utils
Contributing INSTALL README runtest-cluster src

    • Enter the SRC directory to view the executable file

[Email protected]:/data/redis-3.0.3/src$ ls-f | grep "*"

Copy the executable directly to the/usr/bin/directory and execute the program name directly in the post-operation.
CP Redis-benchmark REDIS-CLI redis-server/usr/bin/
Or directly execute the make install command, you can copy the executable file to the/usr/local/bin directory.

Copy the configuration file under the redis-3.0.3 directory to the/etc/directory
CP redis.conf/etc/

    • Start Redis

You can start Redis by running Redis-server directly.
Redis-server/etc/redis.conf

CTRL + Z switches the service to the background,

Review the process and confirm that Redis is started:

Ps-ef | grep Redis

    • Start your own client test Redis

redis-cli
You can use the ping command to test whether the connection is healthy:
Redis> Ping
PONG

The connection will be answered normally.

You can manipulate the data directly:
Redis> Set name Bingyue
Ok
Redis> Get Name
"Bingyue"

    • Turn off Redis Services

Redis may be synchronizing the in-memory data to the hard disk, forcing the process to terminate may result in data loss.

Use the following command to stop Redis:
redis-cli shutdown

Refer to Linux under Redis installation details Linux Redis installation configuration startup script

Deployment and startup notes for 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.