Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

haproxy in centos 7

global
   log /dev/log local0
   log /dev/log local1 notice
   chroot /var/lib/haproxy
   stats socket /run/haproxy/admin.sock mode 660 level admin
    stats timeout 30s
    user haproxy
    group haproxy
    daemon

defaults
     log global
     mode http
     option httplog
     option dontlognull
     timeout connect 5000
     timeout client 50000
     timeout server 50000

frontend http_front
     bind *:80
     stats uri /haproxy?stats
     default_backend http_back

backend http_back
     balance roundrobin
     server my_server private_IP:80 check
     server my_server private_IP:80 check
Comment

using centos 7 as haproxy 1.8

# yum info haproxy
Comment

using centos 7 as haproxy 1.8

# yum install wget gcc pcre-static pcre-devel
Comment

using centos 7 as haproxy 1.8

$ wget http://www.haproxy.org/download/1.7/src/haproxy-1.7.5.tar.gz -O ~/Packages/haproxy.tar.gz
Comment

using centos 7 as haproxy 1.8

$ cd haproxy-1.7.5/
Comment

using centos 7 as haproxy 1.8

# This GNU Makefile supports different OS and CPU combinations.
#
# You should use it this way :
# [g]make TARGET=os ARCH=arch CPU=cpu USE_xxx=1 ...
Comment

using centos 7 as haproxy 1.8

$ make TARGET=generic ARCH=native CPU=x86_64 -j8
Comment

using centos 7 as haproxy 1.8

# cp haproxy-1.7.5/examples/haproxy.init /etc/init.d/haproxy
Comment

using centos 7 as haproxy 1.8

# chmod 755 /etc/init.d/haproxy
Comment

using centos 7 as haproxy 1.8

# mkdir -p /etc/haproxy
# mkdir -p /run/haproxy
# mkdir -p /var/lib/haproxy
# touch /var/lib/haproxy/stats
Comment

using centos 7 as haproxy 1.8

# useradd -r haproxy
Comment

using centos 7 as haproxy 1.8

# systemctl restart haproxy
Comment

using centos 7 as haproxy 1.8

# make install
Comment

PREVIOUS NEXT
Code Example
Shell :: slack text substitution mac does not work 
Shell :: smb cant write to mounted 
Shell :: createing strong swan firewall centos 7 
Shell :: powershell get samaccountname from first and last name 
Shell :: libexpat fedora 
Shell :: how to make a log of my ternminal history 
Shell :: color git 
Shell :: linux fine .js files 
Shell :: install amazon-linux-extras 
Shell :: disable public internet access linux 
Shell :: show all vscode extensions installed in commandline 
Shell :: uninstall peazip linux 
Shell :: install homebrew package manager for ubuntu and depian based systems 
Shell :: running InfluxDB in a container over a network 
Shell :: stern watch service logs 
Shell :: centos show volume usage 
Shell :: how to setup machine learning enviroment in ubuntu without anaconda 
Shell :: git add back to tracking which is removed file from tracking without deleting 
Shell :: chrome saved cache gif 
Shell :: debian user create encypt a passwd 
Shell :: nx test angular app 
Shell :: how to install brew 
Shell :: sed print all lines except last 
Shell :: how to add file to application linux 
Shell :: shorten terminal prompt linux 
Shell :: julia arch linux 
Shell :: laravel face detection package github 
Shell :: Git Precommit not working on windows 
Shell :: how we can push code without pulling code on git branch 
Shell :: how to change the terminal start in directory 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =