• centos7安装nginx详细步骤 useradd abc 新建用户 在 homg下出现abc文件夹


    centos7安装nginx详细步骤

    一、下载nginx安装包和所需依赖

    groupadd -g 1002 nginx                                       #创建nginx用户
    useradd -g 1002 -u 1002 nginx
    cd /usr/local                                                #进入安装目录
    wget https://nginx.org/download/nginx-1.16.1.tar.gz          #下载nginx1.16安装包
    tar xf nginx-1.16.1.tar.gz                                   #解压
    cd nginx-1.16.1/                                             #进入nginx目录
    yum install -y vim lrzsz tree screen psmisc lsof tcpdump wget ntpdate gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel nettools iotop bc zip unzip zlib-devel bash-completion nfs-utils automake libxml2 libxml2-devel libxslt libxslt-devel perl perl-ExtUtils-Embed  
    #安装依赖包
    

    二、配置编译安装

    ./configure \               
        --user=nginx \
        --group=nginx \
        --with-threads \
        --with-file-aio \
        --with-http_ssl_module \
        --with-http_v2_module \
        --with-http_realip_module \
        --with-http_addition_module \
        --with-http_xslt_module=dynamic \
        --with-http_image_filter_module=dynamic \
        --with-http_geoip_module=dynamic \
        --with-http_sub_module \
        --with-http_dav_module \
        --with-http_flv_module \
        --with-http_mp4_module \
        --with-http_gunzip_module \
        --with-http_gzip_static_module \
        --with-http_auth_request_module \
        --with-http_random_index_module \
        --with-http_secure_link_module \
        --with-http_degradation_module \
        --with-http_slice_module \
        --with-http_stub_status_module \
        --with-stream=dynamic \
        --with-stream_ssl_module \
        --with-stream_realip_module \
        --with-stream_geoip_module=dynamic \
        --with-stream_ssl_preread_module \
        --with-compat  \
        --with-pcre-jit					#配置编译模块
    make && make install         #编译安装
    vim /etc/profile             #将下方内容写入环境变量
    export /usr/local/nginx/sbin:$PATH
    source /etc/profile	#刷新环境变量使之生效
    

    三、启动

    nginx                #启动nginx
    nginx -s reload      #重启nginx
    nginx -s stop        #停止nginx
    
    https://www.cnblogs.com/zzxsqt/p/15992102.html
  • 相关阅读:
    Python 递归函数详解
    CentOS7 删除virbr0虚拟网卡
    /usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:245: running exec setns .....
    Linux系统添加永久静态路由的方法(包含Centos7)
    正则表达式
    Unity3D -- shader语法内置函数
    Unity3D -- shader光照常用函数和变量
    Unity3D -- shader常用函数和变量
    Unity 着色器训练营(2)
    Unity Shader着色器优化
  • 原文地址:https://www.cnblogs.com/sunny3158/p/16708755.html
Copyright © 2020-2023  润新知