标签:size ext atl fpm 端口 down 交互 inf sof
安装redis服务端
1 进入软件的下载路径
cd /soft
wget http://download.redis.io/redis-stable.tar.gz
tar -zxvf redis-stable.tar.gz
cd redis-stable.tar.gz
make
make install
启动 redis
/usr/local/bin/redis-server /etc/redis/6379.conf
可用netstat –atln 查看端口是启动安装成功
netstat –atln | grep 6379
关闭 Redis
/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 shutdown
/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 进行交互
set name myname
get name
PHP安装redis扩展
2 php 安装 Redis扩展 支持redis
wget https://github.com/nicolasff/phpredis/downloads
tar -zxvf phpredis-2.2.4.tar.gz
cp phpredis-2.2.4 /usr/local/php5.3/ext
cd /usr/local/php5.3/ext/phpredis-2.2.4
/opt/app4www/php5.3/bin/phpize
./configure --with-php-config=/usr/local/php5.3/bin/php-config
make
make install
编辑 php.ini文件 加入
extension=redis.so
重启php-fpm
kill -USR2 `cat /usr/local/php5.3/var/run/php-fpm.pid `
重启 nginx
查看phpinfo里面是否支持了redis
标签:size ext atl fpm 端口 down 交互 inf sof
原文地址:http://www.cnblogs.com/jackspider/p/6058135.html