CentOS 6.5 configuration yum install Nginx

  
 

Compiling and installing Nginx and other methods may be a bit cumbersome. This article describes how to install Nginx with yum source.

First, create a source configuration file in the /etc/yum.repos.d/directory nginx.repo:cd /etc/yum.repos.d/vim nginx.repo

Fill in the following: [nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1

Save, it will generate a /etc /yum.repos.d/nginx.repo file.

The following instructions can be directly installed to automatically install Nginx: yum install nginx -y

Installation is complete, the following can directly start Nginx: /etc/init.d/nginx start< Br>

Nginx is now started, you can see the Nginx welcome page directly by accessing the server.

If you still can't access it, you need to configure the Linux firewall.

Nginx command and configuration file location: /etc/init.d/nginx start # Start Nginx service /etc/init.d/nginx stop # Stop Nginx service /etc/nginx/nginx.conf # Nginx Configuration File Location

At this point, Nginx has been fully configured and installed.

Copyright © Windows knowledge All Rights Reserved