- Cheat Sheet and Example is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools







Nginx Configuration Examples

Nginx : Installing from Sources

Install dependencies for nginx

# yum install pcre-devel
# yum install zlib-devel
# yum install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel

Installing Nginx

# tar zxf nginx-1.11.1.tar.gz
# cd nginx-1.11.1
# ./configure --prefix=/usr/local/nginx-1.11.1

checking for sha1 in system OpenSSL crypto library ... not found
checking for zlib library ... found
creating objs/Makefile

Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + using builtin md5 code
  + sha1 library is not found
  + using system zlib library

  nginx path prefix: "/usr/local/nginx-1.11.1"
  nginx binary file: "/usr/local/nginx-1.11.1/sbin/nginx"
  nginx modules path: "/usr/local/nginx-1.11.1/modules"
  nginx configuration prefix: "/usr/local/nginx-1.11.1/conf"
  nginx configuration file: "/usr/local/nginx-1.11.1/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx-1.11.1/logs/"
  nginx error log file: "/usr/local/nginx-1.11.1/logs/error.log"
  nginx http access log file: "/usr/local/nginx-1.11.1/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 
# make install
# cd /usr/local
# ln -s nginx-1.11.1 nginx
# useradd -r nginx

       -r This flag is used to create a system account. That is, a user with a UID lower than the value of UID_MIN defined in
          /etc/login.defs and whose password does not expire. Note that useradd will not create a home directory for such an user,
          regardless of the default setting in /etc/login.defs. You have to specify -m option if you want a home directory for a
          system account to be created. This is an option added by Red Hat

middleware/web/nginx/install/source.html.txt ยท Last modified: 2017/05/06 by admin

Page Tools