RHEL / Centos 6: Install Nginx Using Yum Command

原创 2013年12月05日 09:59:16

RHEL v6.x user type the following command:
# wget http://nginx.org/packages/rhel/6/noarch/RPMS/nginx-release-rhel-6-0.el6.ngx.noarch.rpm
# rpm -ivh nginx-release-rhel-6-0.el6.ngx.noarch.rpm

Sample outputs:

warning: nginx-release-rhel-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing...                ########################################### [100%]
   1:nginx-release-rhel     ########################################### [100%]

Step #2: Install nginx web-server

Type the following yum command to install nginx web-server:
# yum install nginx


Step #3: Turn on nginx service

Type the following command:
# chkconfig nginx on

How do I start / stop / restart nginx web-server?

Type the following commands:
# service nginx start
# service nginx stop
# service nginx restart
# service nginx status
# service nginx reload


Step #4: Configuration files

  1. Default configuration directory: /etc/nginx/
  2. Default SSL and vhost config directory: /etc/nginx/conf.d/
  3. Default log file directory: /var/log/nginx/
  4. Default document root directory: /usr/share/nginx/html
  5. Default configuration file: /etc/nginx/nginx.conf
  6. Default server access log file: /var/log/nginx/access.log
  7. Default server access log file: /var/log/nginx/error.log

To edit the nginx configuration file, enter:
# vi /etc/nginx/nginx.conf

相关文章推荐

How To Install nginx on CentOS 6 with yum

  • 2015年11月22日 22:32
  • 15KB
  • 下载

How to Install Ruby 2.1.1 on CentOS & RHEL 6 using RVM

Ruby is a dynamic, object-oriented programming language.We are using RVM, which stands for Ruby Vers...

Install LEMP (Linux, Nginx, MySQL 5.5.29, PHP 5.4.11) on RHEL/CentOS 5-6 & Fedora 18-12

This howto guide explains more deeply on how to install LEMP (Linux, Nginx, MySQL, PHP) on pre-inst...
  • Viidiot
  • Viidiot
  • 2013年09月22日 08:36
  • 1312

RHEL 6.X使用CentOS yum源

  • 2013年04月18日 15:20
  • 22KB
  • 下载

Install WordPress 3.6.1 Using LAMP or LEMP on RHEL, CentOS & Fedora

Well, on the internet you will find a number of good and better ways to install WordPress on Linux, ...
  • Viidiot
  • Viidiot
  • 2013年09月23日 21:44
  • 927

Install Nginx/PHP-FPM on Fedora 20/19, CentOS/RHEL 6.5/5.10

Install Nginx/PHP-FPM on Fedora 20/19, CentOS/RHEL 6.5/5.10 Updated by JR on Dec 2, 2013 in CentO...

This howto guide shows you’ll how to enable EPEL repository under RHEL/CentOS 6/5 to install additio

This howto guide shows you’ll how to enable EPEL repository under RHEL/CentOS 6/5 to install addit...

CentOS / RHEL v6.x: Install And Configure Serial Console

CentOS / RHEL v6.x: Install And Configure Serial ConsoleYou need to use setserial command. The comma...

CentOS / RHEL / Scientific Linux 6 Enable & Install EPEL Repo

Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maint...

Install MySQL 5.5.30 on RHEL/CentOS 6-5, Fedora 18-12

This how-to guide is to install or upgrade your MySQL version on RHEL/CentOS 6-5 and Fedora 18,17/1...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:RHEL / Centos 6: Install Nginx Using Yum Command
举报原因:
原因补充:

(最多只允许输入30个字)