Install nginx in Ubuntu. You can simply use apt-get install nginx, which is very convenient.
However, if CentOS6.2 is installed today and yum install nginx is not available, you must first handle the source. The following describes the complete installation process, which is also very simple:
1. Run CentOS 6 first:
Rpm-ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
2. View nginx information of yum
[] # Yum info nginx
Loaded plugins: fastestmirror
Determining fastest mirrors
* Base: pai.esocc.com
* Extras: pai.esocc.com
* Updates: 2.16.esocc.com
Base | 3.7 kB
Base/primary_db | 4.4 MB
Extras | 3.5 kB: 00
Extras/primary_db | 19 kB: 00
Nginx | 2.9 kB: 00
Nginx/primary_db | 22 kB: 00
Updates | 3.5 kB: 00
Updates/primary_db | 2.1 MB
Installed Packages
Name: nginx
Arch: x86_64
Version: 1.4.0
Release: 1. el6.ngx
Size: 874 k
Repo: installed
From repo: nginx
Summary: nginx is a high performance web server
URL: http://nginx.org/
License: 2-clause BSD-like license
Description: nginx [engine x] is an HTTP and reverse proxy server, as well
: A mail proxy server
3. Install and start Nginx
[Root @ server ~] # Yun install nignx
[Root @ server ~] # Service nginx start
Starting nginx: [OK]
4. Enter the browser and enter http: // 192.168.0.161/for testing. If you see
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Specified cial support is available at nginx.com.
Thank you for using nginx.
Congratulations! you have succeeded!
If you cannot connect to nginx, there are many reasons, but you can first check 1. Whether the nginx service is actually up; 2. Whether the linux server firewall is enabled