From: CSDN, Author: Eastern Evil,
There are many front-end and back-end whites who do web pages who want to put their hard-earned websites on the Internet for others to observe. However, the technology is limited, and the website deployment process is somewhat confused. Here, I will tell you how to put the website you have made online.
First of all, we need to understand several concepts: filing, parsing.
Then, we also need to know what should be prepared: the website source code (this will not be elaborated on), the server, the domain name.
The so-called website filing is actually the abbreviation of the ICP filing of the website, and the relevant provisions of the state are as follows: the Measures for the Administration of Internet Information Services point out that Internet information services are divided into two categories: operational and non-operational. The State implements a licensing system for commercial Internet information services; Implement a filing system for non-operational Internet information services. Those who have not obtained a permit or have not performed filing formalities must not engage in Internet information services.
In general, ICP Filing refers to the ICP Filing of the domain name, not the server ICP Filing. Whether a website is filed or not depends on whether the space used by the website is domestic or foreign.
If it is a domestic host, the website domain name needs to be filed for the record in order to access your website through the domain name.
If it is a foreign host, the website domain name does not need to be filed and can also be accessed through the domain name.
Domain name resolution is a service that points the domain name to the websitespace IP, so that people can easily access the website through the registered domain name. IP address is the numeric address of the identification site on the network, in order to facilitate memory, the domain name is used instead of the IP address to identify the site address. Domain name resolution is the conversion process from domain name to IP address. The resolution of the domain name is done by the DNS server.
Once we’ve learned about that, we can get hands-on with that.
A server is a device that provides computing servers and network services. When we visit a website, clicking on the website will issue a visit request, the server will respond to the service request, and correspondingly process, feedback the corresponding data.
If we want to make our website visible to others, we have to put it on the server. The more common ones are divided into personal servers and enterprise-level servers. Generally what we need is a personal server. Now people use more servers: Alibaba Cloud, Tencent Cloud, Baidu Cloud, etc. Here I will take Alibaba Cloud as an example to explain (the other processes are about the same).
Registering what there is Alipay is generally no problem, skipped
For Xiao Bai, personal servers generally have two choices, one is ECS ECS, and the other is lightweight application server.
The difference between the two is not much, the former is similar to the pure version of the system, which requires a certain amount of operation and maintenance technology, and the configuration is more cumbersome; The latter is similar to the basic version of the system, easy to use and easy to use. In terms of performance, the latter upgraded the system disk to an SSD, reducing the capacity by half, improving performance. The same CPU, in the case of the same memory, to compare the disk read and write performance, the visible speed improvement is obvious.
Note: Alibaba Cloud needs to purchase a server for more than 3 months before you can apply for ICP Filing (ECS ECS servers that are purchased on a pay-as-you-go basis cannot apply for ICP).
Of course, if you are still a student, Alibaba Cloud has a “Cloud Wing Support Program”.
After the purchase is successful, we need to configure the server.
Once you have purchased the server, you can go to the console in the upper right corner to view it.
Here is your own console, where all the products you have purchased can be viewed.
After clicking “Remote Connection”
Because most operations require “administrator privileges” after entering the console, first switch to “administrator”. Input:
The “root” here is the name of the default administrator, and you need to change it by looking at the name of your own administrator.
Next go to the usr folder and enter:
Note that there is a space in the middle of cd /usr here, otherwise it cannot be entered.
Create a folder under the usr folder, for example: java, to store the jdk packages of tomcat and java used later. Input:
You can see all the folders under usr and whether the Java folder was created successfully.
Because it involves jdk, tomcat installation and demobilization, in order to facilitate the operation, we need to download a software – xftp (or filezilla is also OK), by the way to download java’s jdk package, and tomcat package, the specific can go to the official website to download, not in detail.
After successful installation, open xftp and create a new session.
After confirmation, you can do so.
Copy and paste the downloaded JDK and tomcat packages into the usr/Java directory on the right side of xftp. (Here I have pasted and unzipped, it would have been empty).
Then go back to the command line console and check if the folder is successfully pasted under the Java folder.
After success, you can extract these two compressed packages under this directory and enter them separately:
xxxx is the corresponding name of the compressed package that you download yourself.
If you feel that the unzipped folder name is too long and need to be changed, enter:
After success, the following figure is shown
Then start configuring some of the required variables by entering:
Here you need to add environment variables to it, and enter them directly in the console. Of course, for convenience, you can find the profile file from xftp to export, modify it and then import the overwrite.
Right-click the export, add the following code to the end:
The modification is successfully imported.
Then launch the configuration in the console and enter:
If the following figure is displayed, go to launch tomcat.
If it also appears as shown in the following figure, congratulations, your server has been configured successfully!!
A domain name is the name of a computer or group of computers on the Internet consisting of a string of names separated by dots, which is used to identify the electronic orientation of the computer when data is transmitted.
IP address, is the Internet host as a routing address for the digital identification, people are not easy to remember, resulting in the domain name of this kind of character identification.
In layman’s terms, a domain name is equivalent to a family’s house number, and others can easily find you through this number. This also means that there are no duplicate domain names around the world. Of course, no domain name at this point can also use an IP address to access your website.
You can go to the Alibaba Cloud official website to purchase a domain name, and before you buy, you need to check whether the domain name you want to buy has been registered.
Choose your favorite domain name to register and buy.
After the domain name is purchased, you can go to your console to view it.
Because of the newly purchased domain name, so the need for real-name authentication, click (2) after filling in the relevant information after submission, about 1 working day will have your “exclusive business manager” to call you for real-name authentication information and verification, no problem, then generally 3-5 working days will be successfully certified.
After success, it is as follows:
Then it’s time to file for the domain name.
Here you need to pay attention to: if the server you purchased is within the Chinese mainland, you need to file a domain name to configure the domain name to the server, if not, you can ignore the “filing” step.
The specific filing steps can be viewed here (https://help.aliyun.com/knowledge_detail/36922.html?spm=a2c4g.11186623.6.558.30ba1ff5Iku2Fj), more detailed, I will not go into detail.
It takes 10 to 20 working days for filing, during which time we can first resolve the domain name.
Click “Resolution” in the console
Website domain name resolution:
Email domain name resolution:
Click “Confirm” to resolve successfully.
We can help us upload the source code to the server more conveniently through FTP tools, at present, more foreign users are FileZilla, domestic use is more XFTP tools, putty and so on. Here I take xftp5 as an example.
We have already connected our servers remotely before, so you can connect directly here.
After the connection is successful, we will find such a folder (the Java folder here is the folder where the jdk and tomcat are extracted):
Go into the folder in the green box above, the rest of the things do not need to move, put the entire website source code you have made into a new folder (note that it is best to name it in English), and transfer it in via FTP.
You can then access your web page through your domain name + folder name + html single page name (for example: www.domain name .com/webapps where you store the web page folder name/index).
At this time, your website is basically deployed!
Note: If your web page is accessed through IP address and domain name without adding a port number, you need to try to modify the port, modify it to port 80, and then restart tomcat and try again. The tomcat default configuration file is server.xml, modify 8080 to 80, then restart tomcat and try again, since by default only port 80 can be accessed without a port number.