⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 993.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  
  <TR>
    <TD vAlign=top>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=296 
          border=0></TD>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=76 
border=0></TD>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=100 
          border=0></TD>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=98 
border=0></TD>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=79 
border=0></TD>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=103 
          border=0></TD>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=26 
border=0></TD>
          <TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 
        border=0></TD></TR>
        <TR>
          <TD colSpan=3><A title=linux知识宝库 
            href="index.html" tppabs="http://www.linuxhero.com/docs/index.html"><IMG height=83 
            src="images/header_r1_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c1.gif" width=472 border=0 
            name=header_r1_c1></A></TD>
            <TD colSpan=3>
              <form action="http://www.linuxhero.com/docs/search.html" method=get>
                <table 
                        style="BORDER-RIGHT: #c4c4c4 1px solid; BORDER-TOP: #c4c4c4 1px solid; BORDER-LEFT: #c4c4c4 1px solid; BORDER-BOTTOM: #c4c4c4 1px solid" 
                        cellspacing=0 cellpadding=3 width="95%" border=0 align="center">
                  <tbody> 
                  <tr> 
                    <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"> 
                      <div align=center><font class=normalfont>搜索文章: 
                        <input type=hidden value=result name=action2>
                          <input type=radio checked value=title name=type>标题 
                          <input type=radio value=content name=type>内容 
                          <input type=image src="images/button_go.gif" tppabs="http://www.linuxhero.com/docs/images/button_go.gif" border=0 name=image2>
                        </font></div>
                    </td>
                  </tr>
                  <tr> 
                    <td noWrap> 
                      <div align="center"> 
                        <input maxlength=100 size=30 name=keyword2>
                      </div>
                    </td>
                  </tr></tbody> 
                </table>
              </form>
            </TD>
            <TD rowSpan=2><IMG src="images/header_r1_c7.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c7.gif" width=26 border=0 name=header_r1_c7></TD>
          <TD><IMG height=83 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 border=0></TD></TR>
        <TR>
          <TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"><IMG height=22 
            src="images/header_r2_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r2_c1.gif" width=296 border=0 
            name=header_r2_c1></TD>
          <TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colSpan=5>
              <DIV align=right><FONT class=normalfont>当前位置: 
              <A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
              <font color="#FF6699">&gt;&gt;</font>
<A href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</A>                 | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
            </TD>
          <TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 
        border=0></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff 
        border=0>
         <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
              
              <TR>
                <TD vAlign=top align=middle width="60%">
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                  background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
                    <TBODY>
                    <TR>
                        <TD vAlign=top width="80%"> 
                          <DIV align=center>
                        <FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
                            </FORM>
                        <TABLE cellSpacing=0 cellPadding=0 width="95%" 
                          border=0><TBODY>
                          <TR>
                            <TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif" 
                          height=30></TD></TR></TBODY></TABLE>
                        <TABLE cellSpacing=0 cellPadding=3 width="95%" 
                        align=center border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=3 width="100%" 
                              border=0>
                                <TBODY>
                                <TR>
                                      <TD vAlign=top> 
<p><FONT class=normalfont><B><font color=blue>使用Kylix3开发Apache DSO</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:侯光敏 (wearebug@etang.com)<br>来自:Linux知识宝库<br>联系方式:无名<br><br>2003 年 1 月<br>
kylix是linux下非常好的集成开发工具(个人认为是windows程序员转向Linux最适合的),前一段工作中使用Kylix3进行了Apache动态共享对象(DSO)的开发,在开发工作中遇到了许多的问题,经过摸索一一解决了,有些经验给大家共享,以免后来者走弯路。<br>
<br>
为什么要采用DSO<br>
最重要的原因是效率。Apache是模块化设计的,所以它可以加载各种各样的服务器端脚本解释器来支持动态的网页。我以前开发的是cgi,但是随着页面访问量的增大,cgi已经不看重负,我需要提高效率。由于原有的代码量很大,我基本上不可能重新写php或者jsp来代替他们,所以我选择了把最常调用的模块编译成动态共享对象(DSO).。<br>
<br>
还有一个原因,cgi程序是短连接,不能保存用户的状态信息,如果采用常驻内存的DSO,那么这个问题也可以迎刃而解了。<br>
<br>
很重要的版本问题<br>
用kylix开发DSO过程中的版本问题是非常重要的。开源的Apache更新的很快,Apache 1.*版本和2.*版本的DSO格式是不一样的,一定要考虑到。Delphi6/kylix2编译出来的DSO是对应Apache 1.*版本的。我使用的是kylix3和Apache2.0.43,Borland的官方网站上说kylix3不支持Apache2 的DSO,这让我郁闷了很长时间。后来知道了Delphi7支持Apache2的消息,而Delphi7的CLX技术是跨平台的,这让我找到了解决的办法。<br>
<br>
Delphi7的DSO2工程里要引用HTTPD2、ApacheTwoHTTP和ApacheTwoApp(DSO1对应的是HTTP、ApacheHTTP和ApacheApp),那么我就将Delphi7安装目录下源代码目录中对应的pas文件拷贝出来,存放到kylix3的源代码目录下然后编译。我查看过源代码,里面有跨平台条件编译的符号,所以这种做法是可行的。<br>
<br>
模块的工作原理<br>
Apache模块可以在Apache中登记它们提供函数的回叫信号。回叫是一种可以在Apache中登记的函数,Apache可以在请求进程循环中的多个阶段调用该函数。回叫通常作为进程的特殊事件处理程序登记。多数Apache为模块登记回叫函数提供的链接都是HTTP请求循环的一部分。Apache当前定义了11种请求循环阶段,模块可以登记回叫函数。它们依次为:读后请求(Post-Read)、URL翻译、头部解析、访问控制、身份验证、授权、MIME类型检查、修正(FixUp)、响应或满足、日志记录、清除。<br>
<br>
编译Apache支持DSO<br>
不幸的是,默认的Apache配置是不支持DSO的,所以我们必须修改配置文件然后重新编译,我是直接通过命令行完成的。这个不难,把得到的httpd*.tar.gz文件解包后,进入该目录,键入如下的命令:<br>
<br>
./configure -enable-so<br>
make<br>
make install<br>
<br>
<br>
在编译过程中如果出现了问题的话,查看一下出错的信息,一般都是没有相应的开发包造成的,把开发包装上就行了。默认安装在/user/local/apache2/目录,如果你要有别的配置要求,键入./configure -help自己看看吧。<br>
<br>
开发 DSO<br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -