v2-717f7c9bcf3b8b6b364f23bbf0e55d0b_1440w

前言

最早接触的 VPS 是谷歌云,当时的规则是新用户免费赠送 300 美金,在一年之内使用。可能由于各大 Youtuber 推的太猛了,谷歌这么大的厂子都觉得被撸疼了,后来更改了条款,300 美金的试用时间从 1 年改成了 3 个月。还记得在油管上能搜到好多关于继续撸谷歌云的教程,但是由于玩 VPS 也只是为了科学上网,后来学会了其他科学上网的方法,就放弃继续撸谷歌云了。

由于各种免费科学上网的方法都有一定的稳定性和速度的问题,时不时就不能用了,就比如 IBM Cloud 那次全部删号事件。于是不得不继续踏上寻找免费科学上网方法之路。

于是就找到了这个号称永久免费的小鸡:甲骨文云

image-20210908161138418

Foreword

The first VPS I got in touch with was Google Cloud. Back then the rule was that new users got a free 300 USD trial to use within one year. Maybe because those Youtubers pushed it too hard, even a giant like Google felt fleeced, so they later changed the terms — the 300 USD trial was shortened from 1 year to 3 months. I remember being able to find tons of tutorials on YouTube about continuing to squeeze Google Cloud, but since I only played with VPS for a proxy anyway, after I learned other proxy methods, I gave up on Google Cloud.

Since all the free proxy methods have certain stability and speed issues and stop working from time to time — like that time IBM Cloud deleted everyone’s accounts — I had no choice but to keep searching for free proxy methods.

And that’s how I found this “little chicken” that claims to be permanently free: Oracle Cloud

image-20210908161138418

注册

和谷歌云一样,想要免费体验就必须添加付款方式,也就是双币信用卡(对学生党来说永远的痛😭)。好在,我拜托了我的一个哥们儿,用了他的信用卡注册了账号。

关于注册甲骨文云的账号,网上有许多人说注册不成功,我的注册过程是没有遇到任何问题,整个过程都很顺利。而且我还同一张信用卡住注册了2个账号,都轻松成功了,回顾一下我的注册过程,大概有以下几个需要注意的点。

  1. 甲骨文云是有中国网站的,所以注册过程不需要翻墙,很贴心。所以我也没翻墙,也就是说我使用的 IP 和我填写的地址是可以对应上的,起码是同一个国家的😂。

  2. 点击注册云免费套餐 => 开始免费试用 => 填写你的常规信息就行了

    为了保证注册成功率,我填的信息都是比较真实的信息,也就是说 国家填写中国 姓名填写的信用卡账户的姓名,至于电子邮件 Gmail 和 QQ 我都试过,都可以。

    image-20210908161015043

  3. 验证电子邮件之后继续填写其他信息,其中几个重要的点包括 信用卡绑定区域选择

    • 信用卡绑定:绑定成功之后会验证扣费,在我这张卡上每次银行的提示都是扣费失败,但是对于注册和使用没什么影响。在注册成功之后的几天内也会陆续验证扣费,但是每次都是失败,不会真的扣费,不影响使用,所以不要轻易解绑,免得后期验证失败剥夺你的使用权。
    • 区域选择:注册时的区域选择不可以更换,决定了你这只小鸡在哪里工作。一般科学上网的小鸡自然是选择日韩区域,毕竟物理距离近嘛。但是你要考虑到,中国人薅羊毛的破坏力有多大,很多离中国近的区域都不让选择了😄。不多经过我的实测,选美国,选伦敦,对科学上网也没什么影响,依然是很快的速度,可以轻松观看 Youtube 4k 视频的。我的两个小鸡一个选在了美国,一个选在了伦敦。

    如果你只是轻量使用,别撸的太厉害了,应该注册还是挺简单的。

Registration

Just like Google Cloud, to experience the free tier you have to add a payment method, i.e. a dual-currency credit card (the eternal pain of students 😭). Fortunately, I asked a buddy of mine and used his credit card to register the account.

Regarding registering an Oracle Cloud account, many people online said their registration failed, but my registration process didn’t hit any problems — the whole thing went smoothly. I even registered 2 accounts with the same credit card, and both succeeded easily. Looking back at my registration process, there are roughly the following points worth noting.

  1. Oracle Cloud has a Chinese website, so no VPN is needed for registration — quite thoughtful. I didn’t use a VPN either, meaning the IP I used and the address I filled in correspond, at least in the same country 😂.

  2. Click Register for Cloud Free Tier => Start Free Trial => just fill in your usual info

    To ensure a successful registration, I filled in fairly truthful info: country as China, name as the credit card account holder’s name. As for email, I tried both Gmail and QQ, and both work.

    image-20210908161015043

  3. After verifying your email, continue filling in the rest of the info, with several key points including credit card binding and region selection

    • Credit card binding: after binding succeeds, a charge verification is made. On my card, the bank’s notification was always that the charge failed, but it had no effect on registration or usage. In the days after successful registration, charge verifications keep coming, but each one fails and nothing is actually charged, so it doesn’t affect usage. Don’t unbind it casually, or a later verification failure might take away your right to use it.
    • Region selection: the region chosen during registration can’t be changed, and it determines where your little chicken lives. For a proxy chicken, you’d naturally pick the Japan/Korea region, since the physical distance is short. But you have to consider how destructive Chinese wool-shearing is — many regions close to China are no longer selectable 😄. Still, from my own testing, choosing the US or London makes no difference for proxy use; the speed is still fast, and you can easily watch Youtube 4k videos. Of my two chickens, one is in the US and one is in London.

If you only use it lightly and don’t abuse it too much, registration should be fairly easy.

创建实例

注册成功后会有邮件提醒,告诉你还没有完全创建成功,再过几个小时之后会有第二封邮件通知你已经可以使用了,点击邮件里的链接登录账号即可。

登陆后可以看到你的账户里有 400 SGD(新加坡币),这 400 建议就不要使用了,我们只使用始终免费的就够了,在网页上方还会有横幅提示你升级账户,不要点!避免一切可能扣费的行为。

主面板大概就是这个样子。

image-20210908191253276

接下来就可以创建我们自己的小鸡啦!

依次点击 菜单 => 计算 => 实例 => 创建实例

image-20210908191446320

名称可以自己修改,位置一般不用管了。

映像和配置改成自己想要的,但是记住一定要看到符合始终免费条件才行,免费实例的磁盘大小不要超过100 GB,我这里就选择默认了(46GB)。

image-20210908191936799

我这里把映像改成了 Ubuntu ,核心选择默认。

image-20210908192213989

为了稍后和小鸡建立 SSH 通信,这里首先保存以下私有密钥。

image-20210908192324540

点击创建即可。

image-20210908192432330



状态变为正在运行,小鸡就创建成功了,我们可以在本机或者使用站长工具 Ping 一下这个 IP 验证是否可用。

image-20210908192756793

可以 Ping 通,就可以正式开启小鸡的折腾之旅了。

image-20210908193000561

Creating an Instance

After successful registration, an email will remind you that the account hasn’t been fully created yet. A few hours later, a second email will notify you that it’s ready to use; just click the link in the email to log in.

After logging in, you’ll see 400 SGD (Singapore dollars) in your account. It’s recommended not to use this 400 — the always-free tier is enough. There will also be a banner at the top of the page prompting you to upgrade your account; don’t click it! Avoid anything that might incur charges.

The main dashboard looks roughly like this.

image-20210908191253276

Now we can create our own little chicken!

Click through Menu => Compute => Instances => Create Instance

image-20210908191446320

You can change the name; the location usually needs no attention.

Change the image and configuration to what you want, but remember it must show Always Free Eligible. The free instance’s disk must not exceed 100 GB; I just went with the default here (46GB).

image-20210908191936799

I changed the image to Ubuntu and left the core count at default.

image-20210908192213989

To establish SSH communication with the chicken later, save the private key here first.

image-20210908192324540

Just click Create.

image-20210908192432330



Once the status changes to Running, your chicken is successfully created. You can ping this IP from your local machine or using a webmaster tool to verify it works.

image-20210908192756793

If it responds to ping, the tinkering journey with your chicken officially begins.

image-20210908193000561

安装宝塔面板

开放端口

由于宝塔面板需要使用 8888 端口,所以需要先在 VPS 的网络安全设置中放行该端口。

点击 子网

image-20210908194925627

image-20210908201702029

接下来点击添加入站规则,这里我很暴力的开放了所有端口所有流量,当然为了安全你可以开放部分端口 如 80、443、25、8888等。

image-20210908202057176

建立连接

我这里使用 FinalShell 客户端与服务器建立连接,FinalShell 好用且免费。

动画

动画1

各个系统的宝塔面板的安装命令如下,选择对应的复制粘贴即可:

  1. Ubuntu/Deepin安装命令:

    1
    wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
  2. Debian安装命令:

    1
    wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
  3. Fedora安装命令:

    1
    wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh

由于我创建的是 Ubuntu 系统,所以直接粘贴第一个命令。

image-20210911124001970

遇到提问的问题一路 y 下去就好了。

等待几分钟,出现如下提示,即为安装成功。

注意黄色警告信息中提示我们还没有开放 8888 端口,前面我们开放了甲骨文云的所有端口,但是服务器防火墙的端口还没有开放,因此需要开放防火墙的 8888 端口。

image-20210911124619019

Ubuntu系统依次输入下面的命令:

1
2
3
4
5
6
7
8
9
sudo apt-get update
sudo apt-get install iptables
sudo iptables -I INPUT -p tcp --dport 8888 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables-save
sudo apt-get install iptables-persistent
sudo netfilter-persistent save
sudo netfilter-persistent reload

开放端口后,访问外网地址,输入用户名和密码,即可使用宝塔面板管理小鸡了。

image-20210911125709814

至此,宝塔面板安装成功,可以像个正常人一样管理服务器了🎉。

Installing the BT Panel

Opening Ports

Since the BT panel needs port 8888, you first need to allow this port in the VPS’s network security settings.

Click Subnets

image-20210908194925627

image-20210908201702029

Next, click Add Ingress Rules. Here I ruthlessly opened all ports and all traffic; of course, for security you can open only some ports, such as 80, 443, 25, 8888, etc.

image-20210908202057176

Establishing a Connection

I used the FinalShell client to establish the connection with the server — FinalShell is nice and free.

动画

动画1

The BT panel installation commands for each system are as follows; pick the right one and copy-paste it:

  1. Ubuntu/Deepin installation command:

    1
    wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
  2. Debian installation command:

    1
    wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
  3. Fedora installation command:

    1
    wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh

Since I created an Ubuntu system, I pasted the first command directly.

image-20210911124001970

When it asks questions, just press y all the way through.

Wait a few minutes; when the following prompt appears, the installation has succeeded.

Note that the yellow warning message tells us port 8888 hasn’t been opened yet. Earlier we opened all ports on Oracle Cloud, but the server firewall’s port hasn’t been opened, so we need to open port 8888 on the firewall.

image-20210911124619019

On Ubuntu, enter the following commands one by one:

1
2
3
4
5
6
7
8
9
sudo apt-get update
sudo apt-get install iptables
sudo iptables -I INPUT -p tcp --dport 8888 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables-save
sudo apt-get install iptables-persistent
sudo netfilter-persistent save
sudo netfilter-persistent reload

After opening the port, visit the external address, enter the username and password, and you can manage your chicken with the BT panel.

image-20210911125709814

At this point, the BT panel is installed successfully, and you can manage the server like a normal person 🎉.

建个网站

利用宝塔面板可以实现一键建站了,我们可以搭建自己的博客,或者其他网站。关于博客可以使用 WordPress 简单方便。由于我以前玩过 WordPress 博客,觉得也不是很方便,对于小白来说上手很简单,但是修改有点难。

这里我利用宝塔面板部署一个我前几天介绍过的网盘列表网站 : OneManager-php

首先我们安装首页推荐的 Web 服务套餐。

image-20210911130647601

大约 30 分钟,安装完成。

image-20210911135334342

点击 网站 => 添加站点 => 输入网站域名

动画1

在网站根目录中删除原有文件上传网站文件。

动画1

将文件夹中的内容剪切到网站根目录。

动画1

重写伪静态。

动画2

此时在浏览器中输入我们网站的域名,就可以安装网盘程序了。

动画3

Building a Website

With the BT panel you can build a website with one click — we can set up our own blog or other sites. For a blog, WordPress is simple and convenient. I’ve played with WordPress blogs before and found them not very convenient: easy for beginners to get started with, but hard to modify.

Here I’ll use the BT panel to deploy the netdisk list website I introduced a few days ago: OneManager-php

First, install the Web service bundle recommended on the home page.

image-20210911130647601

About 30 minutes later, the installation is complete.

image-20210911135334342

Click Websites => Add Site => enter the domain name

动画1

In the site’s root directory, delete the original files and upload the site files.

动画1

Cut the contents of the folder into the site’s root directory.

动画1

Rewrite pseudo-static rules.

动画2

Now enter our site’s domain in the browser and you can install the netdisk program.

动画3

搭建Telegram的MTProto代理

首先在软件商店中安装 Docker 容器。

image-20210911145934130

在安全页面放行一个自定义端口,我这里使用 23456.

image-20210911150456895

在 SSH 客户端中输入如下命令:

1
2
3
sudo -s
apt install -y curl
bash <(curl -sL https://raw.githubusercontent.com/hijkpw/scripts/master/mtproto.sh)

按提示操作即可。

动画3

安装成功,在电报客户端添加代理,输入相应参数即可。

Setting Up a Telegram MTProto Proxy

First, install Docker in the software store.

image-20210911145934130

Allow a custom port on the security page; I used 23456 here.

image-20210911150456895

Enter the following commands in the SSH client:

1
2
3
sudo -s
apt install -y curl
bash <(curl -sL https://raw.githubusercontent.com/hijkpw/scripts/master/mtproto.sh)

Just follow the prompts.

动画3

Once installed successfully, add the proxy in the Telegram client and enter the corresponding parameters.

流量使用情况查看

甲骨文云的出站流量限制是每个月 10 TB(账号共享),虽然有限量,但10TB的流量已经足够使用了。

image-20220220182423336

下面介绍如何查看流量账单。

点击 计费和成本管理==>成本分析

image-20220220182708851

选择开始日期和结束日期,将显示调整为使用量,最后点击应用即可查看。

image-20220220183410725

表格最后一列即为流量的使用情况。

image-20220220183806249

Checking Traffic Usage

Oracle Cloud’s outbound traffic limit is 10 TB per month (shared across the account). Although there is a limit, 10TB is more than enough.

image-20220220182423336

Below is how to check the traffic bill.

Click Billing and Cost Management ==> Cost Analysis

image-20220220182708851

Select a start date and end date, change the display to Usage, then click Apply to view it.

image-20220220183410725

The last column of the table is the traffic usage.

image-20220220183806249