Skip to content

Instantly share code, notes, and snippets.

@kgriffs
Forked from meanevo/compile-haproxy.sh
Created May 25, 2018 23:16
Show Gist options
  • Save kgriffs/957f9f7046bcc256a756eb26b13242a6 to your computer and use it in GitHub Desktop.
Save kgriffs/957f9f7046bcc256a756eb26b13242a6 to your computer and use it in GitHub Desktop.

Revisions

  1. @meanevo meanevo revised this gist Jan 26, 2017. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions haproxy.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # File located at /etc/systemd/system/haproxy.service for CentOS 7
    # Reference https://github.com/horms/haproxy/blob/master/contrib/systemd/haproxy.service.in
    [Unit]
    Description=HAProxy Load Balancer
    After=network.target

    [Service]
    ExecStartPre=/usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg -c -q
    ExecStart=/usr/local/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
    ExecReload=/bin/kill -USR2 $MAINPID
    KillMode=mixed
    Restart=always

    [Install]
    WantedBy=multi-user.target
  2. @meanevo meanevo revised this gist Jan 26, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion compile-haproxy.sh
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,6 @@ make \
    USE_OPENSSL=1 SSL_INC=/usr/include SSL_LIB=/usr/lib ADDLIB=-ldl \
    CFLAGS="-O2 -g -fno-strict-aliasing -DTCP_USER_TIMEOUT=18"
    make install
    # Check your sbin path at /usr/local/sbin, consider copying follows to it
    # Check your sbin path at /usr/local/sbin, consider copying these two to it
    cp haproxy /usr/local/sbin/haproxy
    cp haproxy-systemd-wrapper /usr/local/sbin/haproxy-systemd-wrapper
  3. @meanevo meanevo revised this gist Jan 26, 2017. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion compile-haproxy.sh
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,7 @@ make \
    TARGET=linux2628 USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_PCRE=1 USE_PCRE_JIT=1 \
    USE_OPENSSL=1 SSL_INC=/usr/include SSL_LIB=/usr/lib ADDLIB=-ldl \
    CFLAGS="-O2 -g -fno-strict-aliasing -DTCP_USER_TIMEOUT=18"
    make install
    make install
    # Check your sbin path at /usr/local/sbin, consider copying follows to it
    cp haproxy /usr/local/sbin/haproxy
    cp haproxy-systemd-wrapper /usr/local/sbin/haproxy-systemd-wrapper
  4. @meanevo meanevo revised this gist Jan 26, 2017. No changes.
  5. @meanevo meanevo revised this gist Jan 26, 2017. 1 changed file with 0 additions and 12 deletions.
    12 changes: 0 additions & 12 deletions compile-openssl-102.sh
    Original file line number Diff line number Diff line change
    @@ -1,12 +0,0 @@
    # Make sure you have these installed
    yum install -y make gcc perl pcre-devel zlib-devel
    # Download/Extract source
    wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
    tar -zxf /tmp/openssl.tgz -C /tmp
    cd /tmp/openssl-*
    # Optional: Patch chacha20
    # https://github.com/cloudflare/sslconfig/tree/master/patches
    # Compile/Install OpenSSL
    ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
    make depend
    make && make install
  6. @meanevo meanevo revised this gist Jan 26, 2017. 2 changed files with 7 additions and 3 deletions.
    5 changes: 3 additions & 2 deletions compile-haproxy.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,11 @@
    # Make sure you have these installed
    yum install -y make gcc perl pcre-devel zlib-devel
    # Compile HAProxy
    # https://github.com/haproxy/haproxy/blob/master/README
    # Download/Extract source
    wget -O /tmp/haproxy.tgz http://www.haproxy.org/download/1.7/src/haproxy-1.7.2.tar.gz
    tar -zxvf /tmp/haproxy.tgz -C /tmp
    cd /tmp/haproxy-*
    # Compile HAProxy
    # https://github.com/haproxy/haproxy/blob/master/README
    make \
    TARGET=linux2628 USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_PCRE=1 USE_PCRE_JIT=1 \
    USE_OPENSSL=1 SSL_INC=/usr/include SSL_LIB=/usr/lib ADDLIB=-ldl \
    5 changes: 4 additions & 1 deletion compile-openssl-102.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,12 @@
    # Make sure you have these installed
    yum install -y make gcc perl pcre-devel zlib-devel
    # Compile OpenSSL
    # Download/Extract source
    wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
    tar -zxf /tmp/openssl.tgz -C /tmp
    cd /tmp/openssl-*
    # Optional: Patch chacha20
    # https://github.com/cloudflare/sslconfig/tree/master/patches
    # Compile/Install OpenSSL
    ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
    make depend
    make && make install
  7. @meanevo meanevo revised this gist Jan 26, 2017. 3 changed files with 10 additions and 7 deletions.
    7 changes: 5 additions & 2 deletions install-haproxy.sh → compile-haproxy.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    # Compile and install HAProxy
    wget -O /tmp/haproxy.tgz http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz
    # Make sure you have these installed
    yum install -y make gcc perl pcre-devel zlib-devel
    # Compile HAProxy
    # https://github.com/haproxy/haproxy/blob/master/README
    wget -O /tmp/haproxy.tgz http://www.haproxy.org/download/1.7/src/haproxy-1.7.2.tar.gz
    tar -zxvf /tmp/haproxy.tgz -C /tmp
    cd /tmp/haproxy-*
    make \
    8 changes: 5 additions & 3 deletions compile-openssl-102.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    # Compile and install OpenSSL - via https://github.com/haproxy/haproxy/blob/master/README
    # Make sure you have these installed
    yum install -y make gcc perl pcre-devel zlib-devel
    # Compile OpenSSL
    wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
    tar -zxf /tmp/openssl.tgz -C /tmp
    cd /tmp/openssl-*
    ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
    make
    make install_sw
    make depend
    make && make install
    2 changes: 0 additions & 2 deletions init.sh
    Original file line number Diff line number Diff line change
    @@ -1,2 +0,0 @@
    # make sure you have these installed
    yum install -y make gcc perl pcre-devel zlib-devel
  8. @meanevo meanevo renamed this gist Jan 26, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  9. @ryzy ryzy revised this gist Mar 13, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion compile-openssl-102.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Compile and install OpenSSL
    # Compile and install OpenSSL - via https://github.com/haproxy/haproxy/blob/master/README
    wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
    tar -zxf /tmp/openssl.tgz -C /tmp
    cd /tmp/openssl-*
  10. @ryzy ryzy revised this gist Mar 13, 2016. No changes.
  11. @ryzy ryzy revised this gist Mar 13, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions a.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # make sure you have these installed
    yum install -y make gcc perl pcre-devel zlib-devel
  12. @ryzy ryzy created this gist Mar 13, 2016.
    7 changes: 7 additions & 0 deletions compile-openssl-102.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # Compile and install OpenSSL
    wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
    tar -zxf /tmp/openssl.tgz -C /tmp
    cd /tmp/openssl-*
    ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
    make
    make install_sw
    9 changes: 9 additions & 0 deletions install-haproxy.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # Compile and install HAProxy
    wget -O /tmp/haproxy.tgz http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz
    tar -zxvf /tmp/haproxy.tgz -C /tmp
    cd /tmp/haproxy-*
    make \
    TARGET=linux2628 USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_PCRE=1 USE_PCRE_JIT=1 \
    USE_OPENSSL=1 SSL_INC=/usr/include SSL_LIB=/usr/lib ADDLIB=-ldl \
    CFLAGS="-O2 -g -fno-strict-aliasing -DTCP_USER_TIMEOUT=18"
    make install