logo

Installation

RPM


You may retrieve signed binary configuration files from link. It may be automatically installed by root thus:
$ sudo yum install https://repo.haproxy-wi.org/haproxy-wi-release-7-1-0.noarch.rpm 

or

$ sudo yum install https://repo1.haproxy-wi.org/haproxy-wi-release-7-1-0.noarch.rpm 
		
Set up your credentials:
$ sudo vi /etc/yum.repos.d/haproxy-wi.repo
		
And add your credentials:
baseurl = http://login:password@repo.haproxy-wi.org/el$releasever/
		
Install extra repository:
$ sudo yum install epel-release
		
If you use CentOS 7 also install next:
$ sudo yum install https://repo.ius.io/ius-release-el7.rpm
		
And install HAProxy-WI:
$ sudo yum install haproxy-wi
		

Open in your broweser: https://your_ip/ Default login/password are: admin/admin

Before uses RPM repository you should donate to support project on Patreon or on PayPal and I will send you credentials for access. Actual prices you can see on Patreon. But you can donate as many as you can or as you want. Please indicate the purpose of the donation, if any.

Do you want to try free? No problem, just fill the form or write to us and you will get access for a week!

Why should I use RPM?


Using RPM it is the best solution because:

Manual

$ cd /var/www/
$ git clone https://github.com/Aidaho12/haproxy-wi.git /var/www/haproxy-wi		
		
CentOS 7:

$ sudo yum install https://repo.ius.io/ius-release-el7.rpm
$ sudo yum -y install git nmap-ncat net-tools dos2unix python3 python3-pip  \
python36-ldap3 python36-paramiko python36-pytz python36-requests  python36-future \
python36-jinja2 python36-bottle python-configparser python36-mod_wsgi \
httpd mod_ssl rsync ansible
$ pip3 install -r haproxy-wi/config_other/requirements_el7.txt

CentOS 8:

$ sudo yum -y install python36 python3-pip python36-devel dos2unix httpd mod_ssl python3-mod_wsgi \
nmap-ncat net-tools lshw python3-ldap rsync ansible
$ pip3 install -r haproxy-wi/config_other/requirements_el8.txt

Both CentOS:

$ sudo cp haproxy-wi/config_other/httpd/* /etc/httpd/conf.d/

Or if you use Debian/Ubuntu:

$ sudo apt-get install git net-tools lshw dos2unix apache2 libapache2-mod-wsgi-py3 \
python3-pip g++ freetype2-demos libatlas-base-dev apache2-ssl-dev netcat python3 \
python3-ldap libpq-dev python-dev libpython-dev libxml2-dev libxslt1-dev libldap2-dev \
libsasl2-dev libffi-dev python3-dev libssl-dev gcc rsync ansible  -y
$ chown -R www-data:www-data haproxy-wi/
$ sudo cp haproxy-wi/config_other/httpd/* /etc/httpd/available-sites/
$ sudo a2ensite haproxy-wi.conf
$ sudo a2enmod cgid
$ sudo a2enmod ssl
$ pip3 install -r haproxy-wi/requirements.txt

Both

$ chmod +x haproxy-wi/app/*.py 
$ sudo cp haproxy-wi/config_other/logrotate/* /etc/logrotate.d/
$ sudo cp haproxy-wi/config_other/syslog/* /etc/rsyslog.d/
$ sudo cp haproxy-wi/config_other/systemd/* /etc/systemd/system/
$ sudo systemctl daemon-reload      
$ sudo systemctl restart httpd
$ sudo systemctl restart rsyslog
$ sudo systemctl restart metrics_haproxy.service
$ sudo systemctl restart checker_haproxy.service
$ sudo systemctl restart keep_alive.service
$ sudo systemctl enable metrics_haproxy.service
$ sudo systemctl enable checker_haproxy.service
$ sudo systemctl enable keep_alive.service
$ sudo mkdir /var/www/haproxy-wi/app/certs
$ sudo mkdir /var/www/haproxy-wi/keys
$ sudo mkdir /var/www/haproxy-wi/configs/
$ sudo mkdir /var/www/haproxy-wi/configs/hap_config/
$ sudo mkdir /var/www/haproxy-wi/configs/kp_config/
$ sudo mkdir /var/www/haproxy-wi/configs/nginx_config/
$ sudo mkdir /var/www/haproxy-wi/log/
$ chown -R apache:apache /var/www/haproxy-wi/

If you use Debian/Ubuntu:

Change httpd to apache2 PATH and apache to www-data user in the all configs
		

And create DB:
$ cd /var/www/haproxy-wi/app
$ ./create_db.py
		
Disable SELinux and enjoy!

Open in your broweser: https://your_ip/ Default login/password are: admin/admin

Ansible install


If you use RPM you have not to do anything. HAProxy-WI will install and configure Ansible properly. For manual installation you should do next:
$ sudo mkdir /usr/share/httpd/.ansible
$ sudo touch /usr/share/httpd/.ansible_galaxy
$ sudo mkdir /usr/share/httpd/.ssh
$ sudo chown apache:apache /usr/share/httpd/.*
$ sudo echo "apache          ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers

Or if use Debian/Ubuntu:

$ sudo mkdir /usr/share/apache2/.ansible
$ sudo touch /usr/share/apache2/.ansible_galaxy
$ sudo mkdir /usr/share/apache2/.ssh
$ sudo chown apache:apache /usr/share/httpd/.*
$ sudo echo "www-data          ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers
		
Disable SELinux and enjoy!

Installing SELinux policy


If you use RPM you have not do anything. HAProxy-WI will install SELinux policy, if this does not happen then install the package:
$ sudo yum install haproxy-wi-selinux
		

Installing Fail2ban


If you use RPM you have not do anything. HAProxy-WI will install Fail2ban. For manual installation you should do next:
For EL:
$ sudo yum install fail2ban

For Debian/Ubuntu:
$ sudo apt-get install fail2ban
		
After installation you should copy config files:
$ sudo cp /var/www/haproxy-wi/config_other/fail2ban/filter.d/* /etc/fail2ban/filter.d/
$ sudo cp /var/www/haproxy-wi/config_other/fail2ban/jail.d/* /etc/fail2ban/jail.d/
		
Enable and start the services:
$ sudo systemctl start fail2ban
$ sudo systemctl enable fail2ban
		

OS support


HAProxy-WI supports next os: