linux 安装apache静态服务器

来源:互联网 发布:怎么看淘宝退款率 编辑:程序博客网 时间:2024/06/02 17:47

一、下载:httpd-2.2.29.tar.gz

二、卸载系统自带的

      rpm -qa|grep httpd

[root@root ~]# rpm -e --nodeps  卸载


三、解压:

tar -zxvf httpd-2.2.29.tar.gz

./configure --prefix=/usr/local/apache2 --enable-modules=so --enable-rewrite
make

make install

四、修改配置文件

 vi httpd.conf 

将:#ServerName  www.example.com:80打开

修改端口号,上面和Listen  80    的端口号


启动Apache  ./apachectl restart  :重启

./apachectl start :启动

./apachectl stop  停止


安装Apache需要gcc编译器可以使用yum安装

0 0