Skip to content

Instantly share code, notes, and snippets.

@lpirola
Forked from cbschuld/gist:cdcaf062da5b34eede37
Last active August 29, 2015 14:16
Show Gist options
  • Save lpirola/3cdb1085852f8864511d to your computer and use it in GitHub Desktop.
Save lpirola/3cdb1085852f8864511d to your computer and use it in GitHub Desktop.
Script to build rpm package and install haproxy in amazon ami linux aka centos 6.5
#!/bin/sh
wget "http://www.haproxy.org/download/1.5/src/haproxy-1.5.11.tar.gz"
rpmdev-setuptree
mv haproxy-1.5.11.tar.gz ~/rpmbuild/SOURCES/
git clone git://github.com/lucaspirola/haproxy-centos.git
cp haproxy-centos/conf/* ~/rpmbuild/SOURCES/
cp haproxy-centos/spec/* ~/rpmbuild/SPECS/
cd rpmbuild/
rpmbuild -ba SPECS/haproxy.spec
sudo rpm -Uvh ~/rpmbuild/RPMS/x86_64/haproxy-1.5.11-1.amzn1.x86_64.rpm
# vi /etc/haproxy/haproxy.cfg
# chkconfig haproxy on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment