HOWTO build and install HAProxy on Solaris 10 x86
SunOS 5.10 i86pc i386
Download HAProxy source from here
gunzip haproxy-1.3.17.tar.gz
tar -xvf haproxy-1.3.17.tar
The readme file contains instructions on how to build it.
cd haproxy-1.3.17
less README
Download GNU make and gcc from sunfreeware.com - search the list on the right
Install GNU make
Installs to /usr/local/bin
gunzip make-3.81-sol10-x86-local.gz
pkgadd -d make-3.81-sol10-x86-local
Install gcc:
gunzip gcc-3.4.6-sol10-x86-local.gz
pkgadd -d gcc-3.4.6-sol10-x86-local
Make and install HAProxy:
Make sure that GNU make is the first make in the path or specify path
i.e., export /usr/local/bin:$PATH
Make sure gcc can be found in the path
i.e., export $PATH:/usr/sfw/bin
make TARGET=solaris CPU=generic
Create a user and group:
/etc/passwd
haproxy:x:114:126::/home/haproxy:/bin/false
/etc/group
haproxy:x:126:
Create an config file, see docs and examples directory
/etc/haproxy.cfg
Install and link to startup / shutdown script
Start last (relative to range of numbers)
ln -sf /usr/local/util/haproxy/haproxy.init /etc/rc2.d/S100haproxy
Stop first (relative to range of numbers)
ln -sf /usr/local/util/haproxy/haproxy.init /etc/rc2.d/K00haproxy
Install and enable auto-start script
/etc/default/haproxy
Create a link to haproxy executable
ln -sf /usr/local/util/haproxy/haproxy-1.3.17 haproxy
/usr/local/sbin/haproxy -f <cfg> -D -p <pid file>
Another HOWTO
Very thorough site
Download HAProxy source from here
gunzip haproxy-1.3.17.tar.gz
tar -xvf haproxy-1.3.17.tar
The readme file contains instructions on how to build it.
cd haproxy-1.3.17
less README
Download GNU make and gcc from sunfreeware.com - search the list on the right
Install GNU make
Installs to /usr/local/bin
gunzip make-3.81-sol10-x86-local.gz
pkgadd -d make-3.81-sol10-x86-local
Install gcc:
gunzip gcc-3.4.6-sol10-x86-local.gz
pkgadd -d gcc-3.4.6-sol10-x86-local
Make and install HAProxy:
Make sure that GNU make is the first make in the path or specify path
i.e., export /usr/local/bin:$PATH
Make sure gcc can be found in the path
i.e., export $PATH:/usr/sfw/bin
make TARGET=solaris CPU=generic
Create a user and group:
/etc/passwd
haproxy:x:114:126::/home/haproxy:/bin/false
/etc/group
haproxy:x:126:
Create an config file, see docs and examples directory
/etc/haproxy.cfg
Install and link to startup / shutdown script
Start last (relative to range of numbers)
ln -sf /usr/local/util/haproxy/haproxy.init /etc/rc2.d/S100haproxy
Stop first (relative to range of numbers)
ln -sf /usr/local/util/haproxy/haproxy.init /etc/rc2.d/K00haproxy
Install and enable auto-start script
/etc/default/haproxy
Create a link to haproxy executable
ln -sf /usr/local/util/haproxy/haproxy-1.3.17 haproxy
Usage : .././haproxy -f[ -vdVD ] [ -n ] [ -N ]
[ -p <pidfile> ] [ -m <max megs> ]
-v displays version ; -vv shows known build options.
-d enters debug mode ; -db only disables background mode.
-V enters verbose mode (disables quiet mode)
-D goes daemon ; implies -q
-q quiet mode : don't display messages
-c check mode : only check config file and exit
-n sets the maximum total # of connections (2000)
-m limits the usable amount of memory (in MB)
-N sets the default, per-proxy maximum # of connections (2000)
-p writes pids of all children to this file
-dp disables poll() usage even when available
-sf/-st [pid ]* finishes/terminates old pids. Must be last arguments.
/usr/local/sbin/haproxy -f <cfg> -D -p <pid file>
Another HOWTO
Very thorough site
Comments