目录
一、网站服务
1.网站简介
1.1名词
(1)HTML:(Hyper Text Markup Language)超级文本标记语言;
(2)网页:使用html、PHP、JAVA语言格式书写的文件;
(3)主页:网页中呈现的第一个页面;
(4)网站:多个网页组合而成;
(5)URL:Uniform Resource Locator统一资源定位器;访问网站的地址;
1.2网站架构
(1)LAMP(Linux+Apache+MySQl+PHP)
即(系统+服务器程序+数据库管理软件+中间软件)
2、静态站点
2.1 Apache基础
Apache官网:www.apache.org
软件包名称:httpd
服务端口号:80/tcp(Http)443/tcp(https)
配置文件:/etc/httpd/conf/httpd.conf
子配置文件:/etc/httpd/conf.d/*.conf
2.2安装apache
(1)安装:yum -y install httpd
(2)启动:systemctl start httpd
(3)查看服务状态:systemctl status httpd
(4)设置自启动:systemctl enable httpd
(5)关闭防火墙:systemctl stop firewalld
(6)关闭SELinux:setenforce 0
(7)查看版本:httpd -v
输出信息:server version:apache/2.4.6(CentOS)
(8)本机测试,服务器输入http://127.0.0.1
其他机器测试,注意需要ip地址,直接输入ip地址就可以,能完全实现连接即可。
2.3扩展firewalld知识
(1)firewall简介:保护互联网对服务器的影响
Firewall临时关闭:systemctl stop firewalld
Firewall永久关闭:syst