WDlinux官方论坛's Archiver

红领巾 发表于 2015-11-26 20:07

wdcp升级php5.4后安装官方eAccelerator最新版本教程

[i=s] 本帖最后由 红领巾 于 2015-11-26 20:13 编辑 [/i]

这是我来wdcp第一次写教程哈、
我也是昨天折腾过后安装成功了,我也是小白一个。
首先从官方下载最新版本的eAccelerator
官方:http://eaccelerator.net/
github:https://github.com/eaccelerator/eaccelerator
我已经尝试  可以使用wget 下载,不过下载过后要给文件添加一个后缀就可以使用了。
解压我就不用说了吧。
zip解压命令:unzip 文件名.zip
tar解压命令:tar jxvf 文件名.tar.bz2
解压好之后进入第二。[code][root@ home]# cd eaccelerator-eaccelerator-42067ac/[/code]配置步骤:[code][root@ eaccelerator-eaccelerator-42067ac]# /www/wdlinux/apache_php/bin/phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525[/code]apache_php是一个连接文件,就是快捷方式,就不用去输入php后面的版本号了。[code][root@ eaccelerator-eaccelerator-42067ac]# ./configure --enable-eaccelerator=shared --with-php-config=/www/wdlinux/apache_php/bin/php-config --with-eaccelerator-shared-memory
configure: WARNING: unrecognized options: --with-eaccelerator-shared-memory[/code]然后是上面这一步配置php路径。这是官方给的编辑代码,会报错。这个报错的意思是提示–with-eaccelerator-shared-memory是一个无效的指令。
因为我是从wdcp论坛找到的相关编译命令。看到官方的也差不多就拿过来用,其实这个就是配置php的路径。
提示无效就删掉--with-eaccelerator-shared-memory不要了。在执行一遍。
最后马克一下就看到已经OK了。[code][root@ eaccelerator-eaccelerator-42067ac]# make

----------------------------------------------------------------------
Libraries have been installed in:
   /home/eaccelerator-eaccelerator-42067ac/modules
............................省略了
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.     建立完整的。
Don't forget to run 'make test'.    别忘了测试运行。[/code]最后的最后php.ini[code]zend_extension="/www/wdlinux/apache_php-5.4.26/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so"[/code]这个路径可以  马克install 查看到。[code]eaccelerator.cache_dir="/www/wdlinux/eaccelerator_cache"[/code]这个缓存路径可以随意设置。[code][eaccelerator]
zend_extension="/www/wdlinux/apache_php-5.4.26/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so"
eaccelerator.shm_size="1"
eaccelerator.cache_dir="/www/wdlinux/eaccelerator_cache"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="3600"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.keys = "disk_only"
eaccelerator.sessions = "disk_only"
eaccelerator.content = "disk_only"[/code]创建缓存文件夹。mkdir,然后重启服务[code][root@ wdlinux]# mkdir eaccelerator_cache
[root@ /]# service httpd restart[/code]安装结果
[attach]5665[/attach]
查看缓存效果[code][root@ wdlinux]# cd eaccelerator_cache/
[root@ eaccelerator_cache]# ls
1000
[root@ eaccelerator_cache]# cd 1000/
[root@ 1000]# ls
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
[root@ 1000]# cd 0
[root@ 0]# ls
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
[root@ 0]# cd 0
[root@ 0]# ls
eaccelerator-0048c9a1386c970bdc8043077351996f[/code]更详细的可以到我博客里看看。
地址:http://www.nnbbxx.net/post-4282.html
本教程原创。本人的安装过程。我留个连接管理不要打我[attach]5666[/attach]

红领巾 发表于 2015-11-26 20:12

把apache_php改成php也可以,因为他们都是链接文件。都是连接到php5.4的。

zhuxiaolei87 发表于 2016-3-19 12:46

小白看不懂

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.