Linux下安装http webServer

 时间:2026-02-13 14:10:37

1、下载wget

yum -y install wget

2、mkdir /tmp/httpd

cd /tmp/httpd/

wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.17.tar.gz

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz

wget http://mirror.bit.edu.cn/apache/apr/apr-1.5.2.tar.gz

wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.5.4.tar.gz

Linux下安装http webServer

3、tar zxvf pcre-8.37.tar.gz

cd pcre-8.37/

Linux下安装http webServer

1、tar zxvf pcre-8.37.tar.gz

cd pcre-8.37/

2、./configure --prefix=/usr/local/pcre/

gcc库没有安装

yum -y install gcc gcc-c++ pcre-devel

./configure --prefix=/usr/local/pcre/

make && make install

make clean

Linux下安装http webServer

Linux下安装http webServer

3、tar zxvf  httpd-2.4.17.tar.gz

tar zxvf apr-1.5.2.tar.gz httpd-2.4.17/srclib/

tar zxvf apr-util-1.5.4.tar.gz httpd-2.4.17/srclib/

cd httpd-2.4.17/srclib/

mv apr-1.5.2 apr

mv apr-util-1.5.4 apr-util

4、./configure --prefix=/usr/local/apache  -with-pcre=/usr/local/pcre-8.37/bin/pcre-config -with-included-apr

make && make install

make clean

5、配置httpd.conf

usr/local/apache/conf/httpd.conf

ServerName值改为localhost:80

1、添加80端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

2、重启防火墙

firewall-cmd --reload

1、cd /usr/local/apache/bin/

./apachectl -k start

2、输入IP地址,测试。

Linux下安装http webServer

  • 组策略打不开怎么办 电脑组策略开启及禁用方法
  • Win10如何查看更新历史记录
  • windows 10系统本地安全策略组在哪里打开?
  • 打开组策略的命令
  • win10系统日志在哪里看
  • 热门搜索
    贫血怎么治疗 葡萄用英语怎么说 大便发绿是怎么回事 内分泌失调怎么调理 韩式泡菜的做法 抵押车为什么不能过户 苹果电脑怎么截图 榨汁机怎么用 眼睛疼是怎么回事 小天鹅洗衣机怎么样