###注意:运行\"/usr/local/memcache/bin/memcached \"时有类似以下错误提示
/usr/local/memcache/bin/memcached : error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
##64位系统解决办法:
ln -s /usr/local/libevent/lib/libevent-1.4.so.2 /usr/lib64/libevent-1.4.so.2
##32位系统解决办法:
ln -s /usr/local/libevent/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2
###安装Memcache的PHP扩展###
##PECL官网:http://pecl.php.net
cd /opt/distfiles
wget -c http://pecl.php.net/get/memcache-2.2.3.tgz
tar zxvf memcache-2.2.3.tgz
cd memcache-2.2.3
/opt/modules/phpcgi/bin/phpize
##注意:如果运行后有以下错误提示,需要安装autoconf automake,apt-get install autoconf automake
/opt/modules/phpcgi/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No:20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.
./configure --enable-memcache --with-zlib-dir --with-php-config=/opt/modules/phpcgi/bin/php-config
make && make install
##配置php.ini
vi /opt/modules/phpcgi/lib/php.ini
将extension_dir = \"./\" 修改为 extension_dir = \"/opt/modules/phpcgi/lib/php/extensions/no-debug-non-zts-20060613\"
然后在下面添加:
extension=\"memcache.so\"
##重起web服务查看info.php memcached是否加载
###memcachedb安装
wget -c http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz
cd db-4.7.25/build_unix
../dist/configure
make && make install
#将Berkeley Db运行库的路径添加到系统配置里面
echo \"/usr/local/BerkeleyDB.4.7/lib/\" >> /etc/ld.so.conf
#重载系统Ld运行库
ldconfig
###注意:运行\"/usr/local/memcache/bin/memcached \"时有类似以下错误提示
/usr/local/memcache/bin/memcached : error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
##64位系统解决办法:
ln -s /usr/local/libevent/lib/libevent-1.4.so.2 /usr/lib64/libevent-1.4.so.2
##32位系统解决办法:
ln -s /usr/local/libevent/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2
###安装Memcache的PHP扩展###
##PECL官网:http://pecl.php.net
cd /opt/distfiles
wget -c http://pecl.php.net/get/memcache-2.2.3.tgz
tar zxvf memcache-2.2.3.tgz
cd memcache-2.2.3
/opt/modules/phpcgi/bin/phpize
##注意:如果运行后有以下错误提示,需要安装autoconf automake,apt-get install autoconf automake
/opt/modules/phpcgi/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No:20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.
./configure --enable-memcache --with-zlib-dir --with-php-config=/opt/modules/phpcgi/bin/php-config
make && make install
##配置php.ini
vi /opt/modules/phpcgi/lib/php.ini
将extension_dir = \"./\" 修改为 extension_dir = \"/opt/modules/phpcgi/lib/php/extensions/no-debug-non-zts-20060613\"
然后在下面添加:
extension=\"memcache.so\"
##重起web服务查看info.php memcached是否加载
###memcachedb安装
wget -c http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz
cd db-4.7.25/build_unix
../dist/configure
make && make install
#将Berkeley Db运行库的路径添加到系统配置里面
echo \"/usr/local/BerkeleyDB.4.7/lib/\" >> /etc/ld.so.conf
#重载系统Ld运行库
ldconfig
###注意:运行\"/usr/local/memcache/bin/memcached \"时有类似以下错误提示
/usr/local/memcache/bin/memcached : error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
##64位系统解决办法:
ln -s /usr/local/libevent/lib/libevent-1.4.so.2 /usr/lib64/libevent-1.4.so.2
##32位系统解决办法:
ln -s /usr/local/libevent/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2
###安装Memcache的PHP扩展###
##PECL官网:http://pecl.php.net
cd /opt/distfiles
wget -c http://pecl.php.net/get/memcache-2.2.3.tgz
tar zxvf memcache-2.2.3.tgz
cd memcache-2.2.3
/opt/modules/phpcgi/bin/phpize
##注意:如果运行后有以下错误提示,需要安装autoconf automake,apt-get install autoconf automake
/opt/modules/phpcgi/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No:20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.
./configure --enable-memcache --with-zlib-dir --with-php-config=/opt/modules/phpcgi/bin/php-config
make && make install
##配置php.ini
vi /opt/modules/phpcgi/lib/php.ini
将extension_dir = \"./\" 修改为 extension_dir = \"/opt/modules/phpcgi/lib/php/extensions/no-debug-non-zts-20060613\"
然后在下面添加:
extension=\"memcache.so\"
##重起web服务查看info.php memcached是否加载
###memcachedb安装
wget -c http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz
cd db-4.7.25/build_unix
../dist/configure
make && make install
#将Berkeley Db运行库的路径添加到系统配置里面
echo \"/usr/local/BerkeleyDB.4.7/lib/\" >> /etc/ld.so.conf
#重载系统Ld运行库
ldconfig