Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Openfire achieve load balancing cluster by Nginx     - Android Studio Clear Project or Rebuild Project Error (Linux)

- CentOS 5.5 install ntop (Linux)

- To build a private Docker registry (Server)

- Some common Linux commands Study Notes (Linux)

- How to add any of a Linux distribution beautiful fonts (Linux)

- Let OpenCV face detection score output codes (Programming)

- grub boot error resolution examples (Linux)

- LVM mirrored logical volume to achieve (Linux)

- Ubuntu 32 compile Android 4.0.4 Problems (Linux)

- Linux process stack and process function stack frame (Linux)

- How to run Kali Linux 2.0 in Docker container (Linux)

- Delegate in C # (Programming)

- Red Hat Enterprise Linux configuration VNC multi-user access methods (Linux)

- dmidecode command Detailed (Hardware information) (Linux)

- CentOS 6.5 / 6.6 modify the default SSH port number (Linux)

- CentOS installation Percona Server 5.5.42 compiling problem solve one case (Linux)

- Linux boot the system does not display a progress bar setting method (Linux)

- Strategy Games Ubuntu installation of Wesnoth 1.12.1 (Linux)

- VMware installed Linux system and JDK deployment (Linux)

- DRBD Principle and Features Overview (Server)

  Openfire achieve load balancing cluster by Nginx
  Add Date : 2018-11-21      
  Some time ago realized Openfire cluster deployment, if you want to achieve in your application, we also need to apply a critical job: load distribution, we select the tool load is Nginx (The reason is simple: open source, free).

1, install nginx (RedHat Enterprise Edition 6.5 64bit environment)

Nginx official website to download the latest version of the file, the latest version when nginx-1.9.3.tar.gz

The latest version was chosen because the new version of nginx has provided support tcp load, no need to introduce other projects;

installation steps:

1, using the tar command to extract the project files: tar -zxvf nginx-1.9.3.tar.gz

2, down into the unpacked project with the path to re-compile the project: ./configure --prefix = / usr / local / nginx --with -stream


If you need to use load tcp protocol at compile time it has to pass parameters --with -stream

System error, suggested that the lack or pcre zlib library, two stocks that mirror a file system, we follow the prompts to install the two libraries, follow these steps:

1, add the image file to the virtual machine

2, the image file will be mounted under the path:

mount --bind /media/RHEL_6.5 x86_64 Disc 1 /root/redhat6.5iso

3, using the command yum install the missing libraries:

yum install pcre *

yum install zlib *

3, the use of make, make install command to install

First implementation of make command, and then execute the command make install

4, modify the configuration

Using the vi editor /usr/local/nginx/conf/nginx.conf configuration files, some configuration information added to it

stream {
      upstream backend {
                hash $ remote_addr consistent;
                server weight = 5;
                server weight = 5;
        server {
            listen 5222;
            proxy_connect_timeout 10s; long must set the connection timeout when #
            proxy_timeout 30s; long must set the proxy timeout #
            proxy_pass backend;

5, start

The latest version of nginx start command: / usr / local / nginx / sbin / nginx, Close command: / usr / local / nginx / sbin / nginx -s stop
- CentOS yum install LNMP PHP5.4 version (Server)
- Linux server alarms using Java (Server)
- Python developer of time-saving method (Programming)
- C ++ in the elimination Wunused (Programming)
- JDK comes with tools JPS (Linux)
- Manual cleaning Oracle audit records (Database)
- Laravel 4.2 Laravel5 comprehensive upgrade Raiders (Server)
- How to install Visual Studio Code on Ubuntu (Linux)
- How to achieve the MySQL Oracle table associated with the two operations update (Database)
- Linux three ways to set environment variables (Linux)
- MySQL Study of --Percona Server 5.5 Upgrade 5.6 (Database)
- Ubuntu 14.04 / Linux Mint 17 How to install the MintMenu 5.5.2 menu (Linux)
- MongoDB Study Notes (1) - Install MongoDB on Windows systems (Database)
- Caffe install under Ubuntu 14.04 64bit (Linux)
- OpenSSL Introduction and compilation steps on Windows, Linux, Mac systems (Linux)
- Teach you how to synchronize Microsoft OneDrive in Linux (Linux)
- MogileFS system installation configuration example (Server)
- Use pg_basebackup build PostgreSQL streaming replication environment (Database)
- How to install Eclipse Luna IDE on CentOS 7 / RHEL 7 (Linux)
- Linux common network tools: Scan routing of mtr (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.