lnmp1.0 the PHP version is 5.3.17 after the default installation. Upgrade php5.3.x and 5.4.X after two cases, and then perform memcache.sh installation The first one is not a problem. The first step, the second is the problem, then the second step is resolved as follows:
One: If you want to upgrade from php5.3.17 to a new version of 5.3.x, you'll have to reinstall Memcache.
1. execute./upgrade_php.sh, enter the latest version of 5.3.x, and then upgrade complete.
2. then perform memcache.sh installation completed. OK, execute/root/lnmp restart, open memcached.php test OK:
Memcached Server version:1.4.15
Get Key1 Value:this is a
Get
Key1 Value:this is replace value
Get Key2 Value:array ([0] => AAA [1]
=> BBB [2] => CCC [3] => DDD)
Get Key1 Value:
Get Key2 Value:
Two: If you want to upgrade from php5.3.17 to a new version of 5.4.x, you will also have to reinstall Memcache.
1. execute./upgrade_php.sh, enter the latest version of 5.4.x, and then upgrade complete.
2. Modify the memcache.sh in the Lnmp1.0-full bag to find:
printf "=========================== Install memcached ======================n"
echo "Install memcache php extension ..." wget-c http://soft.vpser.net/web/memcache/memcache-3.0.6.tgz tar zxvf memcache-3 .0.6.tgz CD memcache-3.0.6//usr/local/php/bin/phpize./configure–with-php-config=/usr/local/php/bin/php-config Make && make install CD. /
Modified to:
printf "=========================== Install memcached ======================n"
echo "Install memcache php extension ..." wget-c http://pecl.php.net/get/memcache-3.0.8.tgz tar zxvf memcache-3.0.8.tgz cd m emcache-3.0.8//usr/local/php/bin/phpize./configure–with-php-config=/usr/local/php/bin/php-config make && Make install CD. /
Then upload and save, with permission changed to 0755.
3. Final implementation memcache.sh installation completed. OK, execute/root/lnmp restart, open memcached.php test OK:
Memcached Server version:1.4.15 Get Key1 value:this is i-i-key1 value:this is-replace value get Key2 value: Array ([0] => AAA [1] => BBB [2] => CCC [3] => ddd) get Key1 value:get Key2 value:
Summary: Compiler php5.4.x use of the core version of PHP is 20100525, and the military lnmp1.0 Memcache-3.0.6 is compiled using 20090626 version, inconsistent version of PHP can not enable the memcache.so library, so to Memcache-3.0.8, the most After the production environment is still not upgraded to php5.5.x version!