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. C#流程控制语句--分支语句(if,switch,三位运算符)

    分支语句:判断结构要求程序员指定一个或多个要评估或测试的条件,以及条件为真时要执行的语句(必需的)和条件为假时要执行的语句(可选的). 分支语句  if if(判断条件表达式) {//表达式结果为tu ...

  2. 从零开始学习Java多线程(二)

    前面已经简单介绍进程和线程,为后续学习做铺垫.本文讨论多线程传参,Java多线程异常处理机制. 1. 多线程的参数传递 在传统开发过程中,我们习惯在调用函数时,将所需的参数传入其中,通过函数内部逻辑处 ...

  3. jquery 根据文本设置选中某个选项

    <select name="streetid" id="streetid"> <option value="4">a ...

  4. PHP的json_encode()函数与JSON对象

    一.问题描述 这周搬砖的时候,前端通过ajax获取后端的数据后,照例用 对象.属性 的方式取值,然而结果总是总是不能如预期般展示在页面上. 先写个 demo 还原下场景:选中一个下拉框列表选项后,会在 ...

  5. Linux桌面系统常用软件和笔记(更新)

    (一).下文涉及到的环境 manjaro.deepin.Arch等 有些可以通用 有些不可以通用 (二).常用软件下载 一.桌面美化软件 1.桌面壁纸下载软件: varirety 下载方式:可以在多个 ...

  6. java对象深度拷贝

    如何利用序列化来完成对象的拷贝呢?在内存中通过字节流的拷贝是比较容易实现的.把母对象写入到一个字节流中,再从字节流中将其读出来,这样就可以创建一个新的对象了,并且该新对象与母对象之间并不存在引用共享的 ...

  7. SecureCRT常见配置

    不自动断开连接 颜色设置 然后再在/etc/bash.bashrc中加入这句话alias ls='ls --color',其实意思就是以后所有的ls命令,就是ls –color命令

  8. Firebug: 已拦截跨源请求:同源策略禁止读取位于XXX的远程资源。(原因:CORS 头缺少 'Access-Control-Allow-

    第一种,就是在被请求的程序中添加HTTP头,即CORS跨域(跨域资源共享,Cross-Origin Resource Sharing) 如: Response.Headers.Add("Ac ...

  9. C# Winform 通过Socket实现客户端和服务端TCP通信

    操作界面如下: 1.声明Socket 第一个参数:寻址方式,第二个参数:传输数据的方式,第三个参数:通信协议 Socket socket = new Socket(AddressFamily.Inte ...

  10. Sorting a Three-Valued Sequence(三值的排序)

    Description 排序是一种很频繁的计算任务.现在考虑最多只有三值的排序问题.一个实际的例子是,当我们给某项竞赛的优胜者按金银铜牌序的时候. 在这个任务中可能的值只有三种1,2和3.我们用交换的 ...