CentOs5.2本身带的php版本是5.1.6,是一个非常稳定、快速的版本,
但可惜的是不支持elerator的代码加密功能。
经试验:php5.0.4+elerator-0.9.3是比较好的组合。
先在CentOs5.2的包管理器中卸掉php5.1.6的相关包。
以下是http,php,mysql的缺省目录: /usr/lib/httpd /usr/lib/php /usr/lib/mysql
安装如下:
=================================================
1.系统自带了httpd2 , 需要在上面装一个定制的module ,却发现找不到apxs 是因为apxs是rpm包httpd-devel里所带的 , 安装如下包: #yum install httpd-devel
2.安装如下包,否则libiconv包不能编译通过,会有提示 configure: error: C preprocessor "/lib/cpp" fails sanity check 安装如下包: #yum install glibc-headers #yum install -c
3.安装libiconv包 # tar zxvf libiconv-1.12.tar.gz # ./configure --prefix=/usr/local # make # make install
4.安装libmcrypt-2.5.7.tar.gz ./configure make make install
5.编译php5.0.5 # tar zxvf php-5.0.4.tar.gz # cd php-5.0.4
# ./configure --prefix=/usr/lib/php --with-mysql=/usr/lib/mysql --with-apxs2=/usr/sbin/apxs --enable-sockets --enable-mbstring=all --with-mcrypt --with-zlib --with-iconv=/usr/local --with-gd --with-mysqli --enable-module=so --enable-cli
# make # make install # cp php.ini-dist /usr/lib/php/lib/php.ini
make install时 cannot restore segment prot after reloc: Permission denied
编辑/etc/sysconfig/selinux,找到: # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=enforcing
如果SELINUX已经是 SELINUX=disabled,那么就不用改了,否则就把SELINUX=enforcing 注释掉,新加一行:
SELINUX=disabled 保存,退出。
如果把SELinux关闭后还是不行. 在你保证SElinux 被disable后.还执行下 chcon -t texrel_shlib_t 如: chcon -t texrel_shlib_t /路径/路径/名字.so (这个文件视具体执行文件.)
chcon -t texrel_shlib_t /usr/share/mysql/lib/libmysqlclient.so.15
==========================================
elerator-0.9.3 安装方法:
1.先备准好PHP cd /usr/lib/php/bin cp * /bin
2. phpize ./configure make
make install 显示 [root@localhost elerator-0.9.3]# make install Installing shared extensions: /usr/lib/php/lib/php/extensions/no-debug-non-zts-20041030/
[root@localhost php-5.0.4]# cp php.ini-dist /usr/lib/php/lib/php.ini 修改php.ini ;extension=php_zip.dll
zend_extension="/usr/lib/php/lib/php/extensions/no-debug-non-zts-20041030/elerator.so" elerator.shm_size="16" elerator.cache_dir="/tmp/elerator" elerator.enable="1" elerator.optimizer="1" elerator.check_mtime="1" elerator.debug="0" elerator.filter="" elerator.shm_max="0" elerator.shm_ttl="0" elerator.shm_prune_period="0" elerator.shm_only="0" press="1" press_level="9"
[root@localhost myweb]# cp php.ini /usr/lib/php/lib/php.ini
3.
mkdir /tmp/elerator chmod 0777 /tmp/elerator
windows下的elerator见: elerator/index.php?eaver=0.9.3
美得云怎么样?美得云好不好?美得云是第一次来推广软文,老板人脾气特别好,能感觉出来会用心对待用户。美得云这次为大家提供了几款性价比十分高的产品,美国cera 2核4G 15元/月 香港1核 1G 3M独享 15元/月,并且还提供了免费空间给大家使用。嘻嘻 我也打算去白嫖一个空间了。新用户注册福利-8折优惠码:H2dmBKbF 截止2021.10.1结束。KVM架构,99.99%高可用性,依托BGP...
ucloud6.18推出全球大促活动,针对新老用户(个人/企业)提供云服务器促销产品,其中最低配快杰云服务器月付5元起,中国香港快杰型云服务器月付13元起,最高可购3年,有AMD/Intel系列。当然这都是针对新用户的优惠。注意,UCloud全球有31个数据中心,29条专线,覆盖五大洲,基本上你想要的都能找到。注意:以上ucloud 618优惠都是新用户专享,老用户就随便看看!点击进入:uclou...
亚洲云Asiayun怎么样?亚洲云Asiayun好不好?亚洲云成立于2021年,隶属于上海玥悠悠云计算有限公司(Yyyisp),是一家新国人IDC商家,且正规持证IDC/ISP/CDN,商家主要提供数据中心基础服务、互联网业务解决方案,及专属服务器租用、云服务器、云虚拟主机、专属服务器托管、带宽租用等产品和服务。Asiayun提供源自大陆、香港、韩国和美国等地骨干级机房优质资源,包括B...