Cost advantage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Technical advantages
Operation guide: Create an instance:
-
First of all, let's choose an Amazon Cloud overseas region that has a fast visit in China. Here we take Singapore as an example. Switch to Singapore in the upper right corner of the page.
-
Click "Service" in the upper left corner of the page, find EC2, and click.
-
Click the "Start Instance" button on the webpage.
-
On the operating system selection page, we select Ubuntu Server 20.04 LTS and select ARM as the system version on the right. Click the blue "Select" button. Here we notice that if the operating system is included in the free package, it will be marked with "qualified free package".
-
On the page of selecting instance type, we select micro, where the letter g indicates that Graviton2 chip is adopted. We see that this type is also marked with "free trial". Click "Next: Configure Instance Details".
-
Remove the check box behind the "Integral Specification" to avoid additional costs. Click "Next: Add Storage".
-
On the page of adding storage, we changed the size of the root volume to 30GB, because the maximum free package provided by Amazon Cloud is 30GB. Click "Next: Add Label".
-
Without any modification, click "Next: Configure Security Group", select "Create a New Security Group", click the "Add Rule" button at the bottom left corner, select "http" as the type, and confirm that the lower port range is 80 and the source is 0.0.0/0, which means that any IP is accessible. After::/0 stands for IPv6. Click the blue button "Review and Start" at the bottom right.
-
On the check instance launch page, click the bottom right button "Start". You will be asked to create a key for logging in to the instance, and then create and save it as prompted.
Operation Guide: Assign Fixed IP
-
The instance created in this way only has a temporary IP address. We need to assign a fixed IP address to the instance. We click "Service" in the upper left corner to find the VPC.
-
Enter the VPC, click "Elastic IP" on the left, and then click "Assign Elastic IP Address" on the right to get a fixed IP address. Select the address, click the "Operation" button, select "Associate Elastic IP Address", select the instance just created on the association page, and associate the fixed IP with the instance just created. Please write down this fixed IP address, which will be used later to access the network disk.
Operation Guide: Installing NextCloud
-
Returning to the EC2 service interface, we observed that the instance status is "Running" and the status check is "2 checks passed". It means that the instance has been created successfully. Check the check box in front of the instance and click the "Connect" button on the right.
-
We can use EC2 Instance Connect to log in to the EC2 instance from the browser. If it fails, we can use the language switch in the lower left corner of the console interface and switch the console interface to English to solve this problem. However, some regions do not support EC2 Instance Connect. If you encounter regions that do not support EC2 Instance Connect, you can refer to the "Connect to Instance" section in the following tutorial: https://www.amazonaws.cn/getting-started/tutorials/start-ec2-linux-instance/
-
After logging in to the instance, first install the open source network disk software NextCloud, and run the command:
-
After the installation, you will be prompted with "nextcloud 22.1.1snap2 from Nextcloud ✓ installed". After the software installation is completed, you need to configure the user name and password. Use the following commands, where xiayan is replaced with your user name and passw0rd is replaced with your password:
-
After the configuration is completed, "Next cloud was successfully installed" will be displayed. Now we need to configure the trust domain. If you want to use IP to access the network disk, then the following command "value=" will be followed by the elastic IP you just configured. If you have your own domain name, then the domain name will be used to access later. Then the following command "value=" will be followed by your domain name and point your domain name to the elastic IP you just configured.
-
-
Now we can use the browser to open the IP address or domain name just now. Pay attention to using http. If the browser fails to open, you can try to enter the completed address, http://plus the IP address. Log in with the user name and password configured just now. However, the current interface is English. You can click Personal Settings in the upper right corner to change the language to Chinese.
-
Operation Guide: Configure NextCloud back-end storage as S3
-
So far, the network disk has been built. Now, 30G free EBS is used as the storage medium of the network disk. If you need more space and better persistence, we can configure the network disk to use S3 for storage. Click Personal Settings in the upper right corner, select Application, find External storage support in Disabled Applications, and click Enable.
-
Reference https://www.amazonaws.cn/getting-started/tutorials/backup-files-to-amazon-s3/ Create an S3 bucket. After creating the bucket, we also need to create an iam user. Click the service on the top left and select IAM. Click "User" on the left, and then click "Add User Button". Enter a user name and select "Access Key" in the access type.
-
When adding permissions, we select "Attach existing policies directly", then enter "s3" in the filtering policy, and check "AmazonS3FullAccess".
-
There is no need to make changes later, and the next step is user creation. After the user is prompted that the creation is successful, "Access Key ID" and "Private Access Key" will be displayed. Please write it down. -
In Personal Settings, find "External Storage", select Add Storage, and select Amazon S3.
-
Fill in the bucket name just created and the region code of the bucket in the specified location. Make sure that S3 and EC2 instances are in the same region, otherwise there will be additional costs. For area code query, see this link: https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts -regions In addition, it is also necessary to fill in the access key ID and "private access key" recorded just now, and click the check box on the right. If the addition is successful, there will be a green circular icon prompt on the left, as shown below:
-
We can find the newly created Amazon S3 directory in the list of online disks. The files in this directory are placed on S3 and have 11 nines.
conclusion