Blogger Information
Blog 41
fans 0
comment 1
visits 40476
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Nginx从入门到实践 ----(安装篇)
yeyiluLAMP
Original
817 people have browsed it

环境准备:
1、确定系统网络、yum源可用
2、确认关闭iptables规则
3、确认停用Selinux
安装
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake

yum -y install wget httpd-tools

一次初始化
cd /opt
mkdir app download logs work backup

关闭iptables规则
iptables -L
iptables -t nat -L
iptables -t nat -F

yum 安装nginx

官网下载nginx:  https://nginx.org/en/linux_packages.html#stable

vim /etc/yum.repod/nginx.repo

[nginx] 
name=nginx repo 
baseurl=https://nginx.org/packages/OS/OSRELEASE/$basearch/ 
gpgcheck=0 
enabled=1

#修改baseurl os:centos  OSRELEASE:centos版本号

例如:Linux操作系统是centos6.x版本的,如下:

vim /etc/yum.repod/nginx.repo

[nginx] 
name=nginx repo
baseurl=https://nginx.org/packages/centos/6/$basearch/ 
gpgcheck=0 
enabled=1

:wq 保存退出

yum install -y nginx



查看nginx的版本

nginx -v


查看安装nginx编译参数:

nginx -V


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post