一. 環(huán)境調(diào)試確認(rèn)
1. 確認(rèn)系統(tǒng)網(wǎng)絡(luò)。
2. 確認(rèn)yum可用。
3. 確認(rèn)關(guān)閉iptables規(guī)則。
- iptables是linux下的防火墻組件服務(wù),相對(duì)于windows防火墻而言擁有更加強(qiáng)大的功能。
- 檢查是否安裝 `rpm -qa|grep iptables` 如果沒有安裝,可以通過(guò)`yum install iptables`進(jìn)行安裝。
- 檢查iptables服務(wù)是否運(yùn)行,`server iptables status`
- 檢查iptables配置規(guī)則,`iptables -L` 或 `iptables -t nat -L`
- 關(guān)閉 iptables對(duì)應(yīng)規(guī)則,`iptables -F` 或 `iptables -t nat -F`
4. 確認(rèn)停用selinux。
- 確認(rèn)selinux是否開啟,`getenforce`
- 關(guān)閉selinux,`setencorce 0`
5. 基本庫(kù) 安裝 `yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake`
`yum -y install wget httpd-tools vim`
6. 目錄初始化 `cd/opt;`
mkdir app // 代碼目錄
download // 源碼包等...
logs // 自定義日志
work // shell 腳本
backup // 備份
二. nginx版本
Mainline version - 開發(fā)版
Stable version - 穩(wěn)定版
Legacy version - 歷史版本
下載地址
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1
官方y(tǒng)um源
配置yum源
vim /etc/yum.repos.d/nginx.repo

image.png
通過(guò)管道服務(wù)查看nginx版本 yum list |grep nginx
安裝 yum install nginx
檢查安裝版本nginx -v