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