https://blog.csdn.net/u010623954/article/details/80037078
https://www.cnblogs.com/rslai/p/8249812.html
執(zhí)行make test 報(bào)錯(cuò), 為缺少腳本
https://blog.csdn.net/luyee2010/article/details/18766911
redis使用密碼連接
./redis-cli -h 127.0.0.1 -p 6379 -a Passw0rd
安裝redis擴(kuò)展
1吱韭、下載phpredis
cd /usr/local/
git clone?https://github.com/xuanxiaox/phpredis.git
2、安裝
cd phpredis? #進(jìn)入安裝目錄
/usr/local/php/bin/phpize?? #用phpize生成configure配置文件
./configure --with-php-config=/usr/local/php/bin/php-config #配置
make?? #編譯
make install?? #安裝
安裝完成之后,出現(xiàn)下面的安裝路徑
/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/
make test?? #測試
此時(shí)會提示需要配置php.ini文件
3、配置php支持
vim /usr/local/php/etc/php.ini #編輯配置文件怠惶,在最后一行添加以下內(nèi)容
extension="redis.so"
4宰啦、 重啟服務(wù)
sudo service nginx restart
sudo /etc/init.d/php-fpm restart
5、出現(xiàn)以下即安裝成功
1氓栈、警告
WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128
打開
vim /etc/sysctl.conf
添加
net.core.somaxconn= 511
執(zhí)行
sysctl -p
2、警告
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect
打開
vim /etc/sysctl.conf
添加
vm.overcommit_memory = 1
執(zhí)行
sysctl -p