Close Menu
    Facebook X (Twitter) Instagram
    • Articles
    • How it Works
    • Our Story
    • Contact Us
    Facebook X (Twitter) Instagram Pinterest Vimeo
    IT Beginner
    • Home
    • Blog
      • Happiness
      • Productivity
      • Leadership
    • About us
    • Contact us
    IT Beginner
    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
    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
    • Productivity
    • Leadership

    No posts

    No posts

    Subscribe to Newsletter
    Our Socials
    • Instagram
    • Facebook
    • Twitter
    • YouTube
    • LinkedIn

    Archives

    • April 2025
    • May 2024
    • March 2023
    • July 2022
    • March 2022
    • July 2020
    • January 2019
    • August 2018
    • July 2018
    • August 2017
    • July 2017
    • September 2016

    Categories

    • Business
    • CCNA 1 Instructor Materials
    • CentOS
    • Database
    • Debian
    • Fedora
    • Firefox
    • Happiness
    • Hardware
    • ICND1 Labs
    • ICND2 Labs
    • Leadership
    • Linux Essentials
    • Linux Mint
    • Marketing
    • My SQL
    • Netflix
    • Networking
    • Productivity
    • Resources
    • Security
    • SEO
    • Server
    • Social Media
    • Software
    • Tips – Tricks
    • Ubuntu
    • Uncategorized
    • User Experience
    • WordPress
    • Xubuntu

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna accumsan in scelerisque.

    Facebook X (Twitter) Instagram Pinterest

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

    wpDiscuz