LoginSignup
0
1

More than 5 years have passed since last update.

nginxのソースからのインストール手順

Posted at
  • 前提ライブラリ導入
    • GCC
      • yum -y install gcc
    • PCRE(正規表現処理)
      • yum -y install pcre pcre-devel
    • zlib(gzip圧縮)
      • yum -y install zlib zlib-devel
    • OpenSSL(SSL/TLS通信)
      • yum -y install openssl openssl-devel
  • nginxソースファイルの入手

  • 以下サイトから対象のバージョンをダウンロード

    • http://nginx.org/en/download.html
    • mainline版(最新版)からstable(安定版)をお好みで選択する。
      • mainline版は新機能追加や、API互換に影響のある可能性のあるバグ修正も含めて最新のフィックスが適用される。
      • stable版はAPI互換性を重視して重大な脆弱性の修正のみを行う。
  • ファイル解凍

    • tar xzvf nginx-xx.xx.xx.tar.gz
  • インストール

    • cd nginx-xx.xx.xx
    • ./configure --prefix=/usr/local/nginx --sbin-path=/usr/sbin/nginx --add-module=/usr/local/src/nginxsrc/headers-more-nginx-module-0.25
    • 以下画面が表示されたら完了。nginx path prefix等はメモしておく。:
- Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + md5: using system crypto library
  + sha1: using system crypto library
  + using system zlib library

  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/sbin/nginx"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"
  • インストール
    • make
    • sudo make install
  • 導入完了確認
    • nginx -V
      • 以下の様な情報が出たことを確認
nginx version: nginx/1.8.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) 
configure arguments: --prefix=/usr/local/nginx --sbin-path=/usr/sbin/nginx
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1