Xtream-UI Load Balancer Installation

XtreamUI Things

Xtream-UI Load Balancer Installation

A Load Balancer is a network function to distribute network traffic across multiple servers, providing improved scaling and network resiliance. Load Balancers are ususally deployed in front of a cluster of application or SIP servers, distributing traffic.

1- Install Main Server
run these code on Main Server :

Bash:
1. sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install software-properties-common libxslt1-dev libcurl3 libgeoip-dev python -y;
 
2. wget https://github.com/emre1393/xtreamui_mirror/raw/master/install.py;

3. sudo python install.py

## Now Type: MAIN #

 

***NOW OPEN PORTS 7999 in MAIN SERVER***

Bash:
## ***Please Note in the Main Server you must open port 7999
## 
(If you see LB server , in servers list is offline or installing and not Online)

## Do it :
sudo iptables -F
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 7999 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -L
sudo apt-get install iptables-persistent
sudo netfilter-persistent save
sudo netfilter-persistent reload
service iptables save

2- Install ADMIN Panel :
Download ADMIN Panel files and copy in this path all contents in the downloaded folder (XtreamUI-master):
/home/xtreamcodes/iptv_xtream_codes

Download latest ADMIN Panel from this link or every where you have (now I post this , its latest Admin releaseR22_Beta):

Login details :
Username: admin
Password: admin

3- Install LB Server :
DO THIS ON YOUR LOAD BALANCER (LB) SERVERS and NOT ON MAIN SERVER

*DO NOT ADD THE LB SEVER TO THE PANEL YET*

Run the below command as root in putty – All 1 Command:

Bash:
1.sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install libxslt1-dev libgeoip-dev python

 2. sudo wget https://github.com/emre1393/xtreamui_mirror/raw/master/install.
 3. sudo python install.py

## Now Type: LB

#
# Answer "Y" to any Questions ##

## Enter Your MAIN SERVER IP Address

## 
Enter Your saved SQL Password (Its the pass it gave you after installing the MAIN and you saved)

## Load Balancer Server ID - 2 (or 3 if its your 3rd server including the main and so on)

## Answer Y to any Questions ##

## Still on the LB Server - In putty install this:
sudo apt-get install libcurl3 -y

## Now Add the LB Server to the panel (Add Existing LB . No SSH Pass needed) ##

## Run this command on the LB Server in putty to start the LB Server ##
/home/xtreamcodes/iptv_xtream_codes/start_services.sh

4- Auto Start Xtream UI servers after reboot
for activate auto start Xtream UI after Reboot do this steps :
on MAIN and LB servers run in putty ssh :

Bash:
sudo crontab -e
## in the page opened add this cronjob in the list : (if its first time you run crontab command , its ask you choose editor , choose "1" and Enter)
@reboot root /home/xtreamcodes/iptv_xtream_codes/start_services.sh

## For save nano editor run "CTRL + O" and "Enter" and then "CTRL + X" ##

5- Install phpMyAdmin on Main Server

Bash:
sudo apt update && sudo apt upgrade -y
sudo apt install phpmyadmin php-mbstring php-gettext

## For the server selection, choose apache2

## Select Yes when asked whether to use dbconfig-common to set up the database

## You will then be asked to choose and confirm a MySQL application password for phpMyAdmin


sudo phpenmod mbstring

sudo systemctl restart apache2

sudo mysql
mysql -u root -p
Password:

## Enter Main MySQL Password (MySQL application password for phpMyAdmin you choose in previous step(2) in phpMyAdmin installation)

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
SELECT user,authentication_string,plugin,host FROM mysql.user;

## PASSWORD is above password you entered for root

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';

FLUSH PRIVILEGES;

exit;

http://your_domain_or_IP/phpmyadmin

##Log in to the interface, either as root or with the new username and password you just configured.

Username : root
Password: PASSWORD You entered

** Notice : Important to install libcurl3 , after you installed phpMyAdmin .

After Installed phpMyAdmin , you must run this codes :

Bash:
sudo apt-get install libcurl3 -y

## And then run
/home/xtreamcodes/iptv_xtream_codes/start_services.sh

I hope its very good and full help you on installing the full Xtream UI MAIN _ ADMIN _ LB

if you need any help only reply me .

Telgram Group: Join

1 thought on “Xtream-UI Load Balancer Installation

Leave a Reply

Your email address will not be published. Required fields are marked *