在centos上建个google镜像站
来源:互联网 发布:网页过滤软件 编辑:程序博客网 时间:2024/06/06 18:03
有时候只是想用google搜索下,如果又vpn,又ss的,很是麻烦,google镜像站就很方便,打开即用
链接 https://github.com/cuber/ngx_http_google_filter_module/blob/master/README.zh-CN.md
步骤如下
准备必要工具
yum install -y gcc gcc-c++ git make
#
下载最新版源码
http://nginx.org/en/download.html
#
wget “http://nginx.org/download/nginx-1.7.8.tar.gz”
#
下载最新版 pcre
#
wget “ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz”
#
下载最新版 openssl
#
wget “https://www.openssl.org/source/openssl-1.0.1j.tar.gz”
#
下载最新版 zlib
#
wget “http://zlib.net/zlib-1.2.8.tar.gz”
#
下载本扩展
#
git clone https://github.com/cuber/ngx_http_google_filter_module
#
下载 substitutions 扩展
#
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module
#
解压缩
#
tar xzvf nginx-1.7.8.tar.gz
tar xzvf pcre-8.38.tar.gz
tar xzvf openssl-1.0.1j.tar.gz
tar xzvf zlib-1.2.8.tar.gz
#
进入 nginx 源码目录
#
cd nginx-1.7.8
#
设置编译选项
#
./configure \
–prefix=/opt/nginx-1.7.8 \
–with-pcre=../pcre-8.38 \
–with-openssl=../openssl-1.0.1j \
–with-zlib=../zlib-1.2.8 \
–with-http_ssl_module \
–add-module=../ngx_http_google_filter_module \
–add-module=../ngx_http_substitutions_filter_module
#
编译, 安装
如果扩展有报错, 请发 issue 到
https://github.com/cuber/ngx_http_google_filter_module/issues
#
make
sudo make install
#
启动, 安装过程到此结束
#
/opt/nginx-1.7.8/sbin/nginx
#
配置修改后, 需要 reload nginx 来让配置生效,
#
/opt/nginx-1.7.8/sbin/nginx -s reload
安装完成后,配置下即可
http配置方式
server {
server_name <你的域名>;
listen 80;
resolver 8.8.8.8;
location / {
google on;
}
}
- 在centos上建个google镜像站
- centos安装google 浏览器
- Centos安装google浏览器
- centos for google install
- 在Fedora 23/22, CentOS/RHEL 7.1 上安装Google Chrome的方法
- centos 6 google cannt start
- Google goagent on linux centos
- Install google-chrome on CentOS
- Centos安装google浏览器01
- CentOS 6.5安装Google浏览器
- CentOS下安装google-chrome
- centos 7 安装Google earth
- Google在中国遇难?
- 人在Google
- 在Google上赚钱!!!
- 还好,Google还在!
- Google也在瘦身
- CentOS 6.x 安装Google Chrome浏览器
- Linux(三)——ubuntu系统的网络配置
- FZU 2218 Simple String Problem(状态压缩DP)
- 欢迎使用CSDN-markdown编辑器
- 圣思园张龙-Java SE 第三讲(原生数据类型使用陷阱 Pitfall of Primitive Data Type)
- OOD - blackjack
- 在centos上建个google镜像站
- c语言在gcc中编译时使用sqrt报错的解决
- Partition List
- Android网络编程之HttpURLConnection
- OOD - blackjack design
- SDL学习(3)图像运动处理
- timer invalidate
- Android 自动化测试工具(一)
- deeplearning资料的传送门