文章目录
1.下载httpd 服务器
首先要知道软件包在什么地方?
进入命令: cd /etc/yum.repos.d/
软件包在Packages 目录下
[root@localhost media]# cd /Packages
统计一下有多少包
[root@localhost Packages]# ls | wc -l
repo文件都是存放在/etc/yum.repos.d文件夹之中的。repo文件即是我们常说的源文件(repositry匹配文件),在使用yum命令的时候系统会自动读取repo文件,然后去repositry获取软件。配置如下:
[etc]
name=rhel7.6
baseurl=file:///media
gpgcheck=0
[etc] => [名字自定义]
下载httpd 服务器:
root@localhost yum.repos.d]# yum install -y httpd
下载完成显示的界面:
2.启动服务器:
[root@localhost yum.repos.d]# systemctl start httpd
浏览器页面访问地址,如果出现不了Apache页面就是防火墙的问题需要关闭。
[root@localhost yum.repos.d]# iptables -L
systemctl stop firewalld 关闭防火墙
systemctl disable firewalld 避免开机起,启动防火墙
编辑网页内容:
cd /var/www/html
vim index.html
网页的展示:
html和css 的语法都可以vim index.html里面
编辑.