性能优化(根据需要 自己选择可不做)
安装eAccelerator
1. sudo apt-get install php5-dev
2.
下载eAcceleratorwgethttp://bart.eaccelerator.net/source/0.9.6. 1/eaccelerator-0.9.6. 1. tar.bz2tar jxvf eaccelerator-0.9.6. 1. tar.bz2cd eaccelerator-0.9.6. 1phpize
1. sudo ./configure -enable-eaccelerator=shared sudo make qii@ubuntu:~/tmp/eaccelerator-0.9.6. 1___FCKpd___1nbsp;sudo make install
Installing shared extensions: /usr/lib/php5/20060613+lfs/
2.
修改php. ini文件安装为Zend扩展最好放在开头放到[zend]之前免的出莫名其妙的问题
1. sudo vi /etc/php5/apache2/php. ini
2.
[eaccelerator]
1. zend_extension="/usr/lib/php5/20060613+lfs/eaccelerator. so"
2.
3. eaccelerator. shm_size="16"
4.
5. eaccelerator.cache_dir="/tmp/eaccelerator"
6.
7. eaccelerator.enable="1"
8.
9. eaccelerator.optimizer="1"
10.
11. eaccelerator.check_mtime="1"
12.
13. eaccelerator.debug="0"
14.
15.eaccelerator.filter=""
16.
17. eaccelerator. shm_max="0"
18.
19. eaccelerator. shm_ttl="0"
20.
21. eaccelerator. shm_prune_period="0"
22.
23. eaccelerator. shm_only="0"
24.
25. eaccelerator.compress="1"
26.
27. eaccelerator.compress_level="9"
28.
29.eaccelerator.allowed_admin_path="/var/www/control.php"
30.
创建cache缓存目录eaccelerator.cache_dir="/var/cache/eaccelerator"这里定义cache路径默认值是/tmp/eaccelerator这非常简单因为任何人都对该目录可写但是并不明智 因为重启后系统会自动清理该目录。一个更好的地方是
/var/cache/eaccelerator。创建该目录并确保它对eAccelerator的使用者可写(通常该用户是你的网络伺服器运行者 可能是www-d a t a) 。使用默认值的话这样继续
1. mkdir /tmp/eaccelerator
2.
3. chmod 777 /tmp/eaccelerator
4.
改成/var/cache/eaccelerator的话这样继续先改php. inieaccelerator.cache_dir="/var/cache/eaccelerator"
1. sudo mkdir /var/cache/eaccelerator
2.
3. sudo chown root:www-data /var/cache/eaccelerator
4.
5. sudo chmod u=rwx,g=rwx,o= /var/cache/eaccelerator
6.
复製控制文件control.php到网站根目录
1. sudo cp control.php /var/www/htdocs/
2.
修改control.php的$user和$pw默认是admin和eAccelerator
1. sudo vi /var/www/htdocs/control.php
2.
重启apache
1. sudo /etc/init.d/apache2 restart
2.
打开http://localhost/control.php
eAccelerator control.php页面
查看之前的info.php页面有下列字段
This program makes use of the Zend Scripting Language Engine:Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologieswith eAccelerator v0.9.6. 1, Copyright (c) 2004-2010 eAccelerator, byeAccelerator
华纳云(HNCloud Limited)是一家专业的全球数据中心基础服务提供商,总部在香港,隶属于香港联合通讯国际有限公司,拥有香港政府颁发的商业登记证明,保证用户的安全性和合规性。 华纳云是APNIC 和 ARIN 会员单位。主要提供数据中心基础服务、互联网业务解决方案, 以及香港服务器租用、香港服务器托管、香港云服务器、美国云服务器,云计算、云安全技术研发等产品和服务。其中云服务器基于成熟的 ...
justhost.ru官方来消息说已经对网络进行了比较全面的优化,针对中国电信、联通、移动来说,4个机房总有一个适合中国用户,让站长进行一下测试,这不就有了这篇有关justhost的VPS的第四次测评。本帖主要关注的是网络,对于其他的参数一概不管! 官方网站:https://justhost.ru 最低配VPS:8.3元/月,KVM,512M内存,5G硬盘,200M带宽,不限流量 购买链接:...
提速啦的来历提速啦是 网站 本着“良心 便宜 稳定”的初衷 为小白用户避免被坑提速啦的市场定位提速啦主要代理市场稳定速度的云服务器产品,避免新手购买云服务器的时候众多商家不知道如何选择,妮妮云就帮你选择好了产品,无需承担购买风险,不用担心出现被跑路 被诈骗的情况。提速啦的售后保证提速啦退款 通过于合作商的友好协商,云服务器提供3天内全额退款,超过3天不退款 物理机部分支持当天全额退款提速啦提现 充...