Installation of CentOS under Nginx

Source: Internet
Author: User
Introduction

Nginx is a high-performance HTTP and reverse proxy server, because of its stability, rich functionality, and low energy consumption is widely used. This article will demonstrate the installation of Nginx on FEDORA16 and integrate Tomcat to do server load balancing configuration.

Installation

In order to make CentOS fast, simple installation nginx, here is the use of the CentOS Yum installation mode, that is, can use the Yum install Nginx installation mode, relative to the source code compiled installation, this way is relatively concise, It is also relatively easy for beginners to get started.

1, before installing Nginx, you must first configure a repository, then this configuration is to add a Yum installation library file for the service, CentOS will automatically go online to find the appropriate installation files

Need to establish file/etc/yum.repos.d/nginx.repo, command: Vi/etc/yum.repos.d/nginx.repo

Complete the file, configured as follows:

(under Linux to edit the file, only need VI Nginx.repo input I to edit the state, edit the completion of the input press ESC to exit the edit state, and then enter: Wq to save and exit

[Nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1
Save, Exit (: Wq can be saved)

2, Input: Yum list Nginx will then display the appropriate version of Nginx, as shown in:

3, enter Yum install Nginx to complete the installation.

Start and stop Nginx

Enter service Nginx start to complete startup

Service Nginx Stop Stop Services

After startup: The browser can enter http://ip/to complete the test, the port number defaults to 80

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The above describes the installation of CentOS under the Nginx, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.