forked from d2iq-archive/marathon-lb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-haproxy.sh
More file actions
executable file
·38 lines (34 loc) · 846 Bytes
/
Copy pathbuild-haproxy.sh
File metadata and controls
executable file
·38 lines (34 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
mkdir -p /usr/src
# Build Lua
cd /usr/src
wget http://www.lua.org/ftp/lua-5.3.3.tar.gz
tar zxf lua-*.tar.gz
cd lua-*
make -j4 linux LUA_LIB_NAME=lua53
make -j4 install LUA_LIB_NAME=lua53
# Build HAProxy
cd /usr/src
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.7.tar.gz
tar xf haproxy-*.tar.gz
cd haproxy-*
make -j4 \
TARGET=custom \
CPU=x86_64 \
USE_PCRE=1 \
USE_PCRE_JIT=1 \
USE_LIBCRYPT=1 \
USE_LINUX_SPLICE=1 \
USE_LINUX_TPROXY=1 \
USE_OPENSSL=1 \
USE_DL=1 \
USE_LUA=1 \
LUA_LIB=/usr/local/lib/ \
LUA_INC=/usr/local/include/ \
USE_ZLIB=1 \
LDFLAGS="-lcrypt -lssl -lcrypto -L/usr/local/lib/ -llua -lm -L/usr/lib -lpcreposix -lpcre"
make -j4 install LDFLAGS="-lcrypt -lssl -lcrypto -L/usr/local/lib/ -llua -lm -L/usr/lib -lpcreposix -lpcre -ldl"
# Clean up
cd /
rm -rf /usr/src/*