Installation of Redis under Linux

Source: Internet
Author: User
Tags install redis

Part I: Installing Redis

Want to install Redis to this directory
/usr/local/redis

You want to download the installation package to this directory
/usr/local/src

The installation process instructions are as follows:

Mkdir/usr/local/redis

Cd/usr/local/src

wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz #将已经下载好的文件压缩包放到指定的目录

Tar xzf redis-2.6.14.tar.gz #解压缩文件包

Ln-s redis-2.6.14 Redis #建立一个链接

CD Redis

Make Prefix=/usr/local/redis Install #安装到指定目录中

CP redis.conf/usr/local/redis/etc/#将redis的配置文件移动到指定的目录

Note the last line above, we specified the installed directory through prefix. If make fails,
In general, GCC is not installed in your system, so you can install it via yum:

Yum install GCC #安装完成后 and continue with make.

After you have successfully installed Redis, you will be able to see a bin directory in/usr/local/redis,
The following documents are included:

Redis-benchmark
Redis-check-aof
Redis-check-dump
Redis-cli
Redis-server

#Redis默认不是以守护进程的方式运行, you can enable the daemon with Yes by modifying the configuration item
Last modified redis.conf change daemonize No to daemonize Yes

./redis-server/usr/local/redis/etc/redis.conf #运行redis (Boot configuration)

Turn off Redis
REDIS-CLI shutdown
Redis-cli-p 6379 shutdown

Ps-ef | grep Redis #查看redis的进程是否启动了

NETSTAT-TUNPL | grep 6379 #查看此端口的运行情况

Installation 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.