个人工具
登录
查看“Apache”的源代码 - Ubuntu中文
页面
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“Apache”的源代码
来自Ubuntu中文
←
Apache
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
===安装eAccelerator=== <pre>sudo apt-get install php5-dev</pre> 下载 [http://www.eaccelerator.net/ eAccelerator] <pre>wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2</pre> <pre>tar jxvf eaccelerator-0.9.6.1.tar.bz2</pre> <pre>cd eaccelerator-0.9.6.1 </pre> <pre>phpize sudo ./configure -enable-eaccelerator=shared sudo make</pre> <pre>qii@ubuntu:~/tmp/eaccelerator-0.9.6.1$ sudo make install Installing shared extensions: /usr/lib/php5/20060613+lfs/ </pre> 修改php.ini文件,安装为Zend扩展,最好放在开头,放到[zend]之前,免的出莫名其妙的问题: <pre>sudo vi /etc/php5/apache2/php.ini</pre> <pre>[eaccelerator] zend_extension="/usr/lib/php5/20060613+lfs/eaccelerator.so" eaccelerator.shm_size="16" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="0" eaccelerator.shm_prune_period="0" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9" eaccelerator.allowed_admin_path="/var/www/control.php"</pre> 创建cache缓存目录 <pre>eaccelerator.cache_dir="/var/cache/eaccelerator" 这里定义cache路径</pre> 默认值是/tmp/eaccelerator,这非常简单因为任何人都对该目录可写,但是并不明智,因为重启后系统会自动清理该目录。一个更好的地方是/var/cache/eaccelerator。创建该目录并确保它对eAccelerator的使用者可写(通常该用户是你的网络服务器运行者,可能是www-data)。 使用默认值的话这样继续: <pre>mkdir /tmp/eaccelerator</pre> <pre>chmod 777 /tmp/eaccelerator</pre> 改成 /var/cache/eaccelerator的话这样继续,先改php.ini <pre>eaccelerator.cache_dir="/var/cache/eaccelerator" </pre> <pre>sudo mkdir /var/cache/eaccelerator sudo chown root:www-data /var/cache/eaccelerator sudo chmod u=rwx,g=rwx,o= /var/cache/eaccelerator</pre> 复制控制文件control.php到网站根目录 <pre>sudo cp control.php /var/www/htdocs/</pre> 修改control.php的$user和$pw,默认是admin和eAccelerator <pre>sudo vi /var/www/htdocs/control.php </pre> 重启apache <pre>sudo /etc/init.d/apache2 restart</pre> 打开 http://localhost/control.php {| |[[Image:NginxeAcceleratorcontrol.png|thumb|center|500px|eAccelerator control.php页面]] |} 查看之前的info.php页面,有下列字段: <pre>This program makes use of the Zend Scripting Language Engine: Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator </pre>
返回至
Apache
。