forked from hashicorp/ngx_http_consul_backend_module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-arm.sh
executable file
·58 lines (51 loc) · 1.81 KB
/
build-arm.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cd ~/go/src/github.com/JasonHonor/ngx_http_consul_backend_module
mkdir -p /root/nginx-go/ext
CGO_CFLAGS="-I /root/nginx-go/ngx_devel_kit-0.3.1/src" \
go build \
-buildmode=c-shared \
-o /root/nginx-go/ext/ngx_http_consul_backend_module.so \
src/ngx_http_consul_backend_module.go
rm /nginx -rf
mkdir /nginx
mkdir -p /nginx/ext
sudo cp /root/nginx-go/ext/ngx_http_consul_backend_module.so /nginx/ext/
cd /root/nginx-go/nginx-1.17.2
CFLAGS="-g " \
./configure \
--with-debug \
--prefix=/nginx \
--sbin-path=/nginx \
--conf-path=/nginx/nginx.conf \
--error-log-path=/nginx/logs/error.log \
--http-log-path=/nginx/logs/access.log \
--pid-path=/nginx/nginx.pid \
--lock-path=/nginx/nginx.lock \
--add-module=/root/nginx-go/ngx_devel_kit-0.3.1 \
--add-module=/root/go/src/github.com/JasonHonor/ngx_http_consul_backend_module \
--http-client-body-temp-path=/nginx/client_temp \
--http-proxy-temp-path=/nginx/proxy_temp \
--http-fastcgi-temp-path=/nginx/fastcgi_temp \
--http-uwsgi-temp-path=/nginx/uwsgi_temp \
--http-scgi-temp-path=/nginx/scgi_temp \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-http_auth_request_module \
--with-mail \
--with-mail_ssl_module \
#--with-ld-opt='-lunwind-aarch64' \
--with-cc-opt='-fno-omit-frame-pointer -g -pipe -Wp,-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
make
sudo make install
cd /nginx