美文网首页
编译安装Ningx1.10.2

编译安装Ningx1.10.2

作者: i36X | 来源:发表于2017-11-13 19:00 被阅读0次
1. 下载nginx、pcre、zlib、openssl
# wget http://nginx.org/download/nginx-1.10.2.tar.gz
# wget https://ftp.pcre.org/pub/pcre/pcre-8.38.tar.gz
# wget https://ncu.dl.sourceforge.net/project/libpng/zlib/1.2.10/zlib-1.2.10.tar.gz
# wget http://distfiles.macports.org/openssl/openssl-1.0.2h.tar.gz
2. 解压*.tar.gz文件
# tar -zxvf <file_name>.tar.gz
3. 编译、安装、启动
# ./configure --prefix=/usr/local/nginx --with-pcre=/root/softs/pcre-8.38 --with-zlib=/root/softs/zlib-1.2.10 --with-openssl=/root/softs/openssl-1.0.2h

# make && make install

# nginx
4.配置nginx(已有nginx用户和组的情况下)
# cd /usr/local/nginx
# mkdir -p /usr/local/nginx/conf/conf.d
# vim conf/nginx.conf
---------------------------------
user nginx;
worker_processes auto;
error_log /data/log/nginx/error.log;
pid /var/run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections  1024;
}
http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /data/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /usr/local/nginx/conf/mime.types;
    default_type        application/octet-stream;
    include /usr/local/nginx/conf.d/*.conf;
}

相关文章

  • 编译安装Ningx1.10.2

    1. 下载nginx、pcre、zlib、openssl 2. 解压*.tar.gz文件 3. 编译、安装、启动 ...

  • 搭建并配置LAMP/LNMP环境

    如何编译安装软件编译安装是Linux安装软件的重要方式编译前的准备工作:./configure编译:make安装:...

  • Linux下编译Xmrig

    安装依赖 Ubuntu CentOS 安装 创建编译文件夹 编译安装 基本编译方式 静态编译方式 编译完成后使用l...

  • php 手动编译添加扩展

    在完成 php的编译安装后, 发现没有编译某此模块。手动添加安装。php源码编译安装 编译安装 在php源码包中 ...

  • 编译安装LNMP

    编译安装nginx 编译安装PHP 配置Nginx+PHP 安装MySQL

  • 编译安装LNMP2

    编译安装nginx 编译安装PHP 配置Nginx+PHP 安装MySQL

  • Centos7 安装Nginx

    一、编译安装 1、安装编译安装所需要的依赖 2、下载Nginx 3、解压 4、编译安装(默认设置) 5、查看安装目...

  • Hbuilder scss/sass编译 插件

    1. 安装插件 工具 -> 插件安装 -> scss/sass编译 -> 安装安装 scss/sass编译 插件 ...

  • nginx+passenger配置rails的生产环境

    先编译方式安装好nginx ==> 安装教程 安装passenger 编译安装,只需要在原来的编译配置参数后补上就...

  • nginx 编译安装支持 ssl

    nginx 编译安装支持 ssl [toc] 标签(空格分隔): nginx 安装编译环境和必要的库 编译安装pc...

网友评论

      本文标题:编译安装Ningx1.10.2

      本文链接:https://www.haomeiwen.com/subject/gattvxtx.html