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

相关推荐
wno70414 小时前
CentOS下FTP服务搭建
linux·运维·centos
无足鸟ICT4 天前
【RHCA+】安装Tuned
linux·服务器·centos
byte轻骑兵5 天前
时序数据库选型指南:Apache IoTDB 社区版实践与踩坑
数据库·人工智能·apache·时序数据库·iotdb
Cry丶6 天前
Apache Superset 集成实战:Embedded SDK + Guest Token + OAuth2/SSO 完整方案
apache·superset·可视化报表
David猪大卫13 天前
【Linux修炼】环境变量、进程地址空间
linux·c语言·经验分享·笔记·学习·ubuntu·centos
Dragon~Snow15 天前
Centos Stream10 安装 MySQL-9.7.2-linux-glibc2.28-x86_64.tar
linux·mysql·centos
温暖小土15 天前
在 CentOS 上安装 Redis Stack
linux·redis·centos
Linux界最忧郁之人16 天前
华为云ECS&IMS&AS实战|弹性云服务器、私有镜像、弹性伸缩完整实验
linux·运维·服务器·centos·华为云·openstack
源图客16 天前
解决CentOS操作系统网络异常问题
linux·运维·centos
源图客17 天前
Apache Flink 2.3.0(最新版本)
大数据·flink·apache