目录
一、定义
二、学习准备
三、搭建服务器环境
系列教程
Nginx教程(入门篇)
一、定义
Nginx是一款轻量级的HTTP服务器,采用事件驱动的异步非阻塞处理方式框架,这让其具有极好的IO性能,时常用于服务端的反向代理和负载均衡。
二、学习准备
1、linux基础
2、服务器
(1)阿里云10元ECS
https://promotion.aliyun.com/ntms/act/campus2018.html
(2)购买流程


(3)记住账号、密码、公网ip

(4)进行安全组配置,打开默认的80端口




3、域名
(1)万网
https://wanwang.aliyun.com/
(2)域名解析流程




4、putty
(1)下载地址
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
(2)安装流程


(3)连接服务器(依次填写公网ip、账号、密码)



三、搭建服务器环境
1、安装必要工具
yum -y install gcc gcc-c++ autoconf pcre-devel make automake
yum -y install wget httpd-tools vim
2、建立目录,便于以后运维
myDir(在根目录上,创建一个自定义文件夹,目录结构如下)
├──app
├──backup
├──download
├──logs
└──work
3、安装nginx
(1)官网
http://nginx.org/
(2)稳定版安装流程




(3)添加nginx稳定版的源(将复制的文本,粘贴到新建的文件内)
//将$releasever更改为系统的大版本号。
//7.x.x版本,就改为baseurl=http://nginx.org/packages/centos/7/$basearch/
vim /etc/yum.repos.d/nginx.repo
(4)查看源
yum list | grep nginx
(5)存在稳定版的源(1.16.0),确认无误

(6)运行安装命令
//过程中输入y,确认
yum install nginx
(7)查看版本,若出现版本号,则安装成功
nginx -v
网友评论