[Redis] Redis installs test under CentOS, rediscentos_php tutorial

Source: Internet
Author: User

[Redis] Redis installs tests under CentOS, Rediscentos


Download software, use command wget xxx, parameters: URL

For example:

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

Unzip, using command tar, parameters: ZXVF z (gzip attribute), X (decompression), V (Display procedure), F (with file name), filename

For example:

Tar zxvf redis-3.0.0.tar.gz

Switch to the decompression directory for installation

CD redis-3.0.0

Make

The installation is complete at this time, into the directory src, start Redis

Redis-server

Open the client, test it, or src directory, start the client

Redis-cli

entered the Redis Control Panel, using the command set get test

Set name Taoshihan

Get Name

Run extranet access, first temporarily shut down the firewall or, or open 6379 ports of the firewall

Shut down firewall: Service iptables stop

Modify Firewall rule: Edit/etc/sysconfig/iptables file

You can replicate the configuration of other ports, add one line-A input-p tcp-m TCP--dport 6379-j ACCEPT

PHP test

Windows system download PHP extension file

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

Put the Php_redis.dll in the Ext directory, modify the php.ini

Add Extension=php_redis.dll

 
  PHP//  connect to Redis$redis=new  Redis (); $redis->connect (' 192.168.1.113 ', 6379); $redis->set ("name", "Snow Wolf"); Echo $redis->get ("name");? >

http://www.bkjia.com/PHPjc/1122385.html www.bkjia.com true http://www.bkjia.com/PHPjc/1122385.html techarticle [Redis] Redis installs tests under CentOS, Rediscentos downloads software, uses commands wget xxx, parameters: URLs such as: wget http://download.redis.io/releases/ Redis-3.0.0.tar.gz decompression, ...

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