前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >nginx多域名ssl证书以及lua模块的编译安装

nginx多域名ssl证书以及lua模块的编译安装

作者头像
明哥的运维笔记
发布2019-01-30 10:23:01
1.2K0
发布2019-01-30 10:23:01
举报
文章被收录于专栏:运维笔记运维笔记
代码语言:javascript
复制
#!/bin/bash
#unzip zip&tar file
function  untarfile(){
for i in $( ls . |grep -v .sh)
do

val=$(echo $i | grep ".zip$" |wc -l)
if [[ "$val"  -eq  1 ]];then
dirname=$(echo $i|sed "s/.zip//")
if [[ ! -d $dirname ]];then
echo "Unzip file: $dirname..."
unzip $i > /dev/null
fi

else
dirname=$(echo $i|sed "s/.tar.gz//")
if [[ ! -d $dirname ]];then
tar -zxvf  $i > /dev/null
echo "Tar file:  $dirname..."
fi

fi
done
sleep 2
echo "[ unzip files ] have finished!"
}

#untarfile

#install all
function installLua (){
#LuaJIT
if [[ ! -d /usr/local/lj2/   ]];then
cd LuaJIT-2.0.2
make PREFIX=/usr/local/lj2/
make install PREFIX=/usr/local/lj2/
else
echo "[ /usr/local/lj2/ ]: Directory have exists,exit!"
fi
echo "[ install LuaJIT ] have finished!"
sleep 2
}

function installnginx (){

if [[ ! -d /usr/local/nginx  ]];then
cd nginx-1.6.1
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module  --without-select_module --without-poll_module --with-openssl=../o
penssl-1.0.1i   --add-module=../ngx_devel_kit-0.2.19   --add-module=../lua-nginx-module-0.9.10

make
make -j2
make install
echo "/usr/local/lj2/lib/" >  /etc/ld.so.conf.d/lj2.conf
ldconfig
else
echo "[ /usr/local/nginx ]: Directory have exists,exit!"
fi
echo "[ install nginx ] have finished!"
sleep 2
}

untarfile
installLua
installnginx

最新源码 包以及安装脚本位置: nginx的ssl和lua模块相关包

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2014-08-12,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档