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 on centos

    18/07/2017Updated:19/07/2017No Comments2 Mins Read

    How can I install Nginx web server On CentOS Linux 6 or Red Hat? Nginx is faster at serving static files and consumes much less memory for concurrent requests because Nginx is event-based it doesn’t need to spawn new processes or threads for each request, so its memory usage is very low.

    Add nginx yum repository

    nano /etc/yum.repos.d/nginx.repo

    add this to Centos

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
    gpgcheck=0
    enabled=1

    add this if to RHEL

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
    gpgcheck=0
    enabled=1

    Install nginx web-server

    yum install nginx

    Sample outputs:

    Dependencies Resolved

    ================================================================================
    Package Arch Version Repository Size
    ================================================================================
    Installing:
    nginx i386 1.4.0-1.el6.ngx nginx 352 k

    Transaction Summary
    ================================================================================
    Install 1 Package(s)

    Total download size: 352 k
    Installed size: 741 k
    Is this ok [y/N]: y
    Downloading Packages:
    nginx-1.4.0-1.el6.ngx.i386.rpm | 352 kB 00:00
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Installing : nginx-1.4.0-1.el6.ngx.i386 1/1
    ———————————————————————-

    Thanks for using NGINX!

    Check out our community web site:
    * http://nginx.org/en/support.html

    If you have questions about commercial support for NGINX please visit:
    * http://www.nginx.com/support.html

    ———————————————————————-
    Verifying : nginx-1.4.0-1.el6.ngx.i386 1/1

    Installed:
    nginx.i386 0:1.4.0-1.el6.ngx

    Turn on nginx service

    chkconfig nginx on

    Start nginx server

    service nginx start

    Restart nginx server

    service nginx restart

    Stop nginx server

    service nginx stop

    Check nginx server status

    service nginx status
    centos nginx
    Previous ArticleStress test cpu on ubuntu
    Next Article How to install nginx by compiling source

    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