linux 安装apache
1、下载apache
从windows下载
http://httpd.apache.org/download.cgix 下载linux版本,下载后上传到/home/目录下,本人下载的是httpd-2.2.21.tar.gz
直接在linux中通过命令下载
cd /home
#wget http://www.apache.org/dist/httpd/httpd-2.2.21.tar.gz
2、解压缩
cd /home
tar zxvf httpd-2.2.21.tar.gz
3 配置.
# cd /home/httpd-2.2.21
# ./configure --prefix=/usr/local/apache --enable-so
表示Apache将安装在/usr/local/apache目录下
4 编译与安装
# make
# make install
5 启动
# cd /usr/local/apache/bin
启动
# ./apachectl start
停止
# ./apachectl stop