1
cd /usr/src
2
wget http:
//download.redis.io/releases/redis-2.8.7.tar.gz
1
tar xf redis-2.8.7.tar.gz
2
cd redis-2.8.7
3
make
4
make install
1
mkdir
/etc/redis
2
cp redis.conf /etc/redis/redis.conf
1
echo
“vm.overcommit_memory=1”>>/etc/sysctl.conf
2
# 0,1,2
3
#0 ,
4
#1
5
#2 swap+(vm.overcommit_ratio)% RAM
6
sysctl-p
1
daemonize yes #redis ,no ( )
2
timeout 300 # , 0
3
loglevel verbose # redis
4
logfile stdout # , redis stdout, /dev/null
1
redis-server /etc/redis/redis.conf
1
redis-cli
2
set name jack
3
get name
4
jack
1
wget https:
//github.com/nicolasff/phpredis/archive/master.zip
1
unzip master.zip
2
cd phpredis-master
3
phpize
4
./configure �Cwith-php-config=/usr/bin/php-config
5
make
6
make install
1
vim /etc/php.ini
2
extension=”redis.so”
1
/etc/init.d/httpd restart