Last active
August 29, 2015 14:05
-
-
Save cbschuld/cdcaf062da5b34eede37 to your computer and use it in GitHub Desktop.
install haproxy 1.5.6 on ec2 amazon ami - updated 2014-10-28
This file contains 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
#!/bin/sh | |
yum update -y | |
yum install -y wget git | |
wget "http://www.haproxy.org/download/1.5/src/haproxy-1.5.6.tar.gz" | |
yum groupinstall -y 'Development Tools' | |
yum install -y openssl-devel | |
yum install -y rpmdevtools pcre-devel | |
rpmdev-setuptree | |
mv haproxy-1.5.6.tar.gz ~/rpmbuild/SOURCES/ | |
git clone git://github.com/bluerail/haproxy-centos.git | |
cp haproxy-centos/conf/* ~/rpmbuild/SOURCES/ | |
cp haproxy-centos/spec/* ~/rpmbuild/SPECS/ | |
cd rpmbuild/ | |
rpmbuild -ba SPECS/haproxy.spec | |
rpm -Uvh /root/rpmbuild/RPMS/x86_64/haproxy-1.5.6-1.amzn1.x86_64.rpm | |
# vi /etc/haproxy/haproxy.cfg | |
# chkconfig haproxy on |
should change haproxy-1.5.6.tar.gz to haproxy-1.5.3.tar.gz, otherwise it will report error
Huh?
@JamesMGreene The RPM pulled from GIT on line 11 uses a property to build haproxy. That property is set to 1.5.3 and this script pulls 1.5.6 from haproxy site.
Ah, thanks for clarifying, @johnmark13.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
should change haproxy-1.5.6.tar.gz to haproxy-1.5.3.tar.gz, otherwise it will report error