Apache的配置和维护概要1.doc

  1. 1、本文档共13页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Apache的配置和维护概要1

Apache 的配置与维护 1、Apache的安装 Window平台 1、软件下载 软件下载地址:/ 下载win32平台二进制格式安装文件。 2、安装 与安装其他应有软件一样,默认安装完成,应用服务器的端口在80端口。 Unix Linux平台 软件下载 软件下载地址:/ 下载Unix平台源码包。 安装 把源码包保存在/home/root/下 cd /home/root/ tar –zxvf httpd-2.2.3.tar.gz mv httpd-2.2.3.tar.gz apache cd apache ./configure --prefix=/usr/local/apache --enable-module=so make make install 或者 ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all --enable-modules=all --enable-proxy apache将安装至/usr/local/apache 并且apche将支持dso方式 3、使用apachectl命令 相当于httpd命令 启动 #apachectl –k start 停止 # apachectl –k stop 重启 #apachectl -k restart 4、将apache配置成服务(linux) 在Linux系统中我一般采用编译源码的方式来安装Apache,有两种方法可以让Apache在系统启动时自动启动。 1. 在/etc/rc.d/rc.local中增加启动apache的命令,例如:/usr/local/httpd/bin/apachectl start 2. 将apache注册为系统服务 首先将apachectl命令拷贝至/etc/rc.d/init.d目录下,改名为httpd 使用编辑器打开httpd文件,并在第一行#!/bin/sh下增加两行文字如下 # chkconfig: 35 70 30 # description: Apache 接着注册该服务 chkconfig --add httpd 一切OK了,启动服务 #service httpd start 其中所增加的第二行中三个数字第一个表示在运行级别3和5下启动apache,第二、三是关于启动和停止的优先级配置,无关紧要。 ? Ubuntu下安装apache 下载httpd-2.2.15.tar.gz,使用tar zxvf httpd-2.2.15.tar.gz解压。如解压后的路径为:/software/httpd-2.2.15。 首先安装apr apr-util (不推荐) Java代码 ? #?cd?/software/httpd-2.2.15/srclib/apr?? #?./configure?--prefix=/usr/local/apr?? #?make?? #?make?install?? ?? #cd?/software/httpd-2.2.15/srclib/apr-util?? #./configure?--prefix=/usr/local/apr-util?--with-apr=/usr/local/apr?? #make?? #make?install?? ??另一种安装apr apr-util方法:(推荐) Java代码 ? 到官网/?? 下载apr-1.4.2.tar.gz?和?apr-util-1.3.9.tar.gz?? tar?zxvf?apr-1.4.2.tar.gz?? cd?apr-1.4.2?? ./configure?--prefix=/usr/local/apr?? make?? make?install?? ?? tar?zxvf?apr-util-1.3.9.tar.gz?? cd?apr-util-1.3.9?? ./configure?--prefix=/usr/local/apr-util?--with-apr=/usr/local/apr?? make?? make?install?? ? 安装apache Java代码 ? #cd?/software/httpd-2.2.15?? #./configure?--prefix=/usr/local/apache?--enable-module=so?--enable-mods-shared=all?--enable-cache?--enable-file-cache?--enable-mem-cache?--enable-disk-cache?--enable-static-support?--enable-static-htpasswd

文档评论(0)

yaocen + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档