Install nginx in Centos

Source: Internet
Author: User
: This article describes how to install nginx in Centos. For more information about PHP tutorials, see. Introduction

Nginx is a high-performance http and reverse proxy server. it is widely used for its stability, rich functionality, and low energy consumption. This article will demonstrate how to configure and install nginx on fedora16 and integrate tomcat for server load balancer configuration.

Install

To enable quick and concise installation of nginx in Centos, the installation mode of Centos yum is used here, that is, the installation mode of yum install nginx can be used, this method is simple and easy for beginners.

1. you must configure a repository before installing nginx. Therefore, this configuration adds a yum installation library file for the service, and centos will automatically go online to find the corresponding installation file.

You need to create the file/etc/yum. repos. d/nginx. repo. Command: vi/etc/yum. repos. d/nginx. repo

After the file is created, the configuration is as follows:

(To edit a file in linux, you only need to input vi nginx. repo to the editing status. after editing, press esc to exit the editing status. Then, enter wq to save and exit.

[nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1
Save and exit (: wq to save)

2. enter: yum list nginx and the appropriate nginx version will be displayed, as shown in:

3. enter yum install nginx to complete the installation.

Start and stop nginx

Enter service nginx start to start

Service nginx stop service

After startup: you can enter http: // ip/in the browser to complete the test. the default port number is 80.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The above describes how to install nginx in Centos, including some content. if you are interested in the PHP Tutorial, please help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.