mirror of https://github.com/Aidaho12/haproxy-wi
v3.4.4.6
parent
c8846d597b
commit
99a369634c
|
@ -48,6 +48,11 @@ Began to lead a [Twitter](https://twitter.com/haproxy_wi), subscribe! I will wri
|
|||
![alt text](image/haproxy-wi-metrics.jpeg "Merics")
|
||||
|
||||
# Install
|
||||
|
||||
## RPM
|
||||
[Download](https://github.com/Aidaho12/haproxy-wi/releases/download/3.4.4.6/haproxy-wi-3-4.4.6.noarch.rpm) RPM and install it
|
||||
|
||||
## Script
|
||||
The installer will ask you a few questions
|
||||
```
|
||||
$ git clone https://github.com/Aidaho12/haproxy-wi.git /var/www/haproxy-wi
|
||||
|
|
|
@ -57,9 +57,8 @@ else
|
|||
yum -y install epel-release
|
||||
fi
|
||||
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
||||
yum -y install git nmap-ncat net-tools python35u dos2unix python35u-pip mod_ssl httpd python35u-devel gcc-c++ openldap-devel python-devel python-jinja2 nodejs
|
||||
npm install js-cookie --save
|
||||
npm install bokehjs
|
||||
yum -y install git nmap-ncat net-tools python35u dos2unix python35u-pip mod_ssl httpd python35u-devel gcc-c++ openldap-devel python-devel python-jinja2
|
||||
|
||||
HTTPD_CONFIG="/etc/httpd/conf/httpd.conf"
|
||||
HAPROXY_WI_VHOST_CONF="/etc/httpd/conf.d/haproxy-wi.conf"
|
||||
HTTPD_NAME="httpd"
|
||||
|
|
48
update.sh
48
update.sh
|
@ -4,9 +4,6 @@
|
|||
|
||||
cp app/haproxy-wi.cfg /tmp/
|
||||
|
||||
git reset --hard
|
||||
git pull https://github.com/Aidaho12/haproxy-wi.git
|
||||
|
||||
mv -f /tmp/haproxy-wi.cfg app/haproxy-wi.cfg
|
||||
|
||||
mkdir keys
|
||||
|
@ -21,49 +18,8 @@ else
|
|||
yum -y install git nmap-ncat net-tools python35u dos2unix python35u-pip mod_ssl httpd python35u-devel gcc-c++ openldap-devel
|
||||
fi
|
||||
|
||||
cat << EOF > /etc/systemd/system/keep_alive.service
|
||||
[Unit]
|
||||
Description=Keep Alive Haproxy
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=$(pwd)/app/
|
||||
ExecStart=$(pwd)/app/tools/keep_alive.py
|
||||
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=keep_alive
|
||||
|
||||
RestartSec=2s
|
||||
Restart=on-failure
|
||||
TimeoutStopSec=1s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat << 'EOF' > /etc/rsyslog.d/keep_alive.conf
|
||||
if $programname startswith 'keep_alive' then $(pwd)/log/keep_alive.log
|
||||
& stop
|
||||
EOF
|
||||
|
||||
|
||||
cat << EOF > /etc/logrotate.d/metrics
|
||||
$(pwd)/log/keep_alive.log {
|
||||
daily
|
||||
rotate 10
|
||||
missingok
|
||||
notifempty
|
||||
create 0644 apache apache
|
||||
dateext
|
||||
sharedscripts
|
||||
}
|
||||
EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart keep_alive.service
|
||||
systemctl enable keep_alive.service
|
||||
git reset --hard
|
||||
git pull https://github.com/Aidaho12/haproxy-wi.git
|
||||
|
||||
cd app/
|
||||
./create_db.py
|
||||
|
|
Loading…
Reference in New Issue