Installation of Redis on Linux

Source: Internet
Author: User
Tags install redis

1. Installation of Redis on Linux

1) Install the Redis-compiled C environment, yum install gcc-c++

2) upload the redis-2.6.16.tar.gz to the Linux system

3) extract to /usr/local under TAR-XVF redis-2.6.16.tar.gz-c/usr/local

4) Enter the redis-2.6.16 directory using the Make command to compile Redis

5) Install Redis into/usr/local/redis using the Make Prefix=/usr/local/redis Install command in the redis-2.6.16 directory

6) Copy the redis.conf in redis-2.6.16 to the installation directory Redis

7) start Redis to execute commands under bin Redis-server redis.conf

8) If you need to remotely connect to Redis, you need to configure Redis port 6379 to be developed in the Linux firewall

/sbin/iptables-i input-p TCP--dport 6379-j ACCEPT

/etc/rc.d/init.d/iptables Save

after starting to see the Welcome page as above, but this window cannot be closed, the window closes and the Redis is considered closed (class like Tomcat through the bin of the Startup.bat Way)

Solution: You can modify the configuration file by Configure Redis background boot, where the server starts but does not wear a console window

Modify the Daemonize in the redis.conf file from false to true to indicate background startup

Use the command to see if Port 6379 starts Ps-ef | grep Redis








Cd/usr/local/redis/bin

Ls

./redis-cli

Set username Zhangsan

Get username

Installation of Redis on 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.