linux安装apache
1.下载所需软件包:
- wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
- wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
- wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip 二、安装过程
1、安装apr
#cd /root/software
#tar -jxvf apr-1.4.6.tar.bz2
#cd apr-1.4.6
#./configure
#make
#make install2、安装apr-util
#cd /root/software
#tar -jxvf apr-util-1.4.1.tar.bz2
#cd apr-util-1.4.1
#./configure --with-apr=/usr/local/apr
#make
#make install3、安装pcre
#cd /root/software
#tar -jxvf pcre-8.30.tar.bz2
#cd pcre-8.30
#./configure
#make
#make install4、安装apache
#cd /root/software
#tar -jxvf httpd-2.4.2.tar.bz2
#cd httpd-2.4.2
#./configure -prefix=/usr/local/apache -enable-so --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr/ --with-pcre=/usr/local/pcre/
#make
#make install
三、运行
1、进入/usr/local/apache/conf,将httpd.conf中:
#ServerName www.example.com:80
改为:
ServerName localhost:80
2、进入/usr/local/apache/bin,执行#./apachectl start
3、在浏览器输入ip地址即可访问。
相关推荐
Kafka 2020-09-18
Wepe0 2020-10-30
杜倩 2020-10-29
windle 2020-10-29
minerd 2020-10-28
mengzuchao 2020-10-22
Junzizhiai 2020-10-10
bxqybxqy 2020-09-30
风之沙城 2020-09-24
kingszelda 2020-09-22
大唐帝国前营 2020-08-18
yixu0 2020-08-17
TangCuYu 2020-08-15
xiaoboliu00 2020-08-15
songshijiazuaa 2020-08-15
xclxcl 2020-08-03
zmzmmf 2020-08-03
newfarhui 2020-08-03
likesyour 2020-08-01