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

相关推荐
27669582929 小时前
拼多多m端/小程序 encrypt_info
java·小程序·apache·encrypt_info·encrypt_info解密·拼多多小程序·拼多多m端
tang7451639629 小时前
Huawei Cloud EulerOS 2.0(x8664)安装OpenJDK 2120260323
linux·运维·centos
xiep143833351010 小时前
CentOS 7.9 安装 TigerVNC
linux·运维·centos
老杨聊技术10 小时前
CentOS 7 安装 Docker 完整版教程
linux·docker·centos
norsd10 小时前
CentOS Rocky Linux 设置 ip
linux·tcp/ip·centos
ylscode1 天前
Apache CXF LDAP注入漏洞允许攻击者获取任意证书
apache
键盘上的猫头鹰1 天前
【Linux 基础教程(一)】概述、安装与网络配置:VMware + CentOS + NAT + XShell 远程连接
linux·网络·centos
隔窗听雨眠1 天前
CentOS Stream 9 服务器 Docker 部署 KaiwuDB 实战
服务器·docker·centos
木卫二号Coding1 天前
第八十五篇-CentOS-7 + Tesla V100 环境下 Docker 容器内编译部署 Qwen3.6-27B-MTP 大模型实战指南
linux·docker·centos
流觞 无依1 天前
CentOS 7 系统中 systemd 组件的 CVE-2022-2526 漏洞修复
linux·运维·centos