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
特网云为您提供高速、稳定、安全、弹性的云计算服务计算、存储、监控、安全,完善的云产品满足您的一切所需,深耕云计算领域10余年;我们拥有前沿的核心技术,始终致力于为政府机构、企业组织和个人开发者提供稳定、安全、可靠、高性价比的云计算产品与服务。公司名:珠海市特网科技有限公司官方网站:https://www.56dr.com特网云为您提供高速、稳定、安全、弹性的云计算服务 计算、存储、监控、安全,完善...
近日华纳云发布了最新的618返场优惠活动,主要针对旗下的免备案香港云服务器、香港独立服务器、香港高防御服务器等产品,月付6折优惠起,高防御服务器可提供20G DDOS防御,采用E5处理器V4CPU性能,10Mbps独享CN2 GIA高速优质带宽,有需要免备案香港服务器、香港云服务器、香港独立服务器、香港高防御服务器、香港物理服务器的朋友可以尝试一下。华纳云好不好?华纳云怎么样?华纳云服务器怎么样?...
关于HostDare服务商在之前的文章中有介绍过几次,算是比较老牌的服务商,但是商家背景财力不是特别雄厚,算是比较小众的个人服务商。目前主流提供CKVM和QKVM套餐。前者是电信CN2 GIA,不过库存储备也不是很足,这不九月份发布新的补货库存活动,有提供九折优惠CN2 GIA,以及六五折优惠QKVM普通线路方案。这次活动截止到9月30日,不清楚商家这次库存补货多少。比如 QKVM基础的五个方案都...