All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
一个获取SQL Server数据字典的经典SQL语句_[SQL Server教程]
XMLHTTP 对象及其方法简介_[XML教程]
MSSQL2005,SYS.SYSPROCESSES使用--整理帖_mssql学习_编程技术
实例讲解动态网页技术PHP开发文件系统_php资料_编程技术
[delphi语法3]布尔类型的使用方法
PHP技巧:一个页面执行时间类_[PHP教程]
Delphi非矩形窗体
PHP成为中国应用最广的网页编程语言_php资料_编程技术
PHP技巧:PHP脚本中关于拼写检查函数库_php资料_编程技术
delphi列表视图组件(TListView)使用方法
Reading number is top 10 pictures
A man's favorite things9
2012 national geographic daily picture6
Sora aoi calligraphy show
传奇套装
黑社会大哥相亲
This is heaven to some path
Average female college students2
看到这名字我也是醉了。。。。。。
NeedWallpaper2
Compared GDP and per capita income in China for 40 years
Download software ranking
打鸟视频
VC++6.0培训教程
White deer villiage
Unix video tutorial4
Professional killers2 for Android
虚拟机5.5.3版
Boxer Classic video3
美女写真2
功夫熊猫2(下集)
Tram sex maniac 2 (H) rar bag5
aaa published in(发表于) 2013/12/24 5:48:37 Edit(编辑)
Linux系统上把PHP编译进Apache静态内核_php资料_编程技术

Linux系统上把PHP编译进Apache静态内核_php资料_编程技术

Linux系统上把PHP编译进Apache静态内核_php资料_编程技术-你的首页-uuhomepage.com







说明:Apache整合PHP有两种方式:一种是DSO模式,把PHP当作Apache的外部模块来调用,这样增加了Apache的灵活性,但会带来5%的性能降低;另一种方式是把PHP编译进Apache的内核,这样牺牲了以后调整的灵活性(每次对PHP的重新编译,都需要再次编译Apache),但性能会高一些。对Perl也是如此。相比之下,本人更愿意使用第二种方式,即把PHP编译进Apache的静态内核。





一.编译Apache:





1. 进入Apache展开目录;





2. ./configure - -prefix=/usr/local/apache1.3 - -disable-module=all\


- -enable-module=access - -enable-module=log_config \


- -enable-module=dir - -enable-module=mime \ ##Apache工作的基本模块


(说明:如果以后使用DSO方式,则编译时加上 - -enable-mdule=so)





二.安装PHP:





1. 进入PHP展开目录;





2. ./configure - -prefix=/usr/local/php4 \


- -with-apache=../apache_1.3.27 ##这里指定Apache的源代码目录


3. make;make install





三.安装Apache:





1. 进入Apache展开目录;





2. ./configure - -prefix=/usr/local/apache1.3 - -disable-module=all \


- -enable-module=access - -enable-module=log_config \


- -enable-module=dir - -enable-module=mime \


- -activate-module=src/modules/php4/libphp4.a ##把PHP模块编译进去





3. make;make install





四。配置Apache:


修改httpd.conf文档:


1.Timeout 300--->Timeout 120


2.MaxKeepAliveRequests 100


3.KeepAliveTimeout 5


4.ServerSignature on--->ServerSignature off


5.Options Indexes FollowSymLinks 行把indexes删掉(目录的Options不要带index选项)


6.将Apache运行的用户和组改为nobody


7.MaxClients 150——>MaxClients 1500


(该参数是多少有一个基本的算法,例如2G的机器,一个Apache+PHP进程大概消耗4M内存,则最高效率的进程数为2g/4m * 2=1000,最大进程数为1000*1.5=1500;1.3下要调整到高于256须在编译Apache前修改其源代码)


(对apache2.0版本,将worker MPM字段里的MaxClients 150——>MaxClients 1500)


8.DirectoryIndex index.html index.html.var 后面加上index.php


9.查找包含大量AddType命令的小节,添加下面这一行: AddType application/x-httpd-php .php





Apache版本:Apache-2.0.47


PHP版本:PHP-4.3.2





a.安装Apache:


进入Apache安装目录;


./configure - -prefix=/usr/local/apache2 - -enable-so


make;make install


b.安装PHP:


进入PHP安装目录;


./configure - -prefix=/usr/local/php4 -


-with-apxs2=/usr/local/apache2/bin/apxs


make;make install


c.配置Apache:


修改httpd.conf,上述配置工作照做;


另外修改的地方:


LoadModule php4_module modules/libphp4.so (这一项在装完php后会自动添加)


AddType application/x-httpd-php .php (这一项手工添加)




























添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.