Introduction
nginx is a high-performance http and reverse proxy server that 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 balancing configuration.
Installation
In order to make Centos install nginx quickly and simply, the installation mode using Centos yum is used here, that is, you can use yum install nginx installation mode, which is compiled and installed relative to the source code, so The method is relatively simple and easier 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 corresponding installation file
Need to create files / etc/yum.repos.d/nginx.repo , command: vi /etc/yum.repos.d/nginx.repo
After creating the file, the configuration is as follows:
(To edit the file under Linux, Just vi nginx.repo and enter i to enter the editing state. After editing, press esc to exit the editing state, then enter: wq to save and exit
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
2 , enter: yum list nginx The appropriate version of nginx will be displayed, as shown below:
3, enter yum install nginx to complete the installation.
Start and stop nginx
Enter service nginx start to complete the startup
Service nginx stop Stop the service
After the startup is completed: You can enter http://ip/ in the browser to complete the test, the port number The default is 80
Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission
.The above introduces the installation of nginx under Centos, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.