[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");?>