This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
make_demo.sh
executable file
·80 lines (68 loc) · 2.53 KB
/
make_demo.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
echo "==================CONFIGURE-NGINX=============================="
ROOTDIR=`pwd`
APROOTDIR=`pwd`
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE"
# prefer use bash if multishell
if [ -e /bin/bash ]; then
SHELL="/bin/bash"
else
SHELL="/bin/sh"
fi
export SHELL CFLAGS
CONFOPTS=""
CONFOPTS="$CONFOPTS --with-cc-opt=-I$ROOTDIR/"
CONFOPTS="$CONFOPTS --with-debug"
CONFOPTS="$CONFOPTS --with-libatomic=NO"
CONFOPTS="$CONFOPTS --without-http_rewrite_module --without-http_gzip_module --without-http_upstream_zone_module"
CONFOPTS="$CONFOPTS --sbin-path=/bin/nginx"
CONFOPTS="$CONFOPTS --error-log-path=/var/log/nginx-error.log"
CONFOPTS="$CONFOPTS --http-log-path=/var/log/nginx-access.log"
CONFOPTS="$CONFOPTS --conf-path=/etc/nginx/nginx.conf"
CONFOPTS="$CONFOPTS --lock-path=/tmp/nginx.lock"
CONFOPTS="$CONFOPTS --pid-path=/tmp/nginx.pid"
CONFOPTS="$CONFOPTS --modules-path=/share/nginx/modules"
CONFOPTS="$CONFOPTS --http-client-body-temp-path=/tmp/client_body_temp"
CONFOPTS="$CONFOPTS --http-proxy-temp-path=/tmp/proxy_temp"
CONFOPTS="$CONFOPTS --http-fastcgi-temp-path=/tmp/fastcgi"
CONFOPTS="$CONFOPTS --http-uwsgi-temp-path=/tmp/uwsgi"
CONFOPTS="$CONFOPTS --http-scgi-temp-path=/tmp/scgi"
CONFOPTS="$CONFOPTS --add-module=$ROOTDIR/user/nginx/extra-modules/nginx-http-wive"
CONFOPTS="$CONFOPTS --add-module=$ROOTDIR/user/nginx/extra-modules/nginx-upload-module"
CONFOPTS="$CONFOPTS \
--with-http_stub_status_module \
--without-http_charset_module \
--without-http_gzip_module \
--without-http_ssi_module \
--without-http_userid_module \
--without-http_access_module \
--without-http_auth_basic_module \
--without-http_geo_module \
--without-http_map_module \
--without-http_split_clients_module \
--without-http_referer_module \
--without-http_rewrite_module \
--without-http_proxy_module \
--without-http_fastcgi_module \
--without-http_uwsgi_module \
--without-http_scgi_module \
--without-http_memcached_module \
--without-http_limit_conn_module \
--without-http_limit_req_module \
--without-http_empty_gif_module \
--without-http_browser_module \
--without-http_upstream_ip_hash_module \
--without-http_upstream_least_conn_module \
--without-http_upstream_keepalive_module \
--without-http_grpc_module \
"
CONFOPTS="$CONFOPTS --with-http_ssl_module"
cd $ROOTDIR/user/nginx
touch extra-modules/nginx-http-wive/DEMO_MODE.flag
cat > extra-modules/nginx-http-wive/external.h <<EOT
#define DEMO_MODE
EOT
make clean
./configure $CONFOPTS
make
cd $ROOTDIR