zoukankan      html  css  js  c++  java
  • linux Nginx-1.10.2 安装部署教程

    一、下载Nginx以及依赖组件
    [root@localhost src]# wget http://nginx.org/download/nginx-1.10.2.tar.gz [root@localhost src]# wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz [root@localhost src]# wget http://zlib.net/zlib-1.2.11.tar.gz [root@localhost src]# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz

    安装C++编译环境
    [root@localhost src]# yum install gcc-c++

     安装Nginx及相关组件

     openssl安装

    [root@localhost src]# tar zxvf openssl-fips-2.0.10.tar.gz
    省略安装内容... [root@localhost src]# cd openssl-fips-2.0.10 [root@localhost openssl-fips-2.0.10]# ./config && make && make install
    省略安装内容...

     pcre安装

    [root@localhost src]# tar zxvf pcre-8.40.tar.gz
    省略安装内容... [root@localhost src]# cd pcre-8.40 [root@localhost pcre-8.40]# ./configure && make && make install
    省略安装内容...

     zlib安装

    [root@localhost src]# tar zxvf zlib-1.2.11.tar.gz
    省略安装内容... [root@localhost src]# cd zlib-1.2.11 [root@localhost zlib-1.2.11]# ./configure && make && make install
    省略安装内容...

     nginx安装

    [root@localhost src]# tar zxvf nginx-1.10.2.tar.gz
    省略安装内容... [root@localhost src]# cd nginx-1.10.2 [root@localhost nginx-1.10.2]# ./configure && make && make install
    省略安装内容...

    3、启动Nginx

    nginx的基本操作

    复制代码
    启动
    [root@localhost ~]# /usr/local/nginx/sbin/nginx
    停止/重启
    [root@localhost ~]# /usr/local/nginx/sbin/nginx -s stop(quit、reload)
    命令帮助
    [root@localhost ~]# /usr/local/nginx/sbin/nginx -h
    验证配置文件
    [root@localhost ~]# /usr/local/nginx/sbin/nginx -t
    配置文件
    [root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf
    复制代码


  • 相关阅读:
    洛谷P2216 理想的正方形
    洛谷P2698 花盆Flowerpot【单调队列】
    洛谷P2178 品酒大会【后缀数组】【单调栈】
    洛谷P2463 Sandy的卡片【后缀数组】【二分】
    PAT甲1038 Recover the smallest number
    PAT甲1101 Quick Sort
    PAT甲1031 Hello World for U【字符串】
    PAT甲1005 Spell it right【字符串】
    django_logging
    django_session
  • 原文地址:https://www.cnblogs.com/Nanaya/p/11759426.html
Copyright © 2011-2022 走看看