Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
隐藏空白更改
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
文本样式
更改外观
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled diff
创建于
9年前
差异永不过期
清除
导出
分享
解释
7 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
86 行
全部复制
11 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
87 行
全部复制
#!/bin/sh
#!/bin/sh
##############################################################################################
##############################################################################################
## Install Nginx with OpenSSL and ngx_pagespeed
## Install Nginx with OpenSSL and ngx_pagespeed
## Author: Andrew Maxwell <amaxwell@traffixdevices.com>
## Author: Andrew Maxwell <amaxwell@traffixdevices.com>
## Date: 2016/05/27
## Date: 2016/05/27
## Version: 0.1
## Version: 0.1
##
##
## Disclaimer: I am not responsible for how you use this script. Do not assume this script
## Disclaimer: I am not responsible for how you use this script. Do not assume this script
## will work in all envrionments or any Ubuntu version other than 14.04. This script assumes
## will work in all envrionments or any Ubuntu version other than 14.04. This script assumes
## you have had a version of nginx already installed from Ubuntu PPAs and that it has been
## you have had a version of nginx already installed from Ubuntu PPAs and that it has been
## removed via `sudo apt-get remove nginx nginx-common`
## removed via `sudo apt-get remove nginx nginx-common`
##
##
## ngx_pagespeed code adapted from:
## ngx_pagespeed code adapted from:
## https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source
## https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source
## openssl code adapted from:
## openssl code adapted from:
## https://www.digitalocean.com/community/questions/how-to-get-already-installed-nginx-to-use-openssl-1-0-2-for-alpn#answer_27588
## https://www.digitalocean.com/community/questions/how-to-get-already-installed-nginx-to-use-openssl-1-0-2-for-alpn#answer_27588
##############################################################################################
##############################################################################################
# Current version of nginx, openssl, and ngx_pagespeed you want to install
# Current version of nginx, openssl, and ngx_pagespeed you want to install
复制
已复制
复制
已复制
NGINX_VERSION=1.11.
0
NGINX_VERSION=1.11.
13
OPENSSL_VERSION=1.
0.2h
OPENSSL_VERSION=1.
1.0e
NPS_VERSION=1.
11.33
.2
NPS_VERSION=1.
12.34
.2
##############################################################################################
##############################################################################################
########## STOP EDITING
########## STOP EDITING
##############################################################################################
##############################################################################################
## Currently installed version of openssl
## Currently installed version of openssl
OPENSSL_CURRENT_VERSION=$(openssl version | awk '{ print $2 }')
OPENSSL_CURRENT_VERSION=$(openssl version | awk '{ print $2 }')
## Nginx ./configure flags
## Nginx ./configure flags
# Automagically grab current Nginx flags
# Automagically grab current Nginx flags
#NGINX_USER_FLAGS="$(nginx -V 2>&1 | tail -1| tr ' ' '\n' | tail -n +3)"
#NGINX_USER_FLAGS="$(nginx -V 2>&1 | tail -1| tr ' ' '\n' | tail -n +3)"
# Or use default Nginx flags
# Or use default Nginx flags
NGINX_USER_FLAGS="--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module"
NGINX_USER_FLAGS="--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module"
OPENSSL_FLAGS="--with-openssl=$HOME/openssl-$OPENSSL_VERSION"
OPENSSL_FLAGS="--with-openssl=$HOME/openssl-$OPENSSL_VERSION"
复制
已复制
复制
已复制
NPS_FLAGS="--add-module=$HOME/ngx_pagespeed
-release
-$NPS_VERSION-beta"
NPS_FLAGS="--add-module=$HOME/ngx_pagespeed
-$NPS_VERSION-beta"
NGINX_FLAGS="$NGINX_USER_FLAGS $OPENSSL_FLAGS $NPS_FLAGS"
NGINX_FLAGS="$NGINX_USER_FLAGS $OPENSSL_FLAGS $NPS_FLAGS"
# Ensure lib and build packages are installed
# Ensure lib and build packages are installed
sudo apt-get update
sudo apt-get update
复制
已复制
复制
已复制
sudo apt-get install
build-essential zlib1g-dev libpcre3 libpcre3-dev
unzip
sudo apt-get install
-y
build-essential zlib1g-dev libpcre3 libpcre3-dev
libxml2-dev libxslt1-dev libgd-dev libgeoip-dev libperl-dev
unzip
## Ensure we are in home directory
## Ensure we are in home directory
cd $HOME
cd $HOME
## Download sources
## Download sources
# Download nginx
# Download nginx
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
# Download openssl
# Download openssl
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
# Download ngx_pagespeed
# Download ngx_pagespeed
复制
已复制
复制
已复制
wget https://github.com/pagespeed/ngx_pagespeed/archive/
release-
${NPS_VERSION}-beta.zip
wget https://github.com/pagespeed/ngx_pagespeed/archive/
v
${NPS_VERSION}-beta.zip
## Extract sources
## Extract sources
# Extract nginx
# Extract nginx
tar -xvzf nginx-${NGINX_VERSION}.tar.gz
tar -xvzf nginx-${NGINX_VERSION}.tar.gz
# Extract openssl
# Extract openssl
tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz
tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz
# Extract ngx_pagespeed
# Extract ngx_pagespeed
复制
已复制
复制
已复制
unzip
release-
${NPS_VERSION}-beta.zip
unzip
v
${NPS_VERSION}-beta.zip
## Download and Extract PSOL (PageSpeed Optimization Library)
## Download and Extract PSOL (PageSpeed Optimization Library)
复制
已复制
复制
已复制
cd ngx_pagespeed
-release
-${NPS_VERSION}-beta/
cd ngx_pagespeed
-${NPS_VERSION}-beta/
wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}
.tar.gz
wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}
-x64
.tar.gz
tar -xzvf ${NPS_VERSION}
.tar.gz # extracts to psol/
tar -xzvf ${NPS_VERSION}
-x64
.tar.gz # extracts to psol/
cd $HOME
cd $HOME
## Install openssl
## Install openssl
cd openssl-${OPENSSL_VERSION}/
cd openssl-${OPENSSL_VERSION}/
复制
已复制
复制
已复制
./config
./config
-Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
make depend
make depend
make
make
make test
make test
sudo make install
sudo make install
sudo mv /usr/bin/openssl /usr/bin/openssl_${OPENSSL_CURRENT_VERSION}
sudo mv /usr/bin/openssl /usr/bin/openssl_${OPENSSL_CURRENT_VERSION}
sudo ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
sudo ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
cd $HOME
cd $HOME
## Install nginx + ngx_pagespeed
## Install nginx + ngx_pagespeed
cd nginx-${NGINX_VERSION}/
cd nginx-${NGINX_VERSION}/
./configure ${NGINX_FLAGS}
./configure ${NGINX_FLAGS}
make
make
sudo make install
sudo make install
echo "Installation Complete!"
echo "Installation Complete!"
复制
已复制
复制
已复制
已保存差异
原始文本
打开文件
#!/bin/sh ############################################################################################## ## Install Nginx with OpenSSL and ngx_pagespeed ## Author: Andrew Maxwell <amaxwell@traffixdevices.com> ## Date: 2016/05/27 ## Version: 0.1 ## ## Disclaimer: I am not responsible for how you use this script. Do not assume this script ## will work in all envrionments or any Ubuntu version other than 14.04. This script assumes ## you have had a version of nginx already installed from Ubuntu PPAs and that it has been ## removed via `sudo apt-get remove nginx nginx-common` ## ## ngx_pagespeed code adapted from: ## https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source ## openssl code adapted from: ## https://www.digitalocean.com/community/questions/how-to-get-already-installed-nginx-to-use-openssl-1-0-2-for-alpn#answer_27588 ############################################################################################## # Current version of nginx, openssl, and ngx_pagespeed you want to install NGINX_VERSION=1.11.0 OPENSSL_VERSION=1.0.2h NPS_VERSION=1.11.33.2 ############################################################################################## ########## STOP EDITING ############################################################################################## ## Currently installed version of openssl OPENSSL_CURRENT_VERSION=$(openssl version | awk '{ print $2 }') ## Nginx ./configure flags # Automagically grab current Nginx flags #NGINX_USER_FLAGS="$(nginx -V 2>&1 | tail -1| tr ' ' '\n' | tail -n +3)" # Or use default Nginx flags NGINX_USER_FLAGS="--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module" OPENSSL_FLAGS="--with-openssl=$HOME/openssl-$OPENSSL_VERSION" NPS_FLAGS="--add-module=$HOME/ngx_pagespeed-release-$NPS_VERSION-beta" NGINX_FLAGS="$NGINX_USER_FLAGS $OPENSSL_FLAGS $NPS_FLAGS" # Ensure lib and build packages are installed sudo apt-get update sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip ## Ensure we are in home directory cd $HOME ## Download sources # Download nginx wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz # Download openssl wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz # Download ngx_pagespeed wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip ## Extract sources # Extract nginx tar -xvzf nginx-${NGINX_VERSION}.tar.gz # Extract openssl tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz # Extract ngx_pagespeed unzip release-${NPS_VERSION}-beta.zip ## Download and Extract PSOL (PageSpeed Optimization Library) cd ngx_pagespeed-release-${NPS_VERSION}-beta/ wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz tar -xzvf ${NPS_VERSION}.tar.gz # extracts to psol/ cd $HOME ## Install openssl cd openssl-${OPENSSL_VERSION}/ ./config make depend make make test sudo make install sudo mv /usr/bin/openssl /usr/bin/openssl_${OPENSSL_CURRENT_VERSION} sudo ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl cd $HOME ## Install nginx + ngx_pagespeed cd nginx-${NGINX_VERSION}/ ./configure ${NGINX_FLAGS} make sudo make install echo "Installation Complete!"
更改后文本
打开文件
#!/bin/sh ############################################################################################## ## Install Nginx with OpenSSL and ngx_pagespeed ## Author: Andrew Maxwell <amaxwell@traffixdevices.com> ## Date: 2016/05/27 ## Version: 0.1 ## ## Disclaimer: I am not responsible for how you use this script. Do not assume this script ## will work in all envrionments or any Ubuntu version other than 14.04. This script assumes ## you have had a version of nginx already installed from Ubuntu PPAs and that it has been ## removed via `sudo apt-get remove nginx nginx-common` ## ## ngx_pagespeed code adapted from: ## https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source ## openssl code adapted from: ## https://www.digitalocean.com/community/questions/how-to-get-already-installed-nginx-to-use-openssl-1-0-2-for-alpn#answer_27588 ############################################################################################## # Current version of nginx, openssl, and ngx_pagespeed you want to install NGINX_VERSION=1.11.13 OPENSSL_VERSION=1.1.0e NPS_VERSION=1.12.34.2 ############################################################################################## ########## STOP EDITING ############################################################################################## ## Currently installed version of openssl OPENSSL_CURRENT_VERSION=$(openssl version | awk '{ print $2 }') ## Nginx ./configure flags # Automagically grab current Nginx flags #NGINX_USER_FLAGS="$(nginx -V 2>&1 | tail -1| tr ' ' '\n' | tail -n +3)" # Or use default Nginx flags NGINX_USER_FLAGS="--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module" OPENSSL_FLAGS="--with-openssl=$HOME/openssl-$OPENSSL_VERSION" NPS_FLAGS="--add-module=$HOME/ngx_pagespeed-$NPS_VERSION-beta" NGINX_FLAGS="$NGINX_USER_FLAGS $OPENSSL_FLAGS $NPS_FLAGS" # Ensure lib and build packages are installed sudo apt-get update sudo apt-get install -y build-essential zlib1g-dev libpcre3 libpcre3-dev libxml2-dev libxslt1-dev libgd-dev libgeoip-dev libperl-dev unzip ## Ensure we are in home directory cd $HOME ## Download sources # Download nginx wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz # Download openssl wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz # Download ngx_pagespeed wget https://github.com/pagespeed/ngx_pagespeed/archive/v${NPS_VERSION}-beta.zip ## Extract sources # Extract nginx tar -xvzf nginx-${NGINX_VERSION}.tar.gz # Extract openssl tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz # Extract ngx_pagespeed unzip v${NPS_VERSION}-beta.zip ## Download and Extract PSOL (PageSpeed Optimization Library) cd ngx_pagespeed-${NPS_VERSION}-beta/ wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}-x64.tar.gz tar -xzvf ${NPS_VERSION}-x64.tar.gz # extracts to psol/ cd $HOME ## Install openssl cd openssl-${OPENSSL_VERSION}/ ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' make depend make make test sudo make install sudo mv /usr/bin/openssl /usr/bin/openssl_${OPENSSL_CURRENT_VERSION} sudo ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl cd $HOME ## Install nginx + ngx_pagespeed cd nginx-${NGINX_VERSION}/ ./configure ${NGINX_FLAGS} make sudo make install echo "Installation Complete!"
查找差异