• 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
    复制代码


  • 相关阅读:
    linux上传文件到oss的方法
    centos6.5重装python
    nfs共享文件夹
    mysql报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    搭建网关服务器
    面试总结
    innerText兼容性问题
    Title Case
    Character frequency
    Least Common Multiple
  • 原文地址:https://www.cnblogs.com/Nanaya/p/11759426.html
Copyright © 2020-2023  润新知