Linux experiment to build personal website

Keywords: Linux

About building personal web pages, the current resources are all about having root permission, so write an experiment for ordinary users and practice.

1, Download PUTTY, PUFTP

putty is used to connect the teacher's remote server (some servers must log in and connect normally on the campus network).
puftp is used to transfer files from windows to linux virtual machine.
Hang a link and download it yourself:
putty official website

2, Create public in personal directory_ html

Personal directory is the directory where you connect to the server, enter your user name and password, and then enter directly. Normally, you ls check that the directory is empty.
As shown in the figure (your user name is pasted):

I've created public here_ HTML, so there is a directory.
Never enter the home directory of this server in an attempt to create a directory. You don't have administrator privileges.
The consequences are shown in the figure:

So honestly go back to your directory mkdir.

Note: public must be created here_ HTML directory! Public must be created here_ HTML file! Public must be created here_ HTML file!

The name here is specified. Only such a name can be used by the system as a personal home page

Finished building public_html can go to the website to see what the default website looks like.

View the personal homepage directly from the server ip address / ~ user name (e.g. 172.27.85.122/~stu1000)
You can see that there is no fart. It is a default home page.

3, Upload the personal homepage to public with puftp_ HTML directory

You need to change a permission in linux before uploading.
chmod 755 -R /home/stu****
(when the network is disconnected, the code will not be released)
Open puftp, connect the server with the open user name @ server ip address, and enter the password to build the upload channel.
As shown in the figure:
Then use the put method to upload the index.html of the personal home page written in windos and its dependent files (if any) to linux.
I personally passed an index.html and a picture.
The put statement is the put windows file path and linux file path (you need to write out the file name here, which is equivalent to creating it directly)

The upload speed is fast. Family members, check the real-time response directly in your putty.
As shown in the figure:

At this time, open your home page with a browser:
As shown in the figure:

The portrait here hasn't been uploaded yet: so the left is blank, and then there is a Chinese garbled code problem on the right. You need to adjust the coding format of the browser yourself.
For Firefox, right-click the menu bar - View - repair the coding format
As shown in the figure:

My home page is relatively plain. The main reason is that I don't dare to put it away because I'm afraid of social death.
In case of emergency, I'll hang up a code. Recommend yourself to use python to climb a cool personal home page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RNHPC WEB SITE</title>
<link href="rnhpc.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-size: 24px}
.style2 {font-size: 16px}
.style3 {color: #0000cc}
.style4 {font-size: 12px}
.style8{ color:#2521C9; font-size:18px; font-family:Verdana, Geneva, sans-serif;text-decoration:none; list-style:none;}
.STYLE9 {font-weight: bold}
.STYLE10 {font-weight: bold}
.STYLE11 {font-size: 14px}
.STYLE12 {font-size: 14}
-->
</style>
</head>
<body topmargin="0" bgcolor="b0b0b0">
<table border="0" align="center" cellpadding="0" cellspacing="2" width="850" bgcolor="f7f7f7" class="style4">
  <tr>
    <td colspan="3"><div align="center">
        <hr>
      </div></td>
  </tr>
  <tr>
    <td width="20%"><img src="xiaoxiang.jpg" border="0" width="220" height="240"></td>
    <td width="2%" bordercolor="#0000FF"><p align="left" class="style1 style13">&nbsp;</p></td>
    <td width="78%"><p class="style10 style1" style="color:#2521C9;"><strong>****</strong>**** </p>
      <p class="style10 style2">undergraduate </p>
      <p class="style10 style2">School of information science and technology, Dalian Maritime University</p>
    <p class="style10 style2">Email:<a href="mailto:1370119316@qq.com">*********</a></p>
    <p class="style10 style2">Mobile:*********</p>
    <p class="style10 style2">QQ: ******** </p></td>
  </tr>
 
</table>
</body>
</html>

Posted by therealairness on Fri, 15 Oct 2021 10:20:50 -0700