# nginx是一款功能强大,开源软件
1,系统版本和内核版本
,,,,,
,,,,,,(root@node06 ~) # uname - r
,,,,,,,3.10.0-327.el7.x86_64
,,,,,,(root@node06 ~) #猫/etc/redhat-release
,,,,,,,Linux CentOS释放7.2.1511(核心),
,,,,,,(root@node06 ~) #
2,软件包版本,nginx-1.11.10.tar。广州,(包的地址在介绍里)
3,安装依赖
,,,,,(root@nginx ~) # yum安装- y gcc, pcre-devel, openssl-devel
4,创建nginx启动用户,需要的目录并解压安装包。
,,,,,(root@nginx ~) # useradd nginx
,,,,,root@nginx ~ # mkdir - p/usr,本地/nginx/{客户,代理,fastcgi、uwsgi scgi}
,,,,,(root@nginx ~) #焦油zxf nginx-1.11.10.tar.gz
,,,,,(root@nginx ~) # cd nginx-1.11.10/
5,配置nginx的安装参数和编译
,,,,,
[root@nginx nginx-1.11.4] # ./configure \
——prefix=/usr/地方/nginx \
——用户=nginx \
——组=nginx \
——with-http_ssl_module \
——with-http_flv_module \
——with-http_stub_status_module \
——with-http_gzip_static_module \
——http-client-body-temp-path=/usr/地方/nginx/客户端\
——http-proxy-temp-path=/usr/地方/nginx/代理\
——http-fastcgi-temp-path=/usr/地方/nginx/fastcgi \
——http-uwsgi-temp-path=/usr/地方/nginx/uwsgi \
——http-scgi-temp-path=/usr/地方/nginx/scgi \
——with-pcre \
——with-file-aio \
——with-http_secure_link_module
[root@nginx nginx-1.11.10] #做,,使安装
6,验证安装是否成功
,,,(root@nginx ~) # cd/usr/local/nginx/
,,,,(root@nginx ~) # ls sbin/
,,,,证明安装成功
7日启动nginx并设置开机自启
,,,(root@nginx ~) #/usr/local/nginx/sbin/nginx
,,,(root@nginx ~) # vim /etc/d/自动加载
,,,/usr/地方/nginx/sbin/nginx
,,,(root@nginx ~) # chmod + x/etc/rc.d/rc.当地的,- - - - - -→centos7.2需要这一步
8日验证nginx是否正常启动
,,,打开网页输入,,,http:// ,,,能看到nginx提供的页面表示安装成功
centos7.2下部署nginx