Install the 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:
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">1.tar zxvf phpredis-master.tar.gz </span></span>
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">2.cd phpredis-master/</span></span>
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">3./opt/lampp/bin/phpize ./configure --with-php-config=/opt/lampp/bin/php-config</span></span>
Note the phize and php-config paths. My php is under lampp. The specific path is based on your php path.
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">4.sudo /opt/lampp/bin/phpize-5.5.15</span></span>
The following problems may occur when running this step:
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">Configuring for:PHP Api Version: 20121113Zend Module Api No: 20121212Zend Extension Api No: 220121212Cannot find autoconf. Please check your autoconf installation and the$PHP_AUTOCONF environment variable. Then, rerun this script.</span></span>
You need to install two things.
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">5.sudo apt-get install m4</span></span>
If the following error occurs during installation
<Span style = "color: #33CC00;"> <span style = "background-color: rgb (0, 0, 0);"> dpkg: error processing package install-info (-- unpack): the sub-process has installed the post-installation script, and the error code 127 is returned. An error occurs during processing: install-infoE: sub-process/usr/bin/dpkg returned an error code (1) </span>
There is a solution here: http://blog.csdn.net/hearain528/article/details/44173069
Then you can reinstall it to successfully install m4...
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">6.sudo apt-get install autoconf</span></span>
If the above 5 problems also occur, the solution is the same as the solution in step 5...
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">7.sudo /opt/lampp/bin/phpize-5.5.15 </span></span>
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">8.sudo ./configure --with-php-config=/opt/lampp/bin/php-config</span></span>
<span style="color:#009900;"><span style="background-color: rgb(0, 0, 0);">9. sudo make</span></span>
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">10.sudo make install Installing shared extensions: /opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/ </span></span>
The above path is the redis. so path, and then added in php. ini
<span style="color:#33CC00;"><span style="background-color: rgb(0, 0, 0);">11.extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/redis.so"</span></span>
Restart the server, or restart php, and run phpinfo. php to check whether the phpredis extension is successfully installed...