Nginx简单安装

来源:互联网 发布:烘干法测定含水量数据 编辑:程序博客网 时间:2024/06/14 00:12

1.环境变量

Centos 6.5      Nginx-1.10.1

2.安装软件

   (1) yum install -y  pcre* 

   (2) yum install -y openssl*

   (3) yum install -y gcc*  

   (4) yum install -y make*

3.安装Nginx

   (1)下载Nginx

        wget  http://nginx.org/download/nginx-1.10.1.tar.gz

   (2)解压安装

        (i) tar -zxvf  nginx-1.10.1.tar.gz

        (ii) cd  nginx-1.10.1

        (iii) ./configure  --with-http_ssl_module --with-http_v2_module  --with-http_stub_status_module --with-pcre

              不指定prefix,默认安装目录/usr/local

        (iv)  make  &  make  install

4.开启Nignx

   (1) cd /usr/local/nginx/sbin

   (2) 开启

        ./nginx

   (3)关闭防火墙

5.浏览器访问  http://192.168.50.10:80

    



0 0
原创粉丝点击