installing redis
download redis
wget http://download.redis.io/releases/redis-2.8.3.tar.gz
Unzip
Tar xzf redis-2.8.3.tar.gz// into the extracted file
CD redis-2.8.3// compilation
Make
Installation Successful
Create a new folder yourself (any location)Mkdir/usr/redis
move redis.conf to the new directory
CP Redis.conf/usr/redis
re-enter the redis installation directory
Cd/redis-2.8.3/src
copy and move the three files to the folder you just created
CP Redis-server Redis-benchmark Redis-cli/usr/redis
End to here , redis installed .
You can test whether the installation was successful
Cd/usr/redis
manually start the redis service and then exit
./redis-server
running the redis client
./redis-cli
Set User root
Get user
Root
-------------
installing the php redis Extension
First download the PHP redis package
Address: Http://pecl.php.net/package/redis
What I download here is:redis-2.2.5.tgz
after the download is successful upload the file to/usr/local/php.
Unzip
TAR-ZXVF phpredis-2.2.5.tgz
Enter the extracted folder
CD phpredis-2.2.5.tgz
generating Configure configuration files with phpize
/usr/local/php/bin/phpize
The contents are as follows
Configuring for:
PHP Api version:20131106
Zend Module Api no:20131226
Zend Extension Api no:220131226
Configuration
./configure--with-php-config=/usr/local/php/bin/php-config
Install compile make
Make install
return content as follows
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
Enter to see if the installation was successful redis.so
cd/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
then configure php.ini
Vim/usr/local/php/etc/php.ini
Join
Extension=redis.so
: Wq
Restart php-fpm and Nginx | | Apache
and check your phpinfo .
Get!!
Installing Redis and Redis extensions under Linux