admin 管理员组

文章数量: 888299

httpd离线安装(含依赖包下载地址)

如果系统包不全,直接安装httpd会报错缺少各种依赖。
httpd安装依赖包有以下:

apr-1.4.8-7.el7.x86_64.rpm
apr-util-1.5.2-6.el7.x86_64.rpm
mailcap-2.1.41-2.el7.noarch.rpm
httpd-tools-2.4.6-80.el7.centos.x86_64.rpm
httpd-2.4.6-17.el7.centos.1.x86_64.rpm

主要报错
mailcap-2.1.41-2.el7.noarch.rpm没安装会报错如下:

--> 正在处理依赖关系 /etc/mime.types,它被软件包 httpd-2.4.6-80.el7.centos.x86_64 需要

其他的依赖包 报错比较明显,就不说了。

所以最好按上面给出的5个包的顺序安装,避免因缺少依赖包导致报错

重启

[root@bigdata01 yum.repos.d]#  systemctl restart httpd
[root@bigdata01 yum.repos.d]#  systemctl status httpd
● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)Active: active (running) since 五 2022-08-19 05:00:46 CST; 6s agoDocs: man:httpd(8)man:apachectl(8)Process: 58097 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)Main PID: 58125 (httpd)Status: "Processing requests..."CGroup: /system.slice/httpd.service├─58125 /usr/sbin/httpd -DFOREGROUND├─58131 /usr/sbin/httpd -DFOREGROUND├─58132 /usr/sbin/httpd -DFOREGROUND├─58133 /usr/sbin/httpd -DFOREGROUND├─58134 /usr/sbin/httpd -DFOREGROUND└─58135 /usr/sbin/httpd -DFOREGROUND8月 19 05:00:46 bigdata01 systemd[1]: Stopped The Apache HTTP Server.
8月 19 05:00:46 bigdata01 systemd[1]: Starting The Apache HTTP Server...
8月 19 05:00:46 bigdata01 httpd[58125]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::11e4:50e4:5cb3:c1be. Set the 'Server...this message
8月 19 05:00:46 bigdata01 systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.


web页面显示

vi /etc/httpd/conf/httpd.conf

修改以下三处:

执行:

mv /etc/httpd/conf.d/welcome.conf  /etc/httpd/conf.d/welcome.conf_bak

不然页面不显示你配置的yum目录
然后重启httpd即可
默认80端口,输入ip,直接访问

报错
如果页面提示403 报错,大概率是防火墙 或者selinux的问题
①关闭防火墙:systemctl stop firewalld

setenforce 0    --更改SELinux为宽容模式
sed -i "s/SELINUX\=enforcing/SELINUX\=disabled/g" /etc/selinux/config   --设置 SELINUX=disabled

可参考:
.html

下载地址


libapr-1.so.0()(64bit),
–下载地址:.4.8-7.el7.x86_64.rpm
官网:.so.0()(64bit)
本地安装:yum localinstall apr-1.4.8-7.el7.x86_64.rpm

libaprutil-1.so.0()(64bit),
–下载地址:.5.2-6.el7.x86_64.rpm
官网:.so.0()(64bit)
本地安装:yum localinstall apr-util-1.5.2-6.el7.x86_64.rpm
``

本人整理了以上5个包在网盘
链接: httpd五个依赖包
提取码:uu66

创建本地yum源

本文标签: httpd离线安装(含依赖包下载地址)