httpd的安装


/usr/local/httpd/conf/httpd.conf 

Servername  www.vnet.com:80   域名

 

切记关闭selinux

[root@www~]# rpm -e httpd httpd-manual webalizer subversion mod_python mod_sslmod_perl system-config-httpd php php-cli php-ldap php-common mysql dovecot --nodeps

 

[root@www~]# tar zxf httpd-2.2.17.tar.gz -C /usr/src/

[root@www~]# cd /usr/src/httpd-2.2.17/

[root@www httpd-2.2.17]# ./configure  --prefix=/usr/local/httpd  --enable-so --enable-rewrite --enable-charset-lite --enable-cgi  

[root@www httpd-2.2.17]# make

[root@www httpd-2.2.17]# makeinstall

 

[root@www ~]# ls/usr/local/httpd/

bin    cgi-bin error   icons    lib  man     modules

build  conf    htdocs  include  logs manual

 

[root@www ~]# ln -s/usr/local/httpd/bin/* /usr/local/bin/

[root@www ~]# ls -l/usr/local/bin/httpd /usr/local/bin/apachectl

lrwxrwxrwx 1 root root 3004-06 13:08 /usr/local/bin/apachectl -> /usr/local/httpd/bin/apachectl

lrwxrwxrwx 1 root root 2604-06 13:08 /usr/local/bin/httpd -> /usr/local/httpd/bin/httpd

 

[root@www ~]# cp/usr/local/httpd/bin/apachectl /etc/init.d/httpd

[root@www ~]# vi/etc/init.d/httpd

#!/bin/bash

# chkconfig: 35 85 15

# description: Startupscript for the Apache HTTP Server

……

[root@www ~]# chkconfig--add httpd

[root@www ~]# chkconfig--list httpd

httpd           0:关闭  1:关闭  2:关闭  3:启用  4:关闭  5:启用  6:关闭

 

 

 

[root@www ~]# vi /usr/local/httpd/conf/httpd.conf

……

ServerNamewww.venet.com

……

[root@www ~]# /usr/local/httpd/bin/apachectl-t

SyntaxOK

[root@www ~]# /etc/init.d/httpdstart

 

[root@www ~]# tail/usr/local/httpd/logs/access_log

192.168.4.110 - -[06/Apr/2011:14:24:06 +0800] "GET / HTTP/1.1" 200 44

192.168.4.110 - -[06/Apr/2011:14:24:06 +0800] "GET /favicon.ico HTTP/1.1" 404 209

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值