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\ 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\ 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

相关推荐
Thexhy8 小时前
在 CentOS 7 的 Linux 系统中配置 NFS
linux·运维·学习·centos
任风雨10 小时前
13.2.1.Apache HTTP Server
http·apache·web服务器
睿本云14 小时前
产品月报|睿本云10月产品功能迭代
运维·服务器·apache
程序员陆通18 小时前
CentOS/AlmaLinux 9 中 SSH 服务启动失败:OpenSSL 版本不匹配解决
linux·centos·ssh
李少兄18 小时前
解决 CentOS 8 报错:Failed to download metadata for repo ‘BaseOS‘
linux·运维·centos
ayaya_mana1 天前
CentOS 7/8/9 一键安装 Python 3.10+ 并配置默认版本
linux·python·centos
IT 小阿姨(数据库)1 天前
PostgreSQL pg_stat_bgwriter 视图各个字段详解
linux·数据库·sql·postgresql·centos
Thexhy1 天前
在centos 7上配置FIP服务器的详细教程!!!
linux·运维·centos
HMX4042 天前
【春秋云境】CVE-2024-38856 Apache OFbiz从未授权到RCE
apache
chxii2 天前
Apache Tomcat 介绍
java·tomcat·apache