Openresty 源码安装脚本
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 源码安装脚本的更多相关文章
- mac openresty 源码安装 坑
下载openresty源码安装 下载页面http://openresty.org/cn/download.html 下载上一个版本的稳定版 https://openresty.org/download ...
- 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. ...
- LNMP最新源码安装脚本(定期更新)
Linux+Nginx+MySQL+PHP+Pureftpd+User manager for PureFTPd,脚本中用到的软件包大多最新版本,修复了User manager for PureFTP ...
- CentOS6源码安装zabbix服务器
1.下载安装包并解压 2.预环境搭建 3.创建zabbix用户,编译安装zabbix 4.配置mysql 5.配置zabbix-server 6.配置apache和php 7.添加开机自启动 1 yu ...
- 在 Ubuntu 上使用源码安装 OpenResty
镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 本文将介绍如何在 Ubuntu 上使用源码安装 OpenResty. 目标 Ubuntu 18.04 OpenResty 1.19.3.2 安装依 ...
- centos 7 源码安装openresty
Openresty 官网 http://openresty.org Openresty源码下载页面 http://openresty.org/en/download.html Openresty 简易 ...
- 部署 LNMP(源码安装版本)shell脚本
#!/bin/bash # 一键部署 LNMP(源码安装版本) menu() { clear echo " ##############‐‐‐‐Menu‐‐‐‐##############& ...
- 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展
上一篇:搭建LNAMP环境(六)- PHP7源码安装MongoDB和MongoDB拓展 一.安装Memcached 1.yum安装libevent事件触发管理器 yum -y install libe ...
- 搭建LNAMP环境(二)- 源码安装Nginx1.10
上一篇:搭建LNAMP环境(一)- 源码安装MySQL5.6 1.yum安装编译nginx需要的包 yum -y install pcre pcre-devel zlib zlib-devel ope ...
随机推荐
- 射频(SX1278)
射频是什么? 官方说法:RF,Radio Frequency. (不懂的人,看了还是不懂,不过对于物联网行业的开发工程师.产品经理和项目经理,还是有需要对射频有个基础了解的.) 燚智能解读: 两个人, ...
- 雷林鹏分享:jQuery EasyUI 数据网格 - 自定义排序
jQuery EasyUI 数据网格 - 自定义排序 如果默认的排序行为不满足您的需求,您可以自定义数据网格(datagrid)的排序行为. 最基础的,用户可以在列上定义一个排序函数,函数名是 sor ...
- 【转】HDMI之TMDS信号
转自:https://blog.csdn.net/wangdapao12138/article/details/79935821 HDMI传输原理和DVI相同,由Silicon Image公司发明的T ...
- Eclipse+Maven环境下java.lang.OutOfMemoryError: PermGen space及其解决方法
转自 https://blog.csdn.net/qdgengwenfei/article/details/71455432 java.lang.OutOfMemoryError: PermGen ...
- maven install报错 Failed to execute goal on project my-manager-mapper: Could not resolve dependencies for project com.my:my-manager-mapper:jar:0.0.1-SNAPSHOT:
报错信息为: [ERROR] Failed to execute goal on project my-manager-mapper: Could not resolve dependencies f ...
- vuex 改变状态值得命名问题
今天在做vuex的状态的时候 发现了个奇葩的问题,后面解决了,在改变状态的值得时候 传值的名称 不要和定义的状态的名称值相同,要不然会报错,如图所示 也就是password的名称不能相同,要不监测不到 ...
- 关于分布式版本控制系统Git与集中式版本控制系统SVN的区别
我觉得最最主要的区别就是:分布式Git主要是在本地有各个历史版本,在不联网的时候,也可以更新到最新版本和查看过去的版本,而集中式SVN是所有人都将版本上传到中央服务器,当出现断网情况的时候,用户只有一 ...
- 1、java的数据类型
一.基本数据类型 1.整型(byte,short,int,long) byte在内存中占用一个字节,short占用两个字节,int占用四个字节,long占用8个字节: Java语言中整型默认为int型 ...
- C++标准模板库(STL)之Set
1.Set的用法 Set:集合,一个内部自动有序而且不重复元素的容器.使用set,要加头文件#include<set>和using namespace std; 1.1.Set的定义 se ...
- gcc/g++编译器的安装与说明
gcc/g++编译器的安装与说明 1.gcc/g++编译器的安装 gcc yum install gcc g++ yum install gcc-c++ 2.gcc/g++的作用 将c/c++源代码编 ...