CentOS7 Apache安装踩坑

Gnome桌面右键弹出终端。

root@localhost \~# yum repolist

已加载插件:fastestmirror, langpacks

/var/run/yum.pid 已被锁定,PID 为 2611 的另一个程序正在运行。

Another app is currently holding the yum lock; waiting for it to exit...

root@localhost \~# yum makecache

已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org/?

Cannot find a valid baseurl for repo: base/7/x86_64

root@localhost \~# sudo nano /etc/yum.repos.d/CentOS-Base.repo

修改镜像站点为aliyun服务器写入,保存

root@localhost \~# yum makecache

已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

元数据缓存已建立

root@localhost \~# yum install httpd

重启

root@localhost \~# systemctl start httpd.service

root@localhost \~# systemctl status httpd.service 查看状态

● httpd.service - The Apache HTTP Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

root@localhost \~# ifconfig 查看ip地址

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

inet 192.168.159.129 netmask 255.255.255.0 broadcast 192.168.159.255

inet6 fe80::2c10:185e:e5c4:821f prefixlen 64 scopeid 0x20<link>

ether 00:0c:29:15:0c:28 txqueuelen 1000 (Ethernet)

RX packets 46624 bytes 69433792 (66.2 MiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 7699 bytes 475065 (463.9 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

相关推荐
SelectDB7 小时前
基于 Apache Doris 搭建 RAG 系统:从基础 RAG 到知识图谱增强的完整实现与选型指南
apache
SelectDB7 小时前
SelectDB Enterprise 4.0.5:企业级实时分析与 AI 数据底座怎么选?安全合规配置指南
apache
略略略咯咯13 小时前
centos更换镜像源
linux·运维·centos
隔窗听雨眠14 小时前
80TB电商数据迁移实录:从PostgreSQL分析困境到Apache Doris架构突围
postgresql·架构·apache
lsh曙光1 天前
Apache服务
apache
☆凡尘清心☆2 天前
CentOS Stream 9 Redis 7.2.7 源码编译一键安装脚本
linux·运维·redis·centos
Norris Huang2 天前
Icevue:为 Apache Iceberg REST Catalog 打造一个轻量、只读的可视化入口
apache
☆凡尘清心☆3 天前
CentOS Stream 9 编译安装 Redis 7.2.7 完整版详细步骤
linux·redis·centos
三言老师3 天前
awk条件筛选日志内容实操
linux·运维·服务器·centos
AOwhisky3 天前
Linux(CentOS)系统管理入门笔记(第二十一期)——防火墙管理(Firewalld)——zone、服务端口、富规则与端口转发
linux·运维·笔记·安全·centos·防火墙