首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
叙述Apache web server的安装与配置。
叙述Apache web server的安装与配置。
admin
2009-02-15
26
问题
叙述Apache web server的安装与配置。
选项
答案
Apache web server的安装与配置如下: 1.Apache web server简介 Apache web server是一款开放源码的web服务器软件,由apache software foundation开发和维护。它是目前世界上使用最为广泛的web服务器软件,支持各种unix平台和Windows平台。这里将介绍它在 RedHat Linux 9中最基本的安装和配置。 2:软件的相关资源 官方网站:http://httpd.apache.org/。 源码软件包:Apache是开源的软件,可以在其官方网站http://ht- tpd. apache. org/download. cgi下载。目前的最新稳定版本是httpd-2. 0.53。http://httpd.apache.org/docs-project/有该软件比较全面的帮 助文档。hap://httpd. apache. ore/docs/misc/FAQ.html回答了该软件的常见问题。 3.软件的安装 1)安装 从其官方网站下载源码软件包httpd-2.0.53.tartsz。接下来将对安装过程的一些重要步骤给出解释。 [root@localhostroot]#tarxzvfhttpd-2.0.53.tar.gz [root@loealhostroot]#cd htlpd-2.0.53 [root@loealhosthttpd-2.0.53]#./configure [root@localhosthttpd-2.0.53]#make [root@localhosthUpd-2.0.53]#makeinstall t8rxzvfhttpd-2.0.53.tartSz解压缩软件包。 ./configure针对机器作安装的检查和设置,大部分的工作是由机器自动完成的,但是用户可以通过一些参数来完成一定的设置,其常用选项如下。 /configure- -help查看参数设置帮助。 - -prefix:指定软件安装目录(默认usr/local/apache2)。 - -enable-modules=指定需要加载的模块。 - -enable-v4-mapped支持IPv6的socket处理1Pr4的连接。 可以设置的参数很多,可以通过-help查看需要的参数,一般情况下,默认设置就可以了。 默认安装建了/usr/local/apache2目录,下面介绍/usr/ loeal/a- pache2的几个常用组成部分。 /usr/local/apache2/bin其中主要是有服务器的程序。常用的有 demon程序httpd和控制脚本apachectl。 /usv/local/apache2/conf其中主要是服务器相关的配置文件。最主要的配置文件是httpd. conf。 /usr/loeal/apache2/htdocs默认的网站html文件根目录。 /usr/local/apache2/cgi-bin默认的cgi程序的存放目录。 2)启动 [root@localhostroot]#/usr/local/apache2/bia/apacheetlstart [root@localhostroot]卸salLX [root@loealhostroot]#netstat-oil 如果不出问题,ps aux应该可以查到httpd的进程,或netstat-an也可以看到80端口的服务已经启动了。如果要设置开机自启动web server,只需在/etc/rc.d/rc.10cal中加入一行 /usr/local/apache2/bin/apachectl start 该文件内容如下。 #!/bin/sh # #This script will bc executed*after*all the other init scripts. #You can put your owu initialization stuffin here ifyou dont #want to do the full Sys V style 1nit stuff touch/ var/ lock/ subsys/ local /usr/local/apache2/bin/apachectl start 4.软件的配置 /usr/local/apache2/conf/httpd. conf默认安装,所有的配置都有默认值,接下来介绍一些常用的配置项。 glisten: Allows you to bind Apache to specific IP addresses and/or #ports, instead of the default. See also the < Virtual Host > # directive. # #Change this to Listen on specific IP addresses as shown below to #prevent Apache from glomming onto all bound [P addresses ( 0.0.0. 0) # glisten 12.34.56.78:80 Listen 80 设定apache的侦听地址和端口。 # #Server Admin Your address, where problems with the server should be #e-mailed. This address appears on some server - generated pages, such #as error documents, e. g. admin@ your - domain, com # Server Admin you@ examplc, com 设定apache的管理员邮件地址。 # #Document Root The directory out of which you will serve your #documents. By default, all requests are taken from this directory, but #symbolic links and aliases may be used to point to other locations. # DocumentRoot"/usr/local/apache2/htdocs" 设定apache web server的文档根目录,必须是绝对路径。 < Dirnctory"/usr/local/apache2/htdocs" > # #Possible values for the Options directive are" None" ," All", #or any combination of: # Indexes Includes Follow Sym Links Sym LinksifOwner Match ExecCGI Muhi Views # #Note that" Muhi Views" must be named * explicitly * - - - "Options All" #doesn’t give it to you. # #The Options directive is both complicated and important. Please see #http: //httpd. apache, org/docs -2. O/mod/core. Html #options /flor more information. # Options Indexes Follow SymLinks # #Allow Override controls what directives may be placed in. htaccess files. #It can be" All" ," None" ,or any combination of the keywords: # Options Filelnfo Auth Config Limit # Allow Override None # #Controls who can get stuff from this server. # Order allow, deny Allow from all </Directory > 设定文工团档根目录的权限控制,必须和Docnment Root"/usr/local/a- pache2/htdoes"中指定的目录一致。 # #The index, html. var file( a type-map)is used to deliver content. #negotiated documents. The Muhi Views Option can be used for the #same purpose, but it is much slower. # Directorylndex index, html 指定该目录下的索引文档, ScriptAlias/cgi-bin/"/usr/local/apache2/cgi-bin/" 映射egi-bin 的根目录,必须是绝对路径。 < Directory"/usr/local/apache2/cgi-bin" > AllowOverride None Options None Order allow, deny Allow from all </Directory > 设定cgi—bin目录的读写权限,该目录项必须和上一条的设置一致。 5.安装使用的一些经验 1)apache进程的有效用户ID默认为n。b。dY 出于安全方面的考虑,up ache服务器进程的默认有效ID被设置为 nobody,这就意味着该进程只拥有nolmdy的权限,所以必须确保nobody对设置的Dxumcnt Root有足够权限。或者可以配置up achc进程的有效id,但是推荐不要这样做。 2)如果网站的访问量不是很大可以考虑用xinetd超级进程来启 动apache ①打开/usr/locaVapache2/coaf/httpd.conf,修改。 Server Type inetd ②创建/etc/xinetd. d/apache, 内容如下。 #defauh: on #description: The Apache HTTP connections. service http I disable=no socket_ type=stream wait=no user: root server=/usr/sbi/httpd port: 80 #log_ on_ success+=DURATION USERID #log_ on_ failure+=USERID #nice=10 } ③重新启动xinetd。 #/etc/rc. d/init .d/xinetd restart 3)对IPv6的支持 随着计算机网络的不断发展和扩大,IPv6已经越来越为人们所接受,apache自2.0之后的版本开始支持IPv6,下面简单介绍apache针对 IPv6的配置。 默认情况下,apache使用映射到IPv4的lPv6地址,即安装配置时,默认./configure-enable-v4-map,并且在配置文件http.conf中将是: Listen 80。 要使apache区别对待IPv4与IPv6的连接,安装配置时,使用./ configure-disable-v4-map,对应配置文件中http.conf:Listen[::]: 80。这样apache就可以区别对待IPV4与IPv6的连接了。
解析
转载请注明原文地址:https://kaotiyun.com/show/qc3Z777K
本试题收录于:
网络管理员下午应用技术考试题库软考初级分类
0
网络管理员下午应用技术考试
软考初级
相关试题推荐
Communication via e-mail is by far the most common Internet activity. You can(71 )with anyone in the world who has an Internet a
The kernel is the(66)of an operating system such as Windows98, Windows NT, Mac OS or Unix. The kernel provides basic services fo
重置(overriding)的基本思想是通过(44)机制的支持,使得子类在继承父类界面定义的前提下,用适合于自己要求的实现去置换父类中的相应实现。
在软件生存周期的瀑布模型中一般包括计划、(49)、设计、编码、测试、维护等阶段。
图1-12中缺少了哪些数据流?请指明每条数据流的名称、起点和终点。给出“领料单”和“入库申请单”这两个类至少应具有的属性。
在使用UML建模时,通常采用“①描述需求→②构造系统结构→③描述系统行为”的设计步骤。其中,UML结构包括了基本构造块、公共机制和(48)。
如果DNS服务器更新了某域名的IP地址,造成客户端域名解析故障,在客户端可以用两种方法解决此问题,其中一种是在Windows命令行下执行(70)命令。
使用白盒测试方法时,确定测试数据应该根据(22)和指定的覆盖标准。一般来说与设计测试数据无关的文档是(23)。软件的集成测试工作最好由(24)承担,以提高集成测试的效果。(23)
Kerberos服务器由认证服务器和(22)两部分组成。当用户需要进行身份验证时,先以明文的方式将用户名发送给认证服务器,认证服务器返回用户一个(23)的会话密钥和一个票据。(22)
在下面常用的端口号中,默认用于FTP服务的TCP端口是()。
随机试题
如果要用刷子工具在填充区域和空白区域上涂刷,而线条不受影响,应该选择的涂刷模式是:
Childrenshouldavoidusingmobilephonesforallbutessentialcallsbecauseofpossiblehealtheffectsonyoungbrains.Thisi
患者,男,45岁,突然感觉胸痛,4小时后到医院就诊,以下哪项检查对排除急性心肌梗死最有帮助
胎先露完成内旋转依靠的是
投资组合技术主要有抵押贷款与自有资金的组合和土地与建筑物的组合两种。()
中华人民共和国海关出口货物报关单预录入编号:海关编号:
在整个宏观经济因素当中,对房地产投资影响最大的因素是()。
某人扁桃体化脓,医生建议其静脉注射头孢,药液从其手背静脉到达扁桃体患处所经过的途径是:上肢静脉→右心房→①→②→左心房→③→④→动脉→扁桃体毛细血管(患处)。依次填入①②③④正确的是()。
TheindividualTVviewerinvariablysensesthatheorsheis______ananonymous,statisticallyinsignificantpartofahugeand
Wealllaugh.Weallhurt.Weallmakemistakes.Wealldream,That’slife.It’sajourney.Pleasefollowtheserulestomaketh
最新回复
(
0
)