Apache基础安装(一)
一、下載安裝軟件包安裝
[root@eric6 home]# mkdir -p /home/tools
[root@eric6 tools]# wget http:#mirror.esocc.com/apache/httpd/httpd-2.2.25.tar.gz
[root@eric6 tools]# tar -zxvf httpd-2.2.25.tar.gz
[root@eric6 tools]# cd httpd-2.2.25
[root@eric6 httpd-2.2.25]# ./configure \
--prefix=/application/apache2.2.25\
--enable-deflate \
--enable-expires \
--enable-headers \
--enable-modules=most\
--enable-so \
--with-mpm=worker \
--enable-rewrite
[root@eric6httpd-2.2.25]#make
[root@eric6httpd-2.2.25]#make install
[root@eric6 httpd-2.2.25]# ln -s/application/apache2.2.25 /application/apache
[root@eric6 httpd-2.2.25]#/application/apache/bin/apachectl -l
Compiled inmodules:
core.c
mod_authn_file.c
mod_authn_dbm.c
mod_authn_anon.c
mod_authn_dbd.c
mod_authn_default.c
…..略
[root@eric6 httpd-2.2.25]#/application/apache/bin/apachectl –M
[root@eric6 httpd-2.2.25]#/application/apache/bin/apachectl start
httpd: apr_sockaddr_info_get()failed for eric6.4
httpd: Could notreliably determine the server's fully qualified domain name, using 127.0.0.1for ServerName
[root@eric6 httpd-2.2.25]# lsof -i:80
COMMANDPIDUSERFDTYPE DEVICE SIZE/OFF NODE NAME
httpd4734root4uIPv6 1635410t0TCP *:http (LISTEN)
httpd4736 daemon4uIPv6 1635410t0TCP *:http (LISTEN)
httpd4737 daemon4uIPv6 1635410t0TCP *:http (LISTEN)
httpd4738 daemon4uIPv6 1635410t0TCP *:http (LISTEN)
httpd4821 daemon4uIPv6 1635410t0TCP *:http (LISTEN)
[root@eric6 httpd-2.2.25]# netstat -lnt
Active Internetconnections (only servers)
Proto Recv-Q Send-QLocal AddressForeignAddressState
tcp 00 0.0.0.0:1110.0.0.0:*LISTEN
tcp00 0.0.0.0:521130.0.0.0:*LISTEN
tcp00 127.0.0.1:250.0.0.0:*LISTEN
tcp00 :::111:::*LISTEN
tcp00 :::80:::*LISTEN
tcp00 :::52113:::*LISTEN
[root@eric6 httpd-2.2.25]# ps -ef|grep httpd
root473410 23:03 ?00:00:00/application/apache2.2.25/bin/httpd -k start
daemon473547340 23:03 ?00:00:00/application/apache2.2.25/bin/httpd -k start
daemon473647340 23:03 ?00:00:00/application/apache2.2.25/bin/httpd -k start
daemon473747340 23:03 ?00:00:00/application/apache2.2.25/bin/httpd -k start
daemon473847340 23:03 ?00:00:00 /application/apache2.2.25/bin/httpd-k start
daemon482147340 23:03 ?00:00:00/application/apache2.2.25/bin/httpd -k start
root485542350 23:04 pts/000:00:00 grep httpd
打開瀏覽器輸入IP,提示:It works!
二、安裝完成排錯(cuò)
如果打不開排查:服務(wù)是否啟動(dòng)、防火墻、selinux是否關(guān)閉、查看80端口是否存在、查看進(jìn)程、查看日志
本地使用wget測(cè)試,是否正常
[root@eric6 httpd-2.2.25]# wget 10.0.0.249
--2013-10-1623:08:07--http:#10.0.0.249/
Connecting to10.0.0.249:80... connected.
HTTP request sent,awaiting response... 200 OK
Length: 44[text/html]
Saving to:`index.html.1'
100%[==============================================================>]44--.-K/sin 0s
2013-10-16 23:08:07(10.8 MB/s) - `index.html.1' saved [44/44]
轉(zhuǎn)載于:https://blog.51cto.com/laoshuxmao/1312446
總結(jié)
以上是生活随笔為你收集整理的Apache基础安装(一)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 转:PHP网站在Linux服务器上安全设
- 下一篇: Java并发同步器AQS(Abstrac