性能优化(根据需要,自己选择,可不做)
安装XCache
sudo apt-get install php5-xcache
root@ubuntu:/home/qii# dpkg -l | grep xcach
ii php5-xcache 1.2.2-5 Fast, stable PHP opcode cacher
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
xcache配置文件路径是
/etc/php5/conf.d/xcache.ini
- 1.
- 2.
编辑php.ini
sudo gedit /etc/php5/apache2/php.ini
- 1.
- 2.
把xcache.ini的内容加入到php.ini。重启apache2
sudo /etc/init.d/apache2 restart
- 1.
- 2.
检查安装是否成功
root@ubuntu:/home/qii# php -v
PHP 5.2.10-2ubuntu6 with Suhosin-Patch 0.9.7 (cli) (built: Oct 23 2009 16:30:10)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with XCache v1.2.2, Copyright (c) 2005-2007, by mOo
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
还有前面info.php页应该有XCache模块
info页面的XCache模块
这里有点奇怪的是,如果不把xcache.ini的内容加入php.ini,apache也能载入XCache,但info.php上没XCache模块。
上一节:LAMP的安装之Zend Optimizer优化 下一节:LAMP的安装之eAccelerator优化
【编辑推荐】