ubuntu9.10下的eAccelerator
2010年01月14日 - 4 条留言 - 心情杂记 - 浏览:1,464 | 大小:小 中 大 | 繁體 | English | 本文短网址为:http://bit.ly/alGYvu把ubuntu升级到9.10之后,突然发现apache2不监听80端口了。
查看了/var/log/apache2/里面的error.log日志,发现有一条记录:
PHP Warning: [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.10-2ubuntu6.3. Rebuild it for your PHP version (5.2.10-2ubuntu6.4) or download precompiled binaries.\n in Unknown on line 0 PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
那就干脆升级一下eAccelerator吧。截止本文书写之日,eAccelerator最近的版本为 0.9.6-rc1
下载eAccelerator-0.9.6-rc1:http://www.eaccelerator.net/wiki/Release-0.9.6-rc1
wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2
解压缩eAccelerator:
tar jxvf eaccelerator-0.9.6-rc1.tar.bz2进入eAccletator的目录:
cd eaccelerator-0.9.6-rc1/
运行如下几个指令(一行一个指令,等执行完了再输入下一个):
phpize sudo ./configure --enable-eaccelerator=shared sudo make sudo make install
安装好之后,屏幕会显示大概如下信息:
Installing shared extensions: /usr/lib/php5/20060613+lfs/
修改php.ini和建立并设置/var/cache/eaccelerator目录的权限。具体的请看之前的文章:
http://firefore.com/2009/09/installing-eaccelerator-in-ubuntu-server.html
最后步骤:升级control.php文件
eaccelerator-0.9.6-rc1的control.php和我们之前介绍的eaccelerator-0.9.5.3的control.php文件内容已经不同。所以无法继续使用旧版本的control.php文件。
所以,我们先复制新版本的control.php去覆盖掉旧版本的:
sudo cp control.php /var/www/control.php
新版本的control.php默认是无需账号密码即可查看。所以我们对control.php做如下修改:
先用vi指令编辑control.php:
sudo vi /var/www/control.php
大概19-23行的内容如下:
/*** CONFIG ***/ $auth = false; // Set to false to disable authentication $user = "admin"; $pw = "eAccelerator";
为了安全起见,我们把这些修改为:
/*** CONFIG ***/ $auth = true; // Set to false to disable authentication $user = "管理账号"; $pw = "管理密码";
然后保存退出,这样当有人访问control.php的时候,就需要输入管理账号和管理密码了。
然后,老习惯,检查一下apache2的配置和重新一下apache2:
apache2ctl configtest sudo /etc/init.d/apache2 restart
如果没看到错误信息,基本大功告成了。
本日志作为:施炜煜
原文地址:http://firefore.com/2010/01/ubuntu9-10-eaccelerator.html
原文链接:http://firefore.com/2010/01/ubuntu9-10-eaccelerator.html
发布于:2010年01月14号 最后修订在:2010年06月24号
版权声明:转载时请以超链接形式标明文章原始出处和作者信息。
读过这篇日志的读者同时也读了:
>欢迎您的来访。喜欢这篇文章么? 发表一下您的看法 好让我们能交流交流一下。
>建议您 订阅这里的RSS,这样您及时地获取更多精彩内容!
>Permalink:http://firefore.com/2010/01/ubuntu9-10-eaccelerator.html
>Trackback Address:http://firefore.com/2010/01/ubuntu9-10-eaccelerator.html/trackback
博客CLURIES'由于某些原因更换了域名,并且老域名intgu.com也无法添加附加域做301定向
更换域名为cuies.com
麻烦更新下
谢谢~~
^^
大家都換了好好的域名哦。羡慕啊~已經更換完畢。
我是逼不得已·~
不懂。。