nginx update|shell脚本
来源:互联网 发布:windows双系统deepin 编辑:程序博客网 时间:2024/05/17 06:32
#!/bin/bash
#update instruction
#./configure --prefix=/wls/appsystems/nginx20170629/nginx --add-module=/wls/appsystems/nginx20170629/sourcefile/nginx-clojure-0.4.5/src/c --with-ld-opt=-Wl,-rpath,/wls/appsystems/nginx20170629/luajit/lib --add-module=/wls/appsystems/nginx20170629/nginxmodule/luamodule/lua-nginx-module-0.10.6 --add-module=/wls/appsystems/nginx20170629/nginxmodule/ngxDevelKit/ngx_devel_kit-0.3.0 --add-module=/wls/appsystems/nginx20170629/nginxmodule/redis2-nginx-module-0.13
#setting nginxmodule path
nginx_nginxmodule_path="/wls/appsystems/nginx20170629/nginxmodule"
nginx_sourcefile_path="/wls/appsystems/nginx20170629/sourcefile/nginx-1.11.3"
nginx_sbin_path="/wls/appsystems/nginx20170629/nginx/sbin"
echo "......1.解压缩包......"
tar -zxvf redis2-nginx-module-0.13.tar.gz -C $nginx_nginxmodule_path
unzip -o -d $nginx_nginxmodule_path lua-resty-redis-cluster-master.zip
unzip -o -d $nginx_nginxmodule_path lua-resty-redis-master.zip
cd $nginx_sourcefile_path
echo "......2.nginx添加redis模块......"
./configure --prefix=/wls/appsystems/nginx20170629/nginx --add-module=/wls/appsystems/nginx20170629/sourcefile/nginx-clojure-0.4.5/src/c --with-ld-opt=-Wl,-rpath,/wls/appsystems/nginx20170629/luajit/lib --add-module=/wls/appsystems/nginx20170629/nginxmodule/luamodule/lua-nginx-module-0.10.6 --add-module=/wls/appsystems/nginx20170629/nginxmodule/ngxDevelKit/ngx_devel_kit-0.3.0 --add-module=/wls/appsystems/nginx20170629/nginxmodule/redis2-nginx-module-0.13
if [ $? -eq 0 ] ;then
echo "......make redis module......"
make
else
echo "......make PREFIX failed......"
exit
fi
if [ $? -eq 0 ] ;then
echo "......2.1.备份原启动脚本......"
mv $nginx_sbin_path/nginx $nginx_sbin_path/nginx.bak
cp objs/nginx $nginx_sbin_path
else
echo "......make redis module failed......"
exit
fi
echo "......3.添加lua-redis-cluster模块......"
cd $nginx_nginxmodule_path/lua-resty-redis-cluster-master
make&make install
echo "......4.添加lua-redis模块......"
cd $nginx_nginxmodule_path/lua-resty-redis-master
make&make install
#update instruction
#./configure --prefix=/wls/appsystems/nginx20170629/nginx --add-module=/wls/appsystems/nginx20170629/sourcefile/nginx-clojure-0.4.5/src/c --with-ld-opt=-Wl,-rpath,/wls/appsystems/nginx20170629/luajit/lib --add-module=/wls/appsystems/nginx20170629/nginxmodule/luamodule/lua-nginx-module-0.10.6 --add-module=/wls/appsystems/nginx20170629/nginxmodule/ngxDevelKit/ngx_devel_kit-0.3.0 --add-module=/wls/appsystems/nginx20170629/nginxmodule/redis2-nginx-module-0.13
#setting nginxmodule path
nginx_nginxmodule_path="/wls/appsystems/nginx20170629/nginxmodule"
nginx_sourcefile_path="/wls/appsystems/nginx20170629/sourcefile/nginx-1.11.3"
nginx_sbin_path="/wls/appsystems/nginx20170629/nginx/sbin"
echo "......1.解压缩包......"
tar -zxvf redis2-nginx-module-0.13.tar.gz -C $nginx_nginxmodule_path
unzip -o -d $nginx_nginxmodule_path lua-resty-redis-cluster-master.zip
unzip -o -d $nginx_nginxmodule_path lua-resty-redis-master.zip
cd $nginx_sourcefile_path
echo "......2.nginx添加redis模块......"
./configure --prefix=/wls/appsystems/nginx20170629/nginx --add-module=/wls/appsystems/nginx20170629/sourcefile/nginx-clojure-0.4.5/src/c --with-ld-opt=-Wl,-rpath,/wls/appsystems/nginx20170629/luajit/lib --add-module=/wls/appsystems/nginx20170629/nginxmodule/luamodule/lua-nginx-module-0.10.6 --add-module=/wls/appsystems/nginx20170629/nginxmodule/ngxDevelKit/ngx_devel_kit-0.3.0 --add-module=/wls/appsystems/nginx20170629/nginxmodule/redis2-nginx-module-0.13
if [ $? -eq 0 ] ;then
echo "......make redis module......"
make
else
echo "......make PREFIX failed......"
exit
fi
if [ $? -eq 0 ] ;then
echo "......2.1.备份原启动脚本......"
mv $nginx_sbin_path/nginx $nginx_sbin_path/nginx.bak
cp objs/nginx $nginx_sbin_path
else
echo "......make redis module failed......"
exit
fi
echo "......3.添加lua-redis-cluster模块......"
cd $nginx_nginxmodule_path/lua-resty-redis-cluster-master
make&make install
echo "......4.添加lua-redis模块......"
cd $nginx_nginxmodule_path/lua-resty-redis-master
make&make install
阅读全文
0 0
- nginx update|shell脚本
- shell 脚本nginx日志分割
- shell脚本备份nginx日志
- 用shell脚本分析Nginx日志
- 【shell编程】 nginx 服务的启动脚本
- 平滑升级Nginx的Shell脚本
- 使用Shell脚本批量清除Nginx缓存
- 监控Nginx服务的Shell脚本
- shell脚本实现nginx开机自启
- 开发shell脚本检查Nginx实战分享
- bash shell 脚本 nginx日志切割
- shell 脚本手动制作nginx电子书
- shell脚本控制nginx日志文件分割
- shell脚本nginx日志解析入库
- 开发监控MySQL 或者 Nginx Shell 脚本
- Shell脚本分割Nginx日志,并定期清理[不重启nginx]
- shell 自动重启nginx php shell脚本
- 【shell脚本】nginx每天自动切割日志脚本
- 开发时解决跨域常用的一种方法
- jstl if标签
- Dijkstra的双栈算术表达式(未省略括号)求值算法(algs4)
- /*HTTP协议详解*/
- L
- nginx update|shell脚本
- 环形链表插值
- PHP str_replace的用法
- 重温java随记之运算符
- mysql权限刷新错误
- Win10系统VPN连接专网
- 欢迎使用CSDN-markdown编辑器
- HDU_6090 Rikka with Graph 【贪心】
- 代码中特殊的注释技术——TODO、FIXME和XXX的用处