[Redis] install and test redis in centos-Tao Shihan

Source: Internet
Author: User
[Redis] install and test redis in centos-download software from taoshihan and run the wget xxx command. parameter: url

For example:

Wget http://download.redis.io/releases/redis-3.0.0.tar.gz

Decompress and run the tar command. parameters: zxvf z (gzip attribute), x (decompression), v (Display process), f (file name used), and file name

For example:

Tar zxvf redis-3.0.0.tar.gz

Switch to the decompressed directory for installation.

Cd redis-3.0.0

Make

Now the installation is complete. go to the src directory and start redis.

Redis-server

Open the client, perform the test, or the src directory to start the client

Redis-cli

Go to the redis control panel and run the set get command to test

Set name taoshihan

Get name

To run Internet access, temporarily disable the firewall or, or open the firewall's port 6379.

Disable firewall: service iptables stop

Modify firewall rules: Edit the/etc/sysconfig/iptables file.

You can copy the configurations of other ports and modify them to add A line-a input-p tcp-m tcp -- dport 6379-j ACCEPT.

Php testing

Download php extension files in windows

: Http://windows.php.net/downloads/pecl/releases/redis/2.2.7/php_redis-2.2.7-5.6-ts-vc11-x64.zip

Put php_redis.dll in the ext directory and modify php. ini.

Add extension = php_redis.dll

 Connect ('2017. 168.1.113 ', 6379); $ redis-> set ("name", "Snow Wolf"); echo $ redis-> get ("name");?>

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.