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 on centos
    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
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    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
    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