Apache2 安装配置

上一篇 / 下一篇  2010-08-30 17:05:47 / 个人分类:配置管理

      Apache251Testing软件测试网H1gKLS+YV

解压安装51Testing软件测试网r(q q/Bj+fy
[root@localhost src]# tar -zvxf httpd-2.0.61.tar.gz51Testing软件测试网A)`ws#Lm9J2m
[root@localhost src]# cd httpd-2.0.61

p\b2|g;u*X4@$o,]051Testing软件测试网7EA%A`Cy H2},?

[root@localhost src]# ./configure --prefix=/usr/local/apache2 --enable-deflate --enable-cache --enable-file-cache --enable-disk-cache --enable-mem-cache --enable-rewrite --enable-forward --enable-expires --enable-speling --enable-so --with-mpm=worker51Testing软件测试网*AC2^0kj;Di
  [root@localhost src]#  make
S#vU.tcwq0  [root@localhost src]#  make install51Testing软件测试网6ms ` Fz`}

51Testing软件测试网1t?OL;|

 51Testing软件测试网#z*Z6hj(m&U

f-AD&\} ]c _01、  关闭和启动Apache2测试51Testing软件测试网Q]V,f{_k'wh
 进入到Apache2的安装目录启动Apache2测试看是否安装成功
f&xK x7i$Y7G&z0
h,@S9rnI\'Q`1y0 cd /apache2/bin51Testing软件测试网`-h:wV8g@*h*_
 ./apachectl start 或者 ./httpd -k start
x.FZ%v*H?7j e7n D0 在浏览器的地址栏输入http://localhost 或者 http://IP地址 即可看到运行结果.表示安装和运行成功.
1b [9m+nAtjv8e w#?0
'b a2w+N4[A4F0 相关常用命令:51Testing软件测试网 AE"tO'gL#~3]
 ./apachectl stop
\ va Y8z2w*Q0 ./httpd stop51Testing软件测试网4H9GQ$x#SOG1?Y'ISM
 ./httpd start
3y:p3Ga3Pe]g0 ./httpd graceful(不重启使conf参数生效)
BG.tqV#Q051Testing软件测试网[E$KE#iaT

51Testing软件测试网 E4z5g%V$v8DyB9l

2、     配置httpd.conf

2F7F#w$@(Z1U051Testing软件测试网w%u^rN+[w F7t

1 )  apache能访问后缀为.php的文件51Testing软件测试网#~2pY1^+LgU r0n+H

$Li)~ QHh4m0<IfModule mime_module>51Testing软件测试网m'W!v.z1m\"FX-y

)w,Q^.}T,c;Y7h0……..

q8~7r.Os5O0

,n*m6t8D8u:}0AddType application/x-httpd-php .php51Testing软件测试网F?]{1da

$VWs,jv0</IfModule>

b0_3yKc%il | V;h S0

4il!Iuc-Q'FV8F9R0    

.@)uvQ(z(}M6m051Testing软件测试网!gv HG0}

      2)修改访问根目录51Testing软件测试网P+MMKu*Od/Y

,J+s6p1Z#z+L|'Fx0DocumentRoot "/var/www/html"51Testing软件测试网)_0yZ} W V8d)VUi


TAG:

 

评分:0

我来说两句

Open Toolbar