One: installation of Redis
1, First Officer network download Redis Compressed package, Address:http://redis.io/download Download
2, through the Remote management tool, the compressed package copy to the Linux server, to perform the decompression operation
3. go to Redis directory to perform make to compile files after Redis Decompression
4. after compiling, go to the SRC folder, execute make install for Redis installation, complete installation
II: deployment of Redis
after the installation is successful, the following Redis for Deployment
1, first for the convenience of management, the Redis file configuration files and common commands to move to the unified file.
MKDIR–P/USR/LOCAL/REDIS/{BIN,ETC}
2. Copy the installed redis configuration file and Redis executable to the new directory
CP ~/redis-3.2.6/redis.conf/usr/local/redis/etc
CP ~/redis-3.2.6/src/mkreleasehdr.sh Redis-benchmark redis-check-aof redis-cli redis-server Redis-check-rdb Redis-sentinel redis-trib.rb/usr/local/redis/bin/
3. Start redis-server service
vim/usr/local/redis/etc/redis.conf Modify daemonize change to Yes (allow background boot)
/usr/local/redis/bin/redis-server/usr/local/redis/etc/redis.conf
Three: PHP Extended Redis
Phpredis supports Redis extensions for PHP, PHP calls, and data written to Redis are done through Phpredis.
1, download phpredis,https://github.com/nicolasff/phpredis/downloads
2. Generate Configure file for Phpredis
Unzip Phpredis and enter this directory to execute /usr/local/php/bin/phpize production Configure file
3, implementation ./configure--with-php-config=/usr/local/php/bin/php-config
4, make && make install ( display the following information, indicating that the installation was successful )
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
5. support redis module for PHP expansion
Vi/usr/local/php/etc/php.ini Add
[Redis]
Extension=redis.so
6. restart Nginx and php
Kill–hup ' Cat/usr/local/nginx/log/nginx.pid '
Service php-fpm Restart
Installing Redis and Phpredis modules under Linux