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

相关推荐
晚风吹人醒.14 分钟前
LAMP(Linux+Apache+MySQL+PHP)完整搭建过程
linux·服务器·mysql·centos·php·apache·lamp
xu_ws18 小时前
Linux CentOS 7.9 MySQL 8.0安装配置全攻略
linux·运维·mysql·centos
叹了口丶气19 小时前
CentOS 7编译Python3.10时,SystemError: <built-in function compile> returned NULL
linux·运维·centos
东风微鸣1 天前
Apache Parquet 优势与日志应用场景解析
运维·apache
泽君学长1 天前
CentOS 7 安装 Docker 完整教程
linux·docker·centos
武子康1 天前
大数据-193 Apache Tez 实战:Hive on Tez 安装配置、DAG原理与常见坑
大数据·后端·apache
猫豆~1 天前
公有云——2day
linux·服务器·数据库·centos·云计算
大猫和小黄1 天前
测试环境对象存储平替方案:在CentOS 7上部署MinIO替代阿里云OSS
linux·阿里云·centos·oss
耗同学一米八1 天前
2026年河北省职业院校技能大赛中职组“网络建设与运维”赛项答案解析 1.系统安装
linux·服务器·centos
码里法2 天前
centos安装nginx并配置https完整版
nginx·https·centos