自动安装带nginx_upstream_check_module模块的Nginx脚本
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash useradd -s /sbin/nologin -M nginx
yum install pcre pcre-devel zlib zlib-devel openssl-devel openssl patch gcc -y
mkdir /software;cd /software wget http://nginx.org/download/nginx-1.4.6.tar.gz
wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.8.tar.gz
wget https://codeload.github.com/yaoweibin/nginx_upstream_check_module/zip/master -O master.zip
wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip
tar zxvf GeoIP-1.4.8.tar.gz && cd GeoIP* && ./configure && make && make install
cd /software/ && tar zxvf nginx-1.4.6.tar.gz && tar zxvf ngx_cache_purge-2.1.tar.gz -C /usr/local/ unzip -d /usr/local/ /software/master.zip
unzip -d /usr/local/ /software/ngx_req_status.zip
cd /software/nginx-1.4.6 && patch -p1 < /usr/local/nginx_upstream_check_module-master/check_1.2.6+.patch
patch -p1 < /usr/local/ngx_req_status-master/write_filter.patch
cat > /etc/ld.so.conf << EOF
include ld.so.conf.d/*.conf /usr/local/lib EOFldconfigcd /software/nginx-1.4.6 && ./configure --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --user=nginx --group=nginx --with-pcre --with-http_gzip_static_module --with-http_ssl_module --with-http_realip_module --with-http_geoip_module --add-module=/usr/local/nginx_upstream_check_module-master --add-module=/usr/local/ngx_cache_purge-2.1 --add-module=/usr/local/ngx_req_status-master && make -j2 && make install
|
关于nginx_upstream_check的官方参考:https://github.com/yaoweibin/nginx_upstream_check_module/blob/master/README
自动安装带nginx_upstream_check_module模块的Nginx脚本的更多相关文章
- 可以自动安装mysql数据库的一个shell脚本
发布:thatboy 来源:脚本学堂 [大 中 小] 分享一例shell脚本,可以实现mysql数据库的自动安装,脚本写的不错,无论是用来学习,还是生产环境中应用,都是不错的,有需要的朋友 ...
- 编译安装带ssl 模块指定版本Python
出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries ...
- 介绍下 npm 模块安装机制,为什么输入 npm install 就可以自动安装对应的模块?
1. npm 模块安装机制: 发出npm install命令 查询node_modules目录之中是否已经存在指定模块 若存在,不再重新安装 若不存在 npm 向 registry 查询模块压缩包的网 ...
- LNMP安装Let’s Encrypt 免费SSL证书方法:自动安装与手动配置Nginx
前几天介绍了最新StartSSL免费SSL申请与配置,很多人看到部落介绍SSL证书安装时总是推荐了OneinStack,因为OneinStack提供了一键添加和配置Let's Encrypt 免费SS ...
- 使用PowerShell 自动安装VC++补丁
执行环境:Windows Server 2012 R2 VC++下载链接 这里有个问题,虽说可以静默安装,但是未对当前系统检测是否已安装vc++补丁,望大佬指点 # author:lttr <w ...
- mysql 自动备份和nginx自动安装脚本
一.自动备份Mysql脚本: 如下脚本为mysql自动备份脚本,仅供参考,可以根据实际情况修改. #!/bin/sh #auto backup mysql #wugk #Define PATH定义变量 ...
- nginx脚本自动安装
nginx脚本自动安装 脚本功能: 自动安装nginx 自动判别系统是否安装nginx 自定义安装nginx路径 自定义安装nginx版本. #!/bin/bash #2019年10月30日16:00 ...
- Nginx自动安装脚本
添加一个install_nginx.sh脚本 版本一:(以下脚本为在线自动化安装) #!/bin/bash mkdir /soft cd /soft wget -c http://nginx.org/ ...
- python3自动安装脚本,python3.x与python2.x共存
1.前言: python3过程中,通过搜索一些文章参考安装过程发现比较麻烦,而且还出现一些不可预期的报错.python3环境需要升级openssl,所以为了部署到其他环境更方便,写自动安装脚本方式,且 ...
随机推荐
- 在 Array.filter 中正确使用 Async
本文译自How to use async functions with Array.filter in Javascript - Tamás Sallai. 0. 如何仅保留满足异步条件的元素 在第一 ...
- Vulnhub homeless靶机渗透
信息搜集 nmap -sP 192.168.146.6 nmap -A -Pn 192.168.146.151 直接访问web服务. 大概浏览一下没发现什么,直接扫描下目录把dirb+bp. BP具体 ...
- 多角度让你彻底明白yield语法糖的用法和原理及在C#函数式编程中的作用
如果大家读过dapper源码,你会发现这内部有很多方法都用到了yield关键词,那yield到底是用来干嘛的,能不能拿掉,拿掉与不拿掉有多大的差别,首先上一段dapper中精简后的Query方法,先让 ...
- MySQL学习之路3-MySQL中常用数据类型
MySQL中常用数据类型 字符型 存储字符型数据.例如姓名,地址,电话号码等.使用引号括起来,一般使用单引号. 常用类型: char(255) 定长字符串,最大长度255个字符. varchar(25 ...
- Python 1基础语法四(数字类型、输入输出汇总和命令行参数)
一.数字(Number)类型 python中数字有四种类型:整数.布尔型.浮点数和复数. int (整数), 如 1, 只有一种整数类型 int,表示为长整型,没有 python2 中的 Long. ...
- alg-最长公共子串
class Solution { public: const std::vector<std::string> LongestCommonSubstring(const std::stri ...
- std::string构造函数
string(); string (const string& str); string (const string& str, size_t pos, size_t len = np ...
- 【python实现卷积神经网络】上采样层upSampling2D实现
代码来源:https://github.com/eriklindernoren/ML-From-Scratch 卷积神经网络中卷积层Conv2D(带stride.padding)的具体实现:https ...
- Spring 下,关于动态数据源的事务问题的探讨
开心一刻 毒蛇和蟒蛇在讨论谁的捕猎方式最高效. 毒蛇:我只需要咬对方一口,一段时间内它就会逐渐丧失行动能力,最后死亡. 蟒蛇冷笑:那还得等生效时间,我只需要缠住对方,就能立刻致它于死地. 毒蛇大怒:你 ...
- python白帽子/黑客/实战编程教程
Python搜索爬虫抓取超高清视频教程_第一期Python搜索爬虫抓取超高清视频教程_第二期Python搜索爬虫抓取视频教程_第三期Python搜索爬虫抓取视频教程_第四期Python搜索引擎爬虫抓取 ...