Install the phpredis module extension in Ubuntu. 1. Ensure that redis is installed first, and then install phpredis... 2.download the phpredis-master.tar.gz installation package first... Details: 1.tarzxvfphpredis-master.tar.gz 2. cdphpredis-master/3./opt/lampp/bin/phpize./configure -- wi
Install phpredis module extension in Ubuntu
1. The premise is to install redis first, and then install phpredis...
2.download the phpredis-master.tar.gz installation package first...
The details are as follows:
1. tar zxvf phpredis-master.tar.gz
2. cd phpredis-master/
3./opt/lampp/bin/phpize./configure -- with-php-config =/opt/lampp/bin/php-config
Note the phize and php-config paths. My php is under lampp. The specific path is based on your php path.
4. sudo/opt/lampp/bin/phpize-5.5.15
The following problems may occur when running this step:
Processing ing:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
Cannot find autoconf. Please check your autoconf installation and
$ PHP_AUTOCONF environment variable. Then, rerun this script.
You need to install two things.
5. sudo apt-get install m4
If the following error occurs during installation
Dpkg: error processing package install-info (-- unpack ):
The subprocess has installed the post-installation script and Returns Error 127.
An error occurred during processing:
Install-info
E: Sub-process/usr/bin/dpkg returned an error code (1)
Here is a solution:
How to solve dpkg: error processing install-info
Setting install-info (5.2.0.dfsg.1-2 )...
/Etc/environment: line 2: CLASS_PATH: command not found
Dpkg: error processing package install-info (-- configure ):
The subprocess has installed the post-installation script and Returns Error 127.
E: Sub-process/usr/bin/dpkg returned an error code (1)
Solution:
1. Rename the info Folder: mv/var/lib/dpkg/info/var/lib/dpkg/info_old/
2. Create a new info Folder: mkdir/var/lib/dpkg/info/
3. apt-get update: apt-get update
4. reinstall: apt-get-f install
5. after the previous step is completed, some files are generated in the new info folder. Now, all these files are moved to the info_old Folder: mv/var/lib/dpkg/info/*/var/lib/dpkg/info_old/
6. Delete the newly created info Folder: rm-rf/var/lib/dpkg/info
7. Change the info_old folder back to info: mv/var/lib/dpkg/info_old // var/lib/dpkg/info/
8. reinstall the software to be installed.
Bytes ----------------------------------------------------------------------------------------
Then you can reinstall it to successfully install m4...
6. sudo apt-get install autoconf
If the above 5 problems also occur, the solution is the same as the solution in step 5...
7. sudo/opt/lampp/bin/phpize-5.5.15
8. sudo./configure -- with-php-config =/opt/lampp/bin/php-config
9. sudo make
10. sudo make install
Installing shared extensions:/opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/
The above path is the redis. so path, and then added in php. ini
11. extension = "/opt/lampp/lib/php/extension/ no-debug-non-zts-20121212/redis. so"
Restart the server, or restart php, and run phpinfo. php to check whether the phpredis extension is successfully installed...
Install and test Redis in Ubuntu 14.04Http://www.linuxidc.com/Linux/2014-05/101544.htm
Redis cluster details document http://www.linuxidc.com/Linux/2013-09/90118.htm
Ubuntu 12.10 install Redis (graphic details) + Jedis connection Redis http://www.linuxidc.com/Linux/2013-06/85816.htm
Redis series-installation, deployment, maintenance http://www.linuxidc.com/Linux/2012-12/75627.htm
CentOS 6.3 install Redis http://www.linuxidc.com/Linux/2012-12/75314.htm
Redis installation deployment learning notes http://www.linuxidc.com/Linux/2014-07/104306.htm
Redis configuration file redis. conf detailed description http://www.linuxidc.com/Linux/2013-11/92524.htm
Redis details: Click here
Redis: Click here
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-03/115194.htm