一、Nginx的简介
Nginx是一款轻量的级的HTTP服务器,也是一款邮箱代理服务器,同时具备反向代理,通用TCP/UDP代理功能。
Nginx可以运行在x86、ARM等多种平台上,同时支持Linux、windows等主流的操作系统
二、Nginx的特点
1、支持高并发
单机Linux可支持数十万的并发连接,经过优化可以高达百万的并发连接。
2、内存消耗低
在同级的web服务器中,Nginx占用的内存最少。
3、高扩展性
和Apache一样、Nginx采用模块设计、支持非常丰富的第三方模块。
4、高可靠性
Nginx采用master--worker模式,如果worker出现故障,master可以快速开启一个新的worker来提供服务。
三、搭建自己的网站
3.1准备
使用:which nginx命令来查看系统是否有nginx的软件

使用:yum -y install nginx来安装该软件

查看防火墙(systemctl status firewalld)和selinux状态(getenforce)


开启nginx服务

3.2搭建网站
3.2.1 写入网页数据
使用命令(echo "hello wo de di zhi shi 192.168.59.140" > /usr/share/nginx/html/index.html)

3.2.2 使用浏览器来检查
