My-Blog Construction Process: How to Make a Website From Zero to Online Access

Brief description of the article

On May 13th, I launched my own personal blog website: http://blog.hanshuai.xin, and then published an introduction blog about My-Blog on the platform "Docker+SpringBoot+Mybatis+thymeleaf's Java blog system is open source" , there are several After browsing the website, a friend also sent me a private letter asking me how to build and launch a personal website. At that time, I thought that I would write an article to introduce how my website was launched and answer the doubts of several friends.

However, due to the differences in the platforms or solutions that may be selected during the operation process, it is impossible to meet everyone's requirements. This question depends on everyone's personal choice. I will not repeat it in the article. The article is just the solution I chose. If you are helpful, it is the best. If it is different from what you imagined, you can look at other tutorials. This article is completely written according to the online process of My-Blog.

On-line steps

The development process of My-Blog is not included. There are the following steps for launching:

  • Buy cloud server hosting
  • buy a domain name
  • ICP filing
  • System installation and environment configuration
  • My-Blog installation
  • Domain name resolution and port mapping

Buy cloud server hosting

At present, cloud computing has developed rapidly with an annual growth rate of 32% in recent years, and there are hundreds of schools of thought contending in the market (in fact, those big guys), Alibaba Cloud, Tencent Cloud, NetEase Cloud... Basically, they can provide a complete set of complete solutions. NetEase entered the cloud computing market very late, and the number and scale of users are far less than those of Alibaba Cloud and Tencent Cloud. In terms of familiarity, the cloud products I have come into contact with are all from Alibaba Cloud, so I chose the server host this time. It is also the ECS of Alibaba Cloud.
Before Alibaba Cloud buys its cloud products, you must first have an Alibaba Cloud account. Alibaba Cloud's official website: https://www.aliyun.com/
, you can go here to register an account, and then enter the management console. It looks like this:

aliyun
There is a cloud server ECS option in the navigation bar on the left, enter this interface:

ECS

Here is the management interface of ECS. If you have not purchased it yet, click the shopping cart icon on the page to enter the purchase page of ECS:

buy-ecs
Only a part of the page is cut. In this purchase interface, you can choose the server area, CPU, bandwidth and other configurations, and you can choose according to your personal needs. I feel that this kind of personal website traffic should not be very large, so I choose to buy After confirming the configuration and setting the login password of the server, click the 立即购买button at the bottom right to pay. After the payment is completed, you can see your server in your ECS console.

buy a domain name

If you do not have your own domain name, you can also purchase it through Alibaba Cloud, also in the left navigation bar of the console:

domain

Click to enter the domain name management interface:

domain-manage

Click on the domain name registration to enter the domain name query and purchase interface:

buy-domain
After confirming that the domain name you want to use has not been registered, click to enter the purchase page to pay. Some domain names are actually very cheap, and it looks like a meal is not enough. After purchasing the domain name, it is recommended to go for real-name verification .

ICP filing

It should be reminded that if you have purchased an Alibaba Cloud server and want to access it through a domain name, the domain name must be filed .

When it comes to filing, you may feel that filing is very troublesome, with various processes and procedures. In fact, it is not that troublesome, and there are not many steps, just do real-name authentication and fill in some information, and another thing is to take pictures, Alibaba Cloud will also mail you a background curtain for free, you only need to use that curtain at home Just take a half-length photo for the background and upload it, so whether it is the filing of a personal website or a corporate website, it is only a matter of time. Generally, the filing review takes about 20 days. I remember that I was doing ICP filing at that time. At that time, the customer service on Alibaba Cloud kept following the progress, and would call in time to confirm if there was a problem, so there was no particular resistance during the process, and after a period of waiting, it passed smoothly.

At the top right there is a filing column:

beian

Click to enter the record management interface of Alibaba Cloud:

beian-manage

The steps are also marked in the figure. If you file through Alibaba Cloud, first apply for an Alibaba Cloud filing service number, and then enter the filing area:

beian-start

Let's take a look at the detailed filing process: https://help.aliyun.com/knowledge_detail/36895.html

Then there are the notes at the bottom of this page:

beian-notice

After you have a general understanding of the process, click to start filing, then fill in the information as required and wait patiently.

The following is the page after the filing is completed. There were no screenshots at the time of filing, and the pictures of the filing process are gone. You can refer to Alibaba Cloud's tutorial.

beian-success

System installation and environment configuration

cents

The centos system is installed in the ECS, and of course there are other server operating systems. Just choose it according to your personal habits.

Then there are some commonly used tools that need to be installed:

  • JRE(1.8)/JDK(1.8)
  • MySql
  • Nginx
  • Maven
  • git
  • Docker
  • docker-compose
  • ftp service

For the above installation software, not all of them must be installed. I use docker-compose to start My-Blog, so only jre, docker and docker-compose are installed, but if it is started in a non-docker way, it needs to be installed MySQL Server; if you also want to update the code and package on the server, git and maven must also be installed; if you want to package locally and transfer jar packages or other files to the server, then the ftp service must be opened. The above tools are for My-Blog. If it is another web project, tomcat or jetty may also need to be installed.

I will not write O(∩_∩)O for the installation tutorial of each tool.

My-Blog installation

Check out My-Blog's wiki document, which describes the installation process in detail, address: https://github.com/ZHENFENG13/My-Blog/wiki

Domain name resolution and port mapping

DNS

Or enter the domain name management interface:

domain-jiexi

Click Resolution in the column of the domain name you want to resolve, and then enter the domain name resolution interface:

domain-jiexi-add

Click Add Analysis, and then add a configuration of type A. For example, the website address of My-Blog is blog.hanshuai.xin, and the host record can be filled in blog, and then the record value, fill in the IP address of your server.

Port Mapping

If you want to access the web resources you deployed, you need to do one more step. For example, the port exposed by My-Blog is 28080, then you cannot access http://blog.hanshuai.xinit because the port of the http service is 80, so either you expose the exposed port. The port is changed to 80, but this method is not flexible. If you want to deploy multiple websites, it will be finished, so it is best to install a reverse proxy software to listen to port 80, and then forward the request to port 28080, such as nginx, or haproxy.

Summarize

After the above steps are completed, the website construction and online process are completed, and the website can be accessed on the public Internet. In fact, the most important steps are the first three steps: purchasing cloud server hosts, purchasing domain names, and ICP filing. After these three steps are completed, Your website has a "legitimate identity", and the subsequent deployment work is often done even in daily development, so I didn't spend too much space on it. If there are errors in the text, please report them, and I will correct them as soon as possible.

This article is written based on my personal website My-Blog. What I mentioned in the article is also my experience of going online on My-Blog in the past month. I will make a simple record and also answer the questions of several friends who privately messaged me at that time. Question, I hope you can have a simple answer after reading it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325782435&siteId=291194637