Close Menu
    Facebook X (Twitter) Instagram
    • Download Cisco Packet Tracer
    Facebook X (Twitter) Instagram Pinterest Vimeo
    IT Beginner
    • Home
    • Server
    • WordPress
    IT Beginner
    Home»CentOS»How to install nginx by compiling source
    CentOS

    How to install nginx by compiling source

    18/07/2017No Comments2 Mins Read

    Nginx is an open source, fast, light weight and highly customable web server that is similar to Apache. Unfortunately configuring and setting him up is not that easy compared to Apache. nginx is both web server and reverse proxy server.

    Modules can not be loaded later via a config file like Apache modules, they must be compiled into the Nginx binary.

    If you have centos and want to install nginx the easy way, feel free to follow: How to install nginx on centos

    Dependencies
    There are certain libraries required in order for nginx to compile.

    For Ubuntu, Mint, or Debian based distributions

    apt-get install libpcre3-dev libssl-dev

    For Fedora, Centos, or Red Hat based distributions

    yum install pcre-devel zlib-devel openssl-devel

    Download nginx
    You can go to nginx to get the lastest stable version
    http://nginx.org/en/download.html

    As the time I’m writing, the lastest stable version is 1.4.1

    wget http://nginx.org/download/nginx-1.4.1.tar.gz

    Extract the archive:

    tar xvzf nginx-1.4.1.tar.gz

    Go to nginx directory

    cd nginx-1.4.1

    Compile nginx
    This is where we can choose what we want to compile and install, and where the build process is determined based on what libraries you have, what architecture processor and the like.

    To identify list of all the configuration options

    ./configure --help

    By default, Nginx will be installed in /usr/local/nginx. You may change this and other options with the compile-time options.

    Make and Install
    Lets keep thing simple here, i will use default install location with ssl module

    ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
    # make
    # make install

    Start Nginx

    For Ubuntu, Mint, or Debian based distributions

    # /usr/local/sbin/nginx

    For Fedora, Centos, or Red Hat based distributions

    # chkconfig nginx on
    # service nginx start
    apache compiling nginx source
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleHow to install nginx on centos
    Next Article How to update and upgrade with fastest mirror from the command line

    Related Posts

    Tips – Tricks

    How to fix nginx an upstream response is buffered to a temporary file error

    05/08/2017
    Tips – Tricks

    Optimize WordPress with Nginx

    04/08/2017
    CentOS

    How to install vsftpd on centos 6

    03/08/2017
    Subscribe
    Notify of
    guest


    guest

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    Tags
    apache centos Centos 6 cuda Desktop Environment dual boot environment featured gnome GUI hostname hosts intel kernel kill lamp server lemp server life MariaDB netflix nginx nvidia password php-fpm phpmyadmin pids processes s.m.a.r.t Security session solid state drive ssd ssh ssh server tag 1 tag 2 Ubuntu upgrade varnish VirtualBox VNC Server web server window manager wordpress xfce
    Facebook X (Twitter) Instagram Pinterest

    Type above and press Enter to search. Press Esc to cancel.

    wpDiscuz