Use Nginx + Tomcat 7 to achieve Load Balancing under RHEL6.3 1. Install Nginx server (use root user operation) 1.1. Get the software source required for Nginx installation. The software source can be in ingress) http://nginx.org/packages/rhel/6/noarch/R
Use Nginx + Tomcat 7 to achieve load balancing in RHEL6.3
1. Install the Nginx server (using the root user)
1.1 obtain the software source required for Nginx Installation
Software sources can be found on http://nginx.org/en/download.html pages
If you do not understand the English language, you can download and install the rpm package from the following address to obtain the software source :)
Http://nginx.org/packages/rhel/6/noarch/RPMS/nginx-release-rhel-6-0.el6.ngx.noarch.rpm
1.2 install Nginx
# Yum install nginx
Tip:
Nginx-1.2.6-1.el6.ngx.x86_64 installed successfully
1.3 query the Nginx software File Installation path
# Rpm-ql nginx-1.2.6-1.el6.ngx.x86_64.
Query results:
/Etc/logrotate. d/nginx
/Etc/nginx
/Etc/nginx/conf. d
/Etc/nginx/conf. d/default. conf
/Etc/nginx/conf. d/example_ssl.conf
/Etc/nginx/fastcgi_params
/Etc/nginx/koi-utf
/Etc/nginx/koi-win
/Etc/nginx/mime. types
/Etc/nginx. conf
/Etc/nginx/scgi_params
/Etc/nginx/uwsgi_params
/Etc/nginx/win-utf
/Etc/rc. d/init. d/nginx
/Etc/sysconfig/nginx
/Usr/sbin/nginx
/Usr/share/nginx
/Usr/share/nginx/html
/Usr/share/nginx/html/50x.html
/Usr/share/nginx/html/index.html
/Var/cache/nginx
/Var/log/nginx
1.4 query the service installation status
# Chkconfig -- list | grep nginx
Display result:
Nginx 0: off1: off2: on3: on4: on5: on6: off
It indicates that the Nginx service has been installed successfully and started upon startup :)
1.5 query the new user status
# Less/etc/passwd | grep nginx
Display result:
Nginx: x: 496: 493: nginx user:/var/cache/nginx:/sbin/nologin
A new nginx user group and an nginx user are created to execute the nginx service.