You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar xzf haproxy-$VER.tar.gz && rm -f haproxy*.tar.gz;
cd haproxy-$VER
cecho "Configuring and Making HAPROXY"$boldgreen
make TARGET=linux2628 CPU=x86_64 USE_OPENSSL=1 USE_ZLIB=1 USE_PCRE=1 # compiles it with compression and ssl support; use CPU=x86_64 for CentOS x64 or i686 where approriate
cecho "Installing HAPROXY"$boldgreen
make install
cecho "Adding HAProxy User"$boldyellow
id -u haproxy &>/dev/null || useradd -s /usr/sbin/nologin -r haproxy
cecho "Creating config and Adding Daemon"$boldgreen
cp /usr/local/sbin/haproxy* /usr/sbin/ # copy binaries to /usr/sbin
cp /src/haproxy-$VER/examples/haproxy.init /etc/init.d/haproxy # copy init script in /etc/init.d
chmod +x /etc/init.d/haproxy # setting permission on init script
mkdir -p /etc/haproxy # creating directory where the config file must reside
cp /src/haproxy-$VER/examples/examples.cfg /etc/haproxy/haproxy.cfg # copy example config file
mkdir -p /var/lib/haproxy # create directory for stats file