Linux under PHP installation memcache
Description
PHP installation directory:/phpstudy/server/php/bin/php
PHP.ini configuration file path:/phpstudy/server/php/etc/php.ini
1. Install the Compilation tool
Yum install wget make gcc gcc-c++ zlib-devel OpenSSL openssl-devel pcre-devel kernel keyutils Patch Perl
2, installation Memcache
CD/USR/LOCAL/SRC #进入软件包存放目录
wget http://pecl.php.net/get/memcache-2.2.6.tgz #下载
Tar zxvf memcache-2.2.6.tgz #解压
CD memcache-2.2.6 #进入安装目录
/phpstudy/server/php/bin/phpize #用phpize生成configure配置文件
./configure--with-php-config=/phpstudy/server/php/bin/php-config #配置
Make #编译
Make install #安装
After the installation is complete, the following interface appears, remembering the following paths, which are used later.
/phpstudy/server/php/lib/php/extensions/no-debug-non-zts-20121212/#memcache模块路径
3. Configure PHP support Memcache
Vi/phpstudy/server/php/etc/php.ini #编辑配置文件, add the following on the last line
Extension=memcache.so
Linux under PHP installation memcache