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

相关推荐
啊吧怪不啊吧几秒前
Linux常见指令介绍下(入门级)
linux·开发语言·centos
李菠菜1 小时前
CentOS系统指定版本Docker与Docker-Compose在线安装教程
docker·容器·centos
柳如烟@2 小时前
CentOS 7上Memcached的安装、配置及高可用架构搭建
架构·centos·memcached
小鑫仔_x7 小时前
使用 VMware 安装一台 Linux 系统之Centos
linux·运维·centos
hnlucky7 小时前
CentOS 7 系统中,防火墙要怎么使用?
linux·运维·网络·网络安全·centos
Waitccy7 小时前
CentOS 7 磁盘分区详细教程
linux·运维·centos
davysiao7 小时前
基于 CentOS 的 Docker Swarm 集群管理实战指南
linux·docker·centos
Python私教7 小时前
CentOS 7 基于 Nginx 的 HTML 部署全流程指南
nginx·centos·html
企鹅侠客8 小时前
centos停服 迁移centos7.3系统到新搭建的openEuler
linux·运维·centos·openeuler·迁移
Fanche40410 小时前
MySQL 8 自动安装脚本(CentOS-7 系统)
linux·运维·数据库·mysql·centos