Comments (2)
这是我centos7上的安装脚本,不过nginx的配置文件仍然要自己写
#!/usr/bin/sh
# push pwd
pushd
cd /tmp
yum -y install wget build-essential git gcc g++ gcc-c++ make autoconf
# nginx
wget http://nginx.org/download/nginx-1.9.3.tar.gz \
&& tar xzvf nginx-1.9.3.tar.gz
# pcre1
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz \
&& tar xzvf pcre-8.36.tar.gz
# opnssl
wget https://www.openssl.org/source/openssl-1.0.2d.tar.gz \
&& tar xzvf openssl-1.0.2d.tar.gz
# zlib
wget http://zlib.net/zlib-1.2.8.tar.gz \
&& tar xzvf zlib-1.2.8.tar.gz
# extention
git clone https://github.com/cuber/ngx_http_google_filter_module
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module
cd nginx-1.9.3
./configure \
--prefix=/usr/share/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--user=nginx \
--group=nginx \
--with-ipv6 \
--with-http_ssl_module \
--with-http_spdy_module \
--with-http_secure_link_module \
--with-http_sub_module \
--with-pcre=../pcre-8.36 \
--with-zlib=../zlib-1.2.8 \
--with-openssl=../openssl-1.0.2d \
--add-module=../ngx_http_google_filter_module \
--add-module=../ngx_http_substitutions_filter_module \
# build && install
make && make install
popd
# --------------------------------------------
#追加一个nginx组
groupadd -f nginx
#追加一个nginx用户
useradd -s /sbin/nologin -g nginx nginx
#建立nginx日志目录
mkdir /var/log/nginx
#赋予访问权限
chown nginx:nginx /var/log/nginx
echo "
[Unit]
Description=nginx
After=network.target syslog.target
[Service]
Type=forking
ExecStart=/usr/sbin/nginx
ExecStop=/usr/sbin/nginx -s quit
ExecReload=/usr/sbin/nginx -s reload
[Install]
WantedBy=multi-user.target
" > /lib/systemd/system/nginx.service
systemctl enable nginx.service
systemctl start nginx.service
systemctl status nginx.service
from ngx_http_google_filter_module.
这个脚本我收藏了
from ngx_http_google_filter_module.
Related Issues (20)
- 建立谷歌学术镜像 HOT 1
- 能不能一台服务器同时代理谷歌和谷歌学术 HOT 1
- google登录 HOT 2
- error HOT 1
- error
- nginx core dump HOT 4
- unknown directive "google" HOT 6
- Tag a release
- 请更新zlib源
- unknown directive "goole" in /etc/nginx/conf/nginx.conf:44 HOT 10
- demo网站外无法访问 HOT 1
- 撸了一个简易的一键脚本 HOT 2
- GitLab
- http://xx.xx.xx.xx/?gws_rd=cr,ssl无法代理 HOT 2
- Could you update this module to support nginx 1.18 HOT 1
- 能不能请教map反代 HOT 1
- 有没有高手能用iis urlrewrite成功gg反代的
- 我们的系统检测到您的计算机网络中存在异常流量。此网页用于确认这些请求是由您而不是自动程序发出的 HOT 1
- Hi, Can this module support gmail?
- What is up with demo site?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx_http_google_filter_module.