使用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
- 补货通知 搬瓦工$29.99 年付 VPS 补货了 速度上了。全球[VPS测评]
- 促销 标准互联→圣何塞 CN2 GIA 年付 300 元 洛杉矶 CN2全球[VPS测评]
- 疯狂猜成语 图猜成语一个老人说了很多话旁边一个人在叹气是什么成语?全球[VPS测评]
- tudcloud→$7.8 月 KVM-1GB 10G SSD 5M 无香港VPS[主机]
- FDCServers→$999 月 2*E5-2650 128GB 内存日本VPS[主机]
- 流量翻倍 RootNerds→日本直连线路 VPS OpenVZ 虚拟架日本VPS[主机]
- 便宜 VPS ¥26 月 1G 内存 40G SSD 1T 流量 1Gb全球[VPS测评]
- yum 提示 Error: rpmdb open failed 错误的解全球[VPS测评]
- 腾讯云”共克时艰 续费扶持”,史无前例的腾讯云服务器老用户 3.6 折续全球[VPS测评]
- JQuery.validate 通过 class 属性批量设置 inpu全球[VPS测评]
- OVH→$6 月 2GB 内存 40GB NVMe 空间 不限流量 25虚拟空间(主机)
- 如何解决WordPress后台登录显示重定向次数过多全球[VPS测评]
- VMon Cloud → 黑五 7折 月付3.2$ 越南 新加坡 澳大利全球[VPS测评]
- hostodo-黑五美国斯波坎9.99美元年付VPS测评美国VPS[主机]
- 2020黑五 GreenCloudVPS → 新加坡 日本机型 → 日本VPS[主机]
- btcvps,比特云怎么样?香港VPS,KVM架构带宽4M月付88港币香港VPS[主机]
- 磐逸云怎么样?香港沙田cn2vps 带宽5M年付128元香港VPS[主机]
- 拼多多回应筹备跨境电商业务:不予置评全球[VPS测评]
- 咖啡主机:新上香港云服务器、美国CN2轻量级KVM vps,香港15.6美国VPS[主机]
- 阿里云香港vps怎么样?阿里云香港、新加坡云主机如何购买?香港VPS[主机]
- 者也IO,香港日本美国云服务器促销,2核2G1000元/2年,7折+内存日本VPS[主机]
- 葫芦云:香港将军澳CN2云服务器24元/月,1核/1GB/25G硬盘/3香港VPS[主机]
- tudcloud,香港vps终身八折$7.76/月起,1核1G内存,香港香港VPS[主机]
- 云米科技:香港/美国/日本等海外免备案vps云服务器,最低13元/月日本VPS[主机]
- 免备案香港云服务器好在哪里?为什么企业要用海外云主机或VPS?香港VPS[主机]
- 恒创科技:香港免备案CN2线路VPS/美国CN2直连VPS,月付28元起美国VPS[主机]
- 快速云:科普云服务器服务器的概念和作用2022-08-2313:26来源全球[VPS测评]
- 华凯易佰同比扭亏跨境电商行业回暖H2旺季将至中报追踪全球[VPS测评]
- 八成企业看好出海投资 防止“溺水”需重视这一点全球[VPS测评]
- 千古互动:香港vps,1核/1G/20M,月付35元起;挂机宝5元/月起香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-21699.html











