--with-http_secure_link_module \
                       --with-http_slice_module \
                       --with-http_ssl_module \
                       --with-http_stub_status_module \
                       --with-http_sub_module \
                       --with-http_v2_module \
                       --with-mail \
                       --with-mail_ssl_module \
                       --with-stream \
                       --with-stream_realip_module \
                       --with-stream_ssl_module \
                       --with-stream_ssl_preread_module \
                       --with-http_v2_hpack_enc
'''.format(nginx_prefix=nginx_prefix, nginx_conf_dir=nginx_conf_dir)

wsl.builder('nginx-' + input_version, configure_cmd, sudo_cmd)


def nginx_conf():
    cmd = sudo_cmd + '''nginx -T | grep "fastcgi_buffering off;" \
|| ( curl -fsSL https://raw.githubusercontent.com/khs1994-docker/lnmp/master/wsl/config/nginx.wsl.conf \
> /tmp/nginx.conf; sudo cp /tmp/nginx.conf {nginx_conf_dir}/nginx.conf )'''.format(
        nginx_conf_dir=nginx_conf_dir)

    os.system(cmd)


def nginx_conf_d():
    nginx_conf_d_dir = '{nginx_conf_dir}/conf.d'.format(
        nginx_conf_dir=nginx_conf_dir)
示例#2
0
ret = os.system(sudo_cmd + 'ls > /dev/null 2>&1')

if ret != 0:
    print('\nsudo password is not correct\n')
    exit(1)
'''

'''

redis_prefix = '/usr/local/redis'

url = 'https://github.com/antirez/redis/archive/' + input_version + '.tar.gz'

wsl.download_src(url, input_version + '.tar.gz', 'redis-' + input_version)

os.system(sudo_cmd + 'apt update')

cmd = sudo_cmd + '''apt install -y gcc \
                                g++ \
                                libc6-dev \
                                make
'''

wsl.install_build_dep(cmd)

configure_cmd = 'echo "do nothing"'

wsl.builder('redis-' + input_version, configure_cmd, sudo_cmd)

wsl.test('redis-server -v')
示例#3
0
                       --with-threads \
                       --with-http_addition_module \
                       --with-http_auth_request_module \
                       --with-http_dav_module \
                       --with-http_flv_module \
                       --with-http_gunzip_module \
                       --with-http_gzip_static_module \
                       --with-http_mp4_module \
                       --with-http_random_index_module \
                       --with-http_realip_module \
                       --with-http_secure_link_module \
                       --with-http_slice_module \
                       --with-http_ssl_module \
                       --with-http_stub_status_module \
                       --with-http_sub_module \
                       --with-http_v2_module \
                       --with-mail \
                       --with-mail_ssl_module \
                       --with-stream \
                       --with-stream_realip_module \
                       --with-stream_ssl_module \
                       --with-stream_ssl_preread_module
'''.format(nginx_prefix=nginx_prefix, nginx_conf_dir=nginx_conf_dir)

bin_cmd = 'echo "do nothing"'

wsl.builder('nginx-1.13.11', configure_cmd, sudo_cmd, bin_cmd)

nginx_conf()
nginx_conf_d()