使用centos7系统的国外VPS制作google镜像
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

目前国内的搜索引擎也比较多,百度、360、搜狗什么的,百度基本是一家独大,但是百度搜索出来的内容广告太多,而且一些垃圾商家利用竞价排名的方式把自己的服务推到最前面,我们想找一个官方网站非常难,说到这里我们就想起了谷歌搜索,谷歌搜索算是非常良心了,搜索出来的东西基本就是你想要的,之前听说谷歌又要重回到国内了,相信谷歌一定不会放过国内的市场的,但是目前无法访问谷歌,不过我们可以通过使用国外VPS制作一个谷歌镜像来使用谷歌搜索,今天就给大家分享一个制作教程,我们使用的是github上的一个制作方法。
VPS选择建议
| 排名 | 商家 | 套餐 | 购买VPS.COM.IN |
| 1 | virmach | $10.5/年 512M内存 500G流量 KVM | 点击购买 |
| 2 | vultr | $3.5/月 512M内存 500G流量 KVM IP随时换 | 点击购买 |
| 3 | 搬瓦工 | $48.6/年 1G内存 1T流量 KVM CN2线路 | 点击购买 |
作者地址
https://github.com/cuber/ngx_http_google_filter_module| 1 | https://github.com/cuber/ngx_http_google_filter_module |
制作方法
使用Xshell连接你的VPS,输入以下脚本:
yum install -y gcc gcc-c++ git makewget "http://nginx.org/download/nginx-1.7.8.tar.gz"wget "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz"wget "https://www.openssl.org/source/openssl-1.0.1j.tar.gz"wget "https://www.openssl.org/source/openssl-1.0.1j.tar.gz"wget "http://zlib.net/zlib-1.2.11.tar.gz"git clone https://github.com/cuber/ngx_http_google_filter_modulegit clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module| 12345678 | yum install -y gcc gcc-c++ git makewget "http://nginx.org/download/nginx-1.7.8.tar.gz"wget "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz"wget "https://www.openssl.org/source/openssl-1.0.1j.tar.gz"wget "https://www.openssl.org/source/openssl-1.0.1j.tar.gz"wget "http://zlib.net/zlib-1.2.11.tar.gz"git clone https://github.com/cuber/ngx_http_google_filter_modulegit 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.11.tar.gz| 1234 | 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.11.tar.gz |
首先们要安装nginx,进入nginx源码文件夹:
cd nginx-1.7.8| 1 | cd nginx-1.7.8 |
设置一下编译选项:
./configure \ –pix=/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| 1 | ./configure \ –pix=/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 |
开始编译安装:
makesudo make install| 12 | makesudo make install |
安装完成后我们测序一下是否成功
/opt/nginx-1.7.8/sbin/nginx -t| 1 | /opt/nginx-1.7.8/sbin/nginx -t |
显示以下界面就是成功了
编辑conf文件,编辑命令:
vi /opt/nginx-1.7.8/conf/nginx.conf| 1 | vi /opt/nginx-1.7.8/conf/nginx.conf |
编辑器使用方法
按a键可以进行编辑,坐下角会出现insert标志,这是linux基本的命令。按ESC后,输入:wq是保存并退出,输入:q!是不保存退出。
将server部分更改为以下内容
server { listen 80; server_name www.123.com;#换成你的域名,需要解析到VPS上 location / { proxy_pass https://www.google.com; proxy_connect_timeout 120; proxy_read_timeout 600; proxy_send_timeout 600; send_timeout 600; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; google on; google_language "zh-CN"; } }| 12345678910111213141516 | server { listen 80; server_name www.123.com;#换成你的域名,需要解析到VPS上 location / { proxy_pass https://www.google.com; proxy_connect_timeout 120; proxy_read_timeout 600; proxy_send_timeout 600; send_timeout 600; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; google on; google_language "zh-CN"; } } |
也可以改成以下内容
server { server_name www.123.com;#改成你的域名 listen 80; resolver 8.8.8.8; location / { google on; } }| 12345678 | server { server_name www.123.com;#改成你的域名 listen 80; resolver 8.8.8.8; location / { google on; } } |
ESC后输入保存并退出文件的命令:
启动nginx /opt/nginx-1.7.8/sbin/nginx -c /opt/nginx-1.7.8/conf/nginx.conf
| 1 | /opt/nginx-1.7.8/sbin/nginx -c /opt/nginx-1.7.8/conf/nginx.conf |
如果nginx已经运行了,需要重启一次就会加载新的配置,重启命令如下:
/opt/nginx-1.7.8/sbin/nginx -s reload| 1 | /opt/nginx-1.7.8/sbin/nginx -s reload |
这样你打开你的域名,就会出现谷歌的页面,可以愉快的搜索了,再也不要看其他搜索引擎的广告了。
猜你可能想看的VPS
- stsdust 广州移动大带宽 nat 预售,最高 200M 带宽 6T全球[VPS测评]
- 禁止浏览器自动填充 input 用户名密码全球[VPS测评]
- CloudCone→$15 年 KVM-512MB 10GB 1TB 洛全球[VPS测评]
- sharktech→60G 高防服务器(物理机) $99 月 1Gbps全球[VPS测评]
- 优惠 €13.46 半年 2 核 CPU 2G 内存 100G 硬盘 不全球[VPS测评]
- 便宜 $0.4 首月 2G 内存 20G 硬盘 2T 流量@100Mbp全球[VPS测评]
- 2019 年 2 月 Vultr 最新优惠码 新用户注册送 50 美元 日本VPS[主机]
- Sharktech→$29.6 年 1GB 内存 20GB SSD 空间虚拟空间(主机)
- 8 周年促销 HostHatch→250G 大硬盘机房年付仅需要 15 全球[VPS测评]
- 疯狂猜成语 图猜成语七个义字分开六个思字在一起是什么成语?全球[VPS测评]
- OneVPS 低价HK Bug 香港VPS 测评记录 速度和路由测试香港VPS[主机]
- 2019黑五: Krypt ION- 2C 2G RAM 60G SSD全球[VPS测评]
- HKServerSolution → 1核心 2G内存 20G SSD 全球[VPS测评]
- 晚点独家丨拼多多9月上线跨境电商平台,首站美国美国VPS[主机]
- 云服务器和云服务器租用,云服务器做什么??全球[VPS测评]
- 二三互联,香港cn2云服务器5折+85折双重优惠,稳定不限流量,1核1G香港VPS[主机]
- 晚点独家丨拼多多9月上线跨境电商平台,首站美国美国VPS[主机]
- ExCloud:1核256M存/8GB SSD空间/100GB流量/OV虚拟空间(主机)
- 港口雄开万里流丨不出国门海淘全球青岛跨境电商未来可期全球[VPS测评]
- 快速云:云服务器vps的区别是什么云服务器和vps哪个比较好2022-0全球[VPS测评]
- 青云互联:香港弹性云CN2直连线路,全场8折,免费windows系统,月WINDOWS
- 六一云:香港CMI VPS,10G防御,1核/1G/40G SSD/15香港VPS[主机]
- centos7如何查看firewall防火墙状态:开启/关闭/重启防火墙全球[VPS测评]
- 世界杯季疫情突发,跨境电商订单排队,义乌商人面临难题全球[VPS测评]
- 咖啡主机:香港1G:15.6元/月(季付),美西1G:16.8元/月(季香港VPS[主机]
- 野草云:2021开年大促 – 香港VPS 136.8元年起;香港服务器3香港VPS[主机]
- DiyVM:香港服务器499元起,香港/美国vps五折/2G内存,月付6美国VPS[主机]
- 阳帝云:3月优惠活动,香港GIA/香港TG/洛杉矶200G硬防vps,首香港VPS[主机]
- 香港的云服务器值得租用吗?有什么好处?香港VPS[主机]
- 播放量破千万,点赞量破百万,你绝对想不到这三款多功能产品居然在TK上卖爆全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-28193.html











