当前位置:网站首页>A tutorial on building a website from scratch with complete steps (7000 words and 102 screenshots for everyone to understand, with source code attached)
A tutorial on building a website from scratch with complete steps (7000 words and 102 screenshots for everyone to understand, with source code attached)
2022-06-11 01:34:00 【Haoshuo programming】
Since August this year, I have been from 0 Started doing two websites :
There are often unknown places to check . In fact, there are a lot of information on the Internet
But it may be relatively scattered , It needs to be checked repeatedly , Time consuming and tiring
Then this time I have time to think about writing an article from scratch 、 Step complete website building tutorial
Hope to help you save time , There's no need to go through a patchwork of checks
I spent two days on this article , The whole article 7000 word ,102 Screenshot description , Fine to every click 、 Each input description
Try to make everyone 、 Whether or not there is a programming foundation , You can make your own website , It is recommended to collect in advance , In case you can't find it in the future .
If you have any questions during the operation, please contact me by private letter , I will try my best to help you solve your problems
I wish you all success !

Part 1: Buy a cloud server
Website services need to run on the computer , And this computer needs 24 Turn it on every hour , This is impossible for our home computers .
So we need to buy a cloud server , Run the website service on the ECS .
Just like the same food can be produced by many manufacturers , At present, there are many manufacturers that can provide cloud servers : tencent 、 Ali 、 Huawei …
The process of purchasing ECS by each manufacturer is similar , Let me take Tencent cloud server as an example :
Baidu search ’ Tencent cloud ’ Enter official website

Register and log in

Click the latest activity in the upper left corner

Click time limited second kill
Here is the preferential area for the first order of couples , It will save a lot money

Purchase server
For us personally , If it's a small application , Select the minimum configuration
50money One year is very favorable , But remember, it must be a newly registered user !

Just like we buy our own computer and choose the configuration , After clicking buy now , We choose the configuration of the server :
There are two things we need to choose here , Other basic defaults are OK ,
Activity area : Choose to be close to yourself , The Internet will be better
Mirror image ( Focus on !!): Image is equivalent to operating system , Our home computers are windows, But for servers ,linux The performance of the system is better , So we need to choose linux Mirror image , Don't make a mistake !

View server information
After buying , You can view your server information through the following operations :


Set the password
To prevent others from entering the server , We need to set the password for the server :

Here, we have completed the first step of building a website application ! You already have your own server !!
What about? , Follow my steps to see if you feel like you have a hand !
If I give a praise collection, I will be moved to cry !
Next, let's move on to the next step : Install server tools
Part 2: Install server tools
First explain why you need to install server tools ?
We mentioned earlier that you need to choose... To buy a server linux operating system
linux differ windows The point is :
windows It is operated with a visual graphic window , and linux It is completely operated by commands , This is very difficult for ordinary people .

So we need to be able to linux Install tools on the system , Convert the command operation into a graphical windowing operation acceptable to ordinary people , This tool is called : pagoda .
Next, start the detailed operation steps :
Connect linux The server
First , We need to use Xshell Tools to connect to our ECs ,
About Xshell, I can get it by private letter
After installation , We turn on Xshell Software , Create a new connection in the upper left corner of the interface . It can be done by file → make new connection , Or directly click the new connection icon at the bottom of the file .

Then a login setting and information of new connection will pop up :
Fill in your own ECS with the name and host here IP
Other defaults are fine , And then we click “ determine ”

At this time, a newly set connection session will appear in the session manager on the left side of the interface , Right click this session , Click properties , Enter the session properties window .

In the next step, enter the password that matches the user name
User name is :root
The password is the ECS password we just set
Then click Connect

Install the pagoda
Copy the following command :
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Paste the linux The command box ( Right click )
Enter to execute the command , You will soon be prompted to enter Y, Enter after entering , Wait until the installation is complete !

After successful installation, the following contents will appear :

Be careful :
Please copy and save the contents in the red box ( Select and right-click to copy ):
The first line is the login address of the pagoda , In the future, we can operate the server directly through the pagoda .
The last two lines are the user name of logging in to the pagoda 、 password , Be sure to keep it well !
The pagoda has been installed here , We can turn off the connection tool .
Log in to the pagoda
Copy the login address of the pagoda to the top of the browser , Enter the login interface :

Enter the user name you just saved (username)、 password (password) To log in .
Initialization pagoda
First login to the pagoda , The following prompt will appear , Pre installed basic program , We choose the one on the left as recommended LNMP that will do

At this point, our server tools have been installed ! Then you can start deploying your own website application .
Part 3: Building websites
This step provides different solutions for different groups
You can look at it accordingly :
The small white - 1
Colleagues with programming foundation ( Source code attached ) - 2
Don't have the time 、 I'm too lazy to do 、 Have personality needs - 3
1
I am a little white , I don't know programming , What should I do ?
have access to wordpress Make your own website !
wordpress It is a website platform designed for the public
It makes website production no longer the patent of programmers , Any Xiaobai can simply make his own website .
It is the mainstream station building platform at present
download wordpress
Get into wordpress Official website :
https://wordpress.org/download/
Click the button shown in the figure to download :

Log in to the pagoda and add wordpress Site
Enter the steps above Two -2 Preserved pagoda entrance address , Click the following button :

Fill in the pop-up window with relevant information :
The application of domain name will be explained later , Here, let's fill in the of ECS first IP Address , That is the top left corner of the pagoda ip Address
Database selection mysql
Click on the submit

If the submission is successful, the following prompt will appear :

Be careful :
Please save these three items , We'll use that later
Deploy wordpress
We enter the root directory of the site we just created

Delete index.html file

take 1-1 Upload the downloaded installation package to this root directory

Unzip the uploaded installation

After decompressing wordpress All files in the folder are cut to the current root directory , And then delete wordpress Folder



So our wordpress It's deployed !
Next, let's see how to use it !
initialization wordpress
Enter our ECS in the browser IP You can enter wordpress
The initial entry will prompt us to initialize the configuration :
Language choice

Click on : Start now

Configuration database information :
Fill in the first three steps here 3、 ... and :1-2 Information stored in ,
There's nothing left to change , Click on the submit

After submitting, the following prompt will appear , On behalf of the successful submission , Continue clicking Run setup

After entering the corresponding information according to the instructions , Click on the install wordpress

Be careful :
Remember to keep your username and password
Wait a moment , It will prompt that the installation is successful !
Continue to click login

After entering the user name and password just set, you can officially start using wordpress Make your own website !

Use wordpress
After the above steps , We can enter the following link to enter wordpress Design our own website :
Yours ip/wp-admin
Format example :1.16.2.199/wp-admin
This address needs a password to log in , You can only modify your own content , You can call it the management side of the website .

meanwhile ,wordpress Has also helped us create the initial website content , You just need to enter your ECs ip You can see :
Enter your IP
Format example :1.12.6.144
This is our final result , That's you “ Personal website ” The present

If you've seen this 、 And follow my instructions step by step
So congratulations , You have simply completed the construction of your personal website , And you already have your own website !!
It looks like the picture above .
Remember to praise it if it's useful !
2
Brother, I also do programming , How to build a website quickly ?
No need to tap the command script ! One click deployment with tools !
For colleagues with programming foundation , In fact, using the command script can still complete the deployment of the website .
But the advantage of the pagoda is :
The visual operation of the pagoda is more convenient and faster than our own command operation
Pagoda provides installation services of various mainstream tools , A key to install , Save time and effort
Pagoda provides project management tools , Including deployment 、 start-up 、 stop it , It's more efficient than writing command scripts ourselves
Next, I use java Project as an example , Show you how to use pagoda to quickly deploy website services :
Of course, if you don't have your own project , I can offer you , It's not too much for you to like ! Refill !

I can get... By private mail
My service is more considerate than that of your boyfriend and girlfriend. It's not too much for you to like it !!
Install necessary tools
We enter the pagoda panel
( If you forget how to operate, look back at the steps Two )
Enter the software store :
You can see what we often use like nginx、mysql And so on can be installed and free of charge ,
Click Install on the right and wait a moment

After installation, we can check our installed software , Commonly used check the home page display

Switch to the home page , You can see the installed software operation menu
Such as nginx After clicking on, you can directly modify the configuration 、 Restart, etc. , Very convenient

Database operation
Pagoda also supports database management 、 Backup , Click the database on the left :

Click the management button on the right , You can go to the administration page , Support table and data related operations :

Application deployment
After downloading the necessary software 、 After the database is configured , Let's start deploying applications :
Here I use springboot Project as an example
Upload your packaged application to the server through the file management interface of pagoda

Enter the software store again , Search for ”java“, As shown in the figure below ,
The plug-in provides java One click deployment of project 、 management service :

After installation , We can also check it to the home page .
Then let's take a look at how it works :
First , Enter container management , install tomcat

then , If it's ordinary java project , Choose the first ”java project management “ that will do ,
Because I am boot project , So choose the last one "springboot":

Click Add Item , The following pop-up window will appear , You need to enter configuration information :
The project path here is the application package we uploaded ,
Others can be selected according to the prompt

When we click OK , It will generate a startup script based on the information we enter , Start the service :

Here we have successfully deployed our own application
3
I don't have time 、 Get yourself into too much trouble 、 And there are personalized needs , Can you do it for me ?
Certainly. ! Hao said that programming provides you with fully managed custom site building services without your own operation
If you don't have free time to build a website
Or I feel very tired of reading these instructions and don't want to do
Or you have your own personalized needs , Want to design your own website according to your own ideas
So no problem ,” Haoshuo programming “ Provide website hosting customized construction services that do not need your operation completely ,
Just tell me what you think ,( Private letter I can )
Leave the rest to me to help you realize ,
You don't need to read the long talk above 、 You don't even need to read the next sentence
Part 4: Purchase domain name
Through the previous instructions , We have set up our own website , And through IP To visit your own website .
At this time, we need to buy a domain name for the website .
Q:
” domain name “ What is it? ? What does it do ?
Simply speaking , Think about it. When we enter the website, we don't enter IP Well
It's this :
www.baidu.com
www.yuming.cn …
This is called " domain name ".
Compared with only numbers IP,” domain name “ It's more elegant and easy to remember 、 Easy to promote
Just like I told you Baidu , You can spell it right away www.baidu.com, That's what I mean
At the same time, it can also improve the security of our server
The logic is similar to that of purchasing ECs : There are also many domain name manufacturers , We still use Tencent as an example :
Log in to Tencent cloud ( If you forget the operation steps, you can look back at the steps One )
Below ” Hot recommended “ Choose from ” Domain name registration “

Think of a domain name you like , such as ”myhome“, Click the query button on the right :


You can see in the query results , Some suffix domain names are displayed ” Has been registered “, We can't buy this ,
What can be purchased will display the price description , This is something we can buy ,
Click buy now after you have selected it .
Configure the domain name
Sign in ” Tencent cloud “, Click on “ Console ”

In the upper left corner “ Cloud products ” in , choice “DNS analysis ”

Under normal circumstances , Because you have purchased the domain name , So after entering, there will be a domain name record by default :
If not , Click Add domain name , Just add it manually
We click “ analysis ”, Resolve the domain name to our ECs IP Next

Click on “ Add records ”

Fill in information :
Host records can be filled in :www
The latter two items can be used by default
Record the value and fill in your ECs IP
And then click “ preservation ” that will do

thus , Our domain name is configured !
It's only the last step away from building a good website !!!
Part 5: Keep on record
It's like a car needs a license plate to get on the road 、 A hotel needs a business license to open
The same goes for websites , Only “ Keep on record ” Before it can be publicly accessed on the Internet ,
When you browse the home page of the website , When you turn to the bottom, you will see such words , This means that the website has been filed :
You can try to enter your domain name at the top of the browser , After entering, the following page will appear , Prompt you to file :

You need to click on the blue text “ Filing console ” Conduct filing operation
Because I have filed here , Unable to simulate the first filing operation ,
So let me quote Tencent cloud's official operating instructions for the first filing :
Original address :
Basic information verification
Sign in Tencent cloud website filing console , Get into “ My record ” Manage Pages .
Click experience now , see Filing preparation Information , And click learned , next step , Get into “ Basic information verification ” page .
As shown in the figure below :

The nature of the organizer can choose an individual
Cloud resources choose their own cloud servers
Click on ” Verify now “, Go to the next step ” Authenticity verification “
Authenticity verification
Open wechat with your mobile phone and click Scan , Scan the QR code provided by the page . As shown in the figure below :

After scanning, you can jump to the applet “ Tencent cloud video verification ”, And upload relevant information as required . As shown in the figure below :

After submitting the information as prompted above , Click on ” Submit “, Go to the next step ” Fill in the subject information “
Subject information
stay “ Subject information ” modular , Fill in relevant information :
Field name | Fill in instructions |
regional | The selection of regional information is consistent with the actual communication address . |
The nature of the sponsor | Please select the appropriate sponsor nature . |
Name of the Organizer | Please enter the name of the organizer , It must be consistent with the name on the unit certificate and the real name authentication name of the account number . |
Document type | Please select the corresponding certificate type of the Organizer . |
The business license | Click to upload the corresponding sponsor Certificate , For example, business license, etc . |
ID number | After uploading the business license , The system will automatically identify and fill in the certificate number , Please fill in other certificate types by yourself . |
ID address | Please enter the address on the unit certificate . |
Legal representative | Please enter the name of the legal representative . |
Certificate number of legal representative | Please enter the ID number of the legal representative . |
mailing address | Please enter the mailing address , Accurate to house number or room number . |
remarks | Relevant subject remarks can be added . |

stay “ Principal ” modular , Fill in relevant information , Just fill in your own :

After filling it out , Let's click next , Enter fill “ Website information ” step .
Website information
stay “ Website information ” modular , Just fill in your own according to the description :
The service content of the website shall be selected according to the content of the website

stay “ Website owner ” modular , Upload relevant materials and fill in your own information :

stay “ Website supplementary materials ” modular , Upload the material :

How to obtain the domain name certificate
In the console , choice ” Cloud products “ Medium ” Domain name registration “

Click your domain name to enter the domain name information page :


Click on ” Download the certificate “ Can get .
Website legal person power of Attorney : Our personal words don't need to be uploaded
Screenshot of domain name real name authentication : Also in the domain name information page , The screenshot needs to include the domain name 、 Domain name owner 、 Owner certificate type 、 Owner's certificate number 、 Domain name expiration time .
Click to save the current web site , You can complete the filling of website information .
Filing
stay “ Record order ” In the preview information page , Please check your filing information carefully
After confirmation , Read and tick agree , And read 《 Information security management protocol 》 and 《 Assist in changing the online service terms of filing information service 》, And click submit for review . As shown in the figure below :

Here, the information submission process of our filing is over , The next step is to wait for the audit results ,
Be careful , The audit process will be divided into three steps :
Tencent preliminary trial ( In about a day or two, the staff will call you to confirm the information )
SMS verification of the Ministry of industry and information technology ( According to the latest requirements of the Ministry of industry and information technology , since 2020 year 8 month 17 The date of , When applying for filing, all provinces and cities need to pass Filing management system of the Ministry of industry and information technology Check SMS )
Reviewed by the authority ( About two weeks , Tencent cloud will send an email to inform the audit results )
Public Security Filing
You will receive this email after the approval of the authority :
Will remind us 30 File with the public security organ within days
Of course, we just need to go National Internet public management platform Just put it on record
Address :http://www.beian.gov.cn/

Because I have filed here , So the following description quotes the official description of Tencent cloud :
The original address :
cloud.tencent.com/document/product/243/19142
After entering the official website , Click on ” Online filing and login “

For the first time, you can register according to the prompt

Fill in the main information of the sponsor
After initial login , The following prompt will pop up , Let's fill in the information of the founder :

stay “ The main body of the website ” page , According to the actual demand , Choose the nature of the starting entity :
” The nature of the main body of the establishment ” Choose as “ personal ”: Fill in “ Sponsor information ”, single click Submit audit
“ The nature of the main body of the establishment ” Choose as “ Company ”: Choose the nature of the Organizer , Fill in “ Organizer information ” and “ Person in charge information ”, And click submit for review
Next, we begin to fill in the information of the new website
In the left navigation bar , single click New website application , Get into “ New website application ” page . As shown in the figure below :

Information filling instructions :
After filling in the information , Click on the submit , Then wait for the audit results .
( The audit time is usually about two weeks )
We can go ” System notification “ View the audit results in :

So far , We all started from 0 The beginning of the website construction process is over !
I spent two days on this article
The whole article 7000 word ,102 Zhang Ting , Fine to every click 、 Each input description !
If it really helps you, give it a like collection , Or share it with those who need it !
See you next time
边栏推荐
- Direct insert sort and shell sort
- Introduction to China patent award policy support, with a subsidy of 1million yuan
- Docking of express bird system
- 北京昌平区高新技术企业培育支持标准,补贴10万
- Beijing Pinggu District high tech enterprise cultivation support standard, with a subsidy of 100000 yuan
- Introduction and creation of Huffman tree
- I was so excited about the college entrance examination in 2022
- 限流与下载接口请求数控制
- 腾讯云数据库TDSQL-大咖论道 | 基础软件的过去、现在、未来
- Introduction to the policy support of Shenzhen China Patent Award, with a subsidy of 1million yuan
猜你喜欢

Project_ Visual analysis of epidemic data based on Web Crawler

2.1、ROS+PX4仿真---定点飞行控制

Yanrong looks at how to realize the optimal storage solution of data Lake in a hybrid cloud environment

Basic introduction of graph and depth first traversal and breadth first traversal

SAS判别分析(Bayes准则和proc discrim过程)

nodejs中使用mySql数据库

2.2、ROS+PX4仿真多点巡航飞行----正方形

Web3生态去中心化金融平台——Sealem Finance

Middleware_ Redis_ 06_ Redis transactions

Yunna provincial administrative unit fixed assets management system
随机推荐
库存管理与策略模式
Clean up the broken artifacts data (.lastUpdated files) and reload the project. Problem resolution
Introduction to the application process of China Patent Award, with a subsidy of 1million yuan
Basic introduction of graph and depth first traversal and breadth first traversal
中国专利奖申报流程介绍,补贴100万
SAS cluster analysis (system cluster, dynamic cluster fastclus, variable cluster varclus)
北京通州区高新技术企业培育支持标准,补贴10万
Understanding of multithreading
北京门头沟区高新技术企业培育支持标准,补贴10万
IRS应用发布之十六:H5 应用设计指南
Pd虚拟机安装系统提示 “网络初始化失败 操作失败 ”的解决方案
HandlerMethodArgumentResolver(参数解析器)的作用+使用小案例
负数+0+正数
Introduction to support standards for specialized, special and new manufacturing enterprises in Chaoyang District, Beijing, with a subsidy of 1million yuan
[ROS introduction] cmakelist Txt and packages XML interpretation
2022北京怀柔区新技术新产品(服务)认定要求
87. (leaflet house) leaflet military plotting - straight arrow modification
Implementing MySQL fuzzy search with node and express
[path planning] week 1: Path Planning open source code summary (ROS) version
2.1、ROS+PX4仿真---定点飞行控制