zoukankan      html  css  js  c++  java
  • Nginx安装部署手册

    1、准备离线安装包

    • openssl-fips-2.0.10.tar.gz
    • pcre-8.40.tar.gz
    • zlib-1.2.11.tar.gz
    • nginx-1.19.0.tar.gz

    2、上传并解压离线包

    (1)将离线包上传至服务器,如/data/tools目录

    (2)解压离线包

    • cd /data/toos
    • tar -zxvf nginx-1.19.0.tar.gz
    • tar -zxvf openssl-fips-2.0.10.tar.gz
    • tar -zxvf zlib-1.2.11.tar.gz
    • tar -zxvf nginx-1.19.0.tar.gz

    3、安装gcc-c++环境

    (1)监测gcc-c++环境是否已安装

    yum list gcc-c++

    如图表示已安装

    (2)安装gcc-c++

    yum install -y gcc-c++

    4、安装nginx依赖组件

    (1)openssl 安装

    cd /data/tools/openssl-fips-2.0.10
    ./config && make && make install

    (2)pcre 安装

    cd /data/tools/pcre-8.40
    ./configure && make && make install

    (3)zlib 安装

    cd /data/tools/zlib-1.2.11
    ./configure && make && make install

    5、安装nginx

    (1)编译nginx

    cd /data/tools/nginx-1.19.0
    ./configure --with-http_stub_status_module --with-http_ssl_module --with-mail_ssl_module --with-stream  --prefix=/data/nginx && make && make install
    nginx集成ssl模块:
    --with-http_stub_status_module --with-http_ssl_module
    nginx集成stream模块:
    --with-mail_ssl_module --with-stream
    nginx指定安装路径:
    --prefix=(后跟安装路径)

    (2)nginx基础命令

    启动:/data/nginx/sbin/nginx
    停止:/data/nginx/sbin/nginx -s stop
    不停服务更改配置文件:/data/nginx/sbin/nginx -s reload

    (3)访问服务:ip:80(默认端口为80)

  • 相关阅读:
    maven编译时错误:无效的目标发行版
    参数传递方法(用Delphi的汇编代码解释)
    Playing with coroutines and Qt
    Qt的一些开发技巧
    刘晏:大唐经济战线的英雄
    Qt的焦点策略
    高级程序员与CTO技术总监首席架构师
    Python入门机器学习
    Service Mesh(服务网格)
    自定义博客园Markdown样式.超简单!
  • 原文地址:https://www.cnblogs.com/liviniu/p/14957426.html
Copyright © 2011-2022 走看看