cygwin上安装Apache 2
版权声明:本文可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者署名及本版权声明。
项目的前置测试机随RedHat 9已经默认安装了Apache 1.3,放置了Bugzilla等东西,今天要弄控制台上的报表文件配置,需要使用Apache 2.0,先在cygwin上装一下。
Apache 2.0也使用libtool和autoconf来配置环境,安装方式分为源代码安装和rpm包安装。用rpm包安装不需要编译,但是只能选择固定的模块,安装在固定的目录下;源代码安装方式需要先配置编译再安装,可以选择安装路径,选择需要的模块。两种安装方式各有长处,可以看需要进行选择。
这里用源代码方式安装:
1、下载最新源代码
$ lynx http://apache.gr-linux.com/httpd/httpd-2.2.3.tar.gz
2、解压
$ gzip -d httpd-2.2.3.tar.gz
$ tar xvf httpd-2.2.3.tar
3、配置
$ ./configure –prefix= /usr/local/httpd –enable-module=so
将 Apache 安装在 /usr/local/httpd 目录下
4、编译安装
$ make
$ make install
6、运行
进入 Apache 安装目录下的 bin 文件夹
启动:$ ./apachectl start
停止:$ ./apachectl stop
附:RedHat 9上Apache 1.3的默认路径:
- 配置文件:/etc/httpd/conf/httpd.conf
- 服务器根目录:/etc/httpd
- 根文档目录:/var/www/html
- 访问日志:/var/log/httpd/access_log
- 错误日志:/var/log/httpd/error_log
- 模块存放路径:/usr/lib/httpd/modules

最新评论