Install phpredis module extension in Ubuntu
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.04
Redis cluster details
Install Redis in Ubuntu 12.10 (graphic explanation) + Jedis to connect to Redis
Redis series-installation, deployment, and maintenance
Install Redis in CentOS 6.3
Learning notes on Redis installation and deployment
Redis. conf
Redis details: click here
Redis: click here