php安装xcache加速

  1. 安装xcache
wget http://xcache.lighttpd.net/pub/Releases/3.1.0/xcache-3.1.0.tar.gz
tar xf xcache-3.1.0.tar.gz
cd xcache-3.1.0
phpize
./configure --with-php-config=/app/php/bin/php-config --enable-xcache  --enable-xcache-optimizer
make && make install

安装完成会出现
Installing shared extensions:    /app/php/lib/php/extensions/no-debug-zts-20100525/

2.   整合php.ini
进入解压xcache-3.1.0的安装目录

cd xcache-3.1.0
cp xcache.ini /etc/php.d

重启httpd生效

service httpd restart

这是进入info页面就可以看到xcache的加载了

3.  开启管理页面

cd cache-3.1.0
cp -r htdocs /www/xcache/
#生成md5加密文件
echo -n "a123b789" | md5sum
9dede0d841a80915fcc94ce628327c5d
#编辑xcache.ini
; use http://xcache.lighttpd.net/demo/cacher/mkpassword.php to generate your encrypted password
xcache.admin.user = "mOo"
xcache.admin.pass = "md5 encrypted password"
更改为
; use http://xcache.lighttpd.net/demo/cacher/mkpassword.php to generate your encrypted password
xcache.admin.user = "user"
xcache.admin.pass = "9dede0d841a80915fcc94ce628327c5d"
#重启apache生效
service httpd restart

打开页面输入用户名密码即可

此条目发表在php分类目录。将固定链接加入收藏夹。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注