1:建立nginx yum 仓库 新建文件 /etc/yum.repos.d/nginx.repo nginx
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1centos
# yum list | grep nginx 执行命令发现最新版本url
# yum -y install nginx 安装nginx .net
这种安装和从源代码编译Nginx的安装,文件所处的位置不同,安装完执行下面的命令code
[root
@localhost
~]# find / -name *nginx*/etc/nginx/nginx.conf
get
[root
@localhost
~]
# whereis nginx nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx
编译
文件安装到了/etc/nginx下class
启动service
# service nginx startgrep