Openresty 中文官网地址 http://openresty.org/cn/
 #! /bin/bash

 function openrestyinstall() {
cd /opt/openresty-1.11.2.3
./configure --user=nginx --group=nginx --with-select_module --with-threads \
--with-http_realip_module --with-http_sub_module \
--with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module \
--with-http_secure_link_module --with-http_perl_module --with-pcre \
--with-http_ssl_module --with-http_stub_status_module --with-http_auth_request_module \
--with-http_v2_module --with-openssl=/usr/local/openssl-1.0.2l > /dev/null
if [ $? -eq ];then
gmake > /dev/null
if [ $? -ne ];then
echo "gmake has some error" >> /opt/openresty.log
exit
fi
gmake install > /dev/null
if [ $? -ne ];then
echo "gmake install has some error" >> /opt/openresty.log
exit
fi
else
echo "./configure has some error" >> /opt/openresty.log
exit
fi
} function openrestyupdateconfig() {
mkdir /data/work/conf/conf.d -p
if [ $? -ne ];then
echo "mkdir /data/work has some error" >> /opt/openresty.log
fi
mkdir /data/work/html
if [ $? -ne ];then
echo "mkdir /data/work has some error" >> /opt/openresty.log
fi
mkdir /data/work/logs/{cpms,spms}/{access,error} -p
if [ $? -ne ];then
echo "mkdir /data/work has some error" >> /opt/openresty.log
fi
cp /usr/local/openresty/nginx/conf/* /data/work/conf/
if id -u nginx > /dev/null 2>&1;then
echo "user nginx exist" >> /opt/openresty.log
else
useradd -M -s /sbin/nologin nginx
if [ $? -ne 0 ];then
echo "create user is error" >> /opt/openresty.log
fi
fi
} yum install openssl-devel pcre-devel perl-devel perl-ExtUtils-Embed -y 2>&1 /dev/null rm -rf /opt/openresty-1.11.2.3
rm -rf /opt/openssl-1.0.2l
rm -rf /usr/local/openresty
rm -rf /usr/local/openssl-1.0.2l if [ -f "/opt/openresty-1.11.2.3.tar.gz" ];then
tar -xf /opt/openresty-1.11.2.3.tar.gz -C /opt
if [ $? -ne 0 ];then
echo "openresty tar error" >> /opt/openresty.log
fi
fi
if [ -f "/opt/openssl-1.0.2l.tar.gz" ];then
tar -xf /opt/openssl-1.0.2l.tar.gz -C /usr/local/
if [ $? -ne 0 ];then
echo "openssl tar error" >> /opt/openresty.log
fi
fi openrestyinstall
if [ $? -ne 0 ];then
echo "openrestyinstall is some error"
exit 1
fi openrestyupdateconfig
if [ $? -ne 0 ];then
echo "openrestyupdateconfig is some error" >> /opt/openresty.log
exit 1
fi

Openresty 源码安装脚本的更多相关文章

  1. mac openresty 源码安装 坑

    下载openresty源码安装 下载页面http://openresty.org/cn/download.html 下载上一个版本的稳定版 https://openresty.org/download ...

  2. LNMP源码安装脚本

    LNMP安装脚本,脚本环境   #LNMP环境搭建centos6.8 2.6.32-696.28.1.el6.x86_64  nginx:1.12.2   mysql:5.6.36  PHP:5.5. ...

  3. LNMP最新源码安装脚本(定期更新)

    Linux+Nginx+MySQL+PHP+Pureftpd+User manager for PureFTPd,脚本中用到的软件包大多最新版本,修复了User manager for PureFTP ...

  4. CentOS6源码安装zabbix服务器

    1.下载安装包并解压 2.预环境搭建 3.创建zabbix用户,编译安装zabbix 4.配置mysql 5.配置zabbix-server 6.配置apache和php 7.添加开机自启动 1 yu ...

  5. 在 Ubuntu 上使用源码安装 OpenResty

    镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 本文将介绍如何在 Ubuntu 上使用源码安装 OpenResty. 目标 Ubuntu 18.04 OpenResty 1.19.3.2 安装依 ...

  6. centos 7 源码安装openresty

    Openresty 官网 http://openresty.org Openresty源码下载页面 http://openresty.org/en/download.html Openresty 简易 ...

  7. 部署 LNMP(源码安装版本)shell脚本

    #!/bin/bash # 一键部署 LNMP(源码安装版本) menu() { clear echo " ##############‐‐‐‐Menu‐‐‐‐##############& ...

  8. 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展

    上一篇:搭建LNAMP环境(六)- PHP7源码安装MongoDB和MongoDB拓展 一.安装Memcached 1.yum安装libevent事件触发管理器 yum -y install libe ...

  9. 搭建LNAMP环境(二)- 源码安装Nginx1.10

    上一篇:搭建LNAMP环境(一)- 源码安装MySQL5.6 1.yum安装编译nginx需要的包 yum -y install pcre pcre-devel zlib zlib-devel ope ...

随机推荐

  1. spring boot中利用mybatis-generator插件生成代码

    使用Idea在spring boot中集成mybatis-generator,自动生成mapper.xml  model  dao 文件 一.配置 pom.xml 在pom.xml的<plugi ...

  2. VUE基本常识

    1.运行vue项目  项目根目录git Bash here npm run dev 为了能直接打开项目  配置项目package.json   添加--open  如下图: 2.坑:VUE初写小项目问 ...

  3. 【js】【图片瀑布流】js瀑布流显示图片20180315

    js实现把图片用瀑布流显示,只需要“jquery-1.11.2.min.js”. js: //瀑布流显示图片 var WaterfallImg = { option: { maxWidth: 850, ...

  4. HIT2019春软件构造->重写hashCode()方法

    不需要重写equals方法: 1.     一个类的每一个实例本质上都是唯一的. 2.     不关心一个类是否提供了“逻辑相等”的测试功能 3.     超类已经改写了equals方法,并且从超类继 ...

  5. FPM六:接五,跳转到明细

    1.在RESULT的Feeder class里添加点击单号事件: method IF_FPM_GUIBB_LIST~GET_DEFINITION. DATA:GW_ACTION TYPE FPMGB_ ...

  6. C# 3.0 / C# 3.5 对象集合初始化器、匿名类

    对象集合初始化器 在 .NET 2.0 中构造一个对象的方法一是提供一个重载的构造函数,二是用默认的构造函数生成一个对象,然后对其属性进行赋值. 在 .NET 3.5/C# 3.0 中,我们有一种更好 ...

  7. 苹果手机的SB系列(3)超级烦人的账户解锁?

    不知道大家有没有这种体验,Iphone 每隔一段时间后账户就被锁定了,也不告诉你原因,就是要解锁? 我怎么感觉比做的比支付宝差多了,我注册支付宝十几年,也没有动不动就告诉了有安全原因,要解锁,要重置密 ...

  8. 小程序一个大盒子里面的盒子内容居中对其显示wxss写法

    对小程序研究感兴趣的可加(交流QQ群:604788754)入群联系群主可得到小程序教学资源. 这个案例只是想展示效果,内容部分未进行for循环绑定处理: WXML: <view class=&q ...

  9. python-shogun安装问题

  10. secureCRT保存屏幕输出内容

    1.有时执行一个mysql语句,屏幕打印行过多,需要设置翻动最大行数 打开Options Session Options–>Terminal–>Emulation,在Scrollback输 ...