Title:

A free Basic UNIX-training with muLinux

Home
deutsch
  
ISBN: 3937514872   ISBN: 3937514872   ISBN: 3937514872   ISBN: 3937514872 
 
  Wir empfehlen:       
 
[Back] [Home] [Forward]       http://rowa.giso.de  

A free Basic UNIX-training with muLinux

Notes: This Text is roughly translated (German to English) by a translating program. Sorry, but I have not time for the translation. Maybe you can do this.

Making a Simple Website

In this section we will create a small Website. This does not have to do directly something with Unix. We train thereby however its handling. We write the necessary HTML instruction by hand with the text editor vi and test on another console with the WWW Browser the result. This is very spartanisch. The produced HTML code is however more optimized than with many HTML wordprocessors. And is representable on all WWW Browsern.

We log in for it on the first console. Around our Website permanently to store to be able our work diskette should after / a gemountet its. We mounten therefore our work diskette and produce on the diskette a directory " mywebsite ".

/# mount /dev/fd0 /a
/# mkdir /a/mywebsite

On the second console we start quark.

[Alt] [F2]

/# quark http://localhost

 [r]eload [g]o [b]ack [v]iew [u]rls [s]ave [d]ownload [P]rint [q]uit    [h]elp 

                    Welcome to PYGMY (pygmean) WWW server!
 ----------------------------------------------------------------------------

 This is a placeholder page installed by the muLinux setup scripts,
 because no home page was installed on this host. You may want to replace
 this as soon as possible with your own web pages, of course....

 PYGMY is a small HTTP server, implemented with a shell script
 (2174 bytes) and netcat port scanner. PYGMY run via /etc/inittab
 and support: images, download and directory browsing. Remember: images
 are fetched one by one, pressing RELOAD button in your browser.
 Ehmm: the image is on the X11 addon ... :(

 http://localhost                                                   Quark v.xx
 cursor up/down, pag up/down to move                       vxx, hyperlink mode

Now the address shows http://localhost here on the directory /home/httpd. We change in the first console into this directory.

[Alt] [F1]

/# cd /home/httpd
/home/httpd# _

Since we our Website on our work diskette in the directory "mywebsite" to store want, we produce one let us link there. Subsequently, we change into the directory " mws ".

/home/httpd# ln -s /a/mywebsite mws
/home/httpd# cd mws
/a/mywebsite/mws# _

In the second console we give in quark the new URL:

[Alt] [F2]

[g]

URL:http://localhost/mws

 [r]eload [g]o [b]ack [v]iew [u]rls [s]ave [d]ownload [P]rint [q]uit    [h]elp 

                             Index of /home/httpd/mws
 ----------------------------------------------------------------------------

 [1] < Parent directory >
 ----------------------------------------------------------------------------


 powered by PYGMY - muLinux rusric WWW server, on 'muLinux '





 http://localhost/mws                                                   Quark v.xx

Since this directory is still empty, our Web server PYGMY serves only the directory opinion to us. We create now as the first the file index HTML . This file supplies the Web server if only the directory was requested. In the first console we start our favourite wordprocessor on muLinux the diskette:

[Alt] [F2]

/a/mywebsite mws# vi index.html

HTML instruction (tags) are included in pointed parentheses. Large and lower case are all the same. Falsely written or unknown tags are ignored. Many tags are pairs from opening and closing instruction, in order to define areas. Closing instruction have after the opening pointed bracket a Slash. The entire HTML file becomes with <HTML> ... </HTML> enclosed.

In vi we change also into the insert mode and the tags type.

[i]

<html>


</html>

Now we store also [ Esc ] , Colon and w . Afterwards we change to the second console.

[Alt] [F2]

In quark we reloaden also r the view.

[r]

We see now no longer very much. Now we have to be between the HTML tags to also nothing. Only with the instruction [ v]iew (view, English for see) one can look at oneself the source code.

[v] With q one can leave the Viewer again.

Back to the first console and to our dear vi .

We will now constantly change the consoles, store the HTML code modify, and the opinion in quark refurbish. I in addition will not any longer repeat the steps.

Essential structure of a HTML file

A HTML document is divided into two areas. The heading and the body.

That <body> ... </body> Part is the actual carrier of the information. Here all information is accommodated, which is to be published in the Internet. We type therefore the following into that vi on: "Hello World" is between the body tags. The arrangement of the source text is normally all the same. One can write thus the source text as clearly as possible. Line page make-ups ignore the normal Browser. quark here however an exception makes.

<html>
<head>

</head>

<body>

Hello World

</body>
</html>

We store and look ourselves in quark after the reloading of the display our " hello world " on.

In the header are those <title> ... </title> tags. Between these tags the title of the document is described. The title is normally displayed in the header of the Browsers. quark deviates here. The title day is very important for the search machines in the Internet. Consider the different way of writing of title and ti tl e.

<html>
<head>
 <title> My First HTML Document </title>
</head>

<body>

Hello World

</body>
</html>

In the heading ( <head> ... </head>) still further information can be accommodated. In addition know keywords, the language of the document, to which names of the author or an effective date belong. Particularly the entry of the keywords can be important, since there are search machines, which analyse only the information in the heading.

All following tags must be to tags < between > body -.

Paragraph formatting

< p > ... < / p > enclose a paragraph.

< br > a new line forces.

Unfortunately the minimumistic WWW Browser yields quark also here off.

<html>
<head>
 <title> My First HTML Document </title>
</head>

<body>

Hello World


<p> this is a paragraph.</p>

Thus <br> a line-makeup is caused.

</body>
</html>

Ueberschiften

Headings are differentiated with respect to 6 priorities.

<h1> Highest priority </h1>
...
<h6> Lowest priority </h6>

 

Character formatting

Character formatting know e.g. <b>bold</b> or <i>italic</i> its. Unfortunately can quark also correctly do not represent this.

Umlauts and special characters

The German umlauts and ss should be coded in HTML accordingly:

 
Ae    & Auml;
ae    & auml;
Oe    & Ouml;
oe    & ouml;
Ue    & Uuml;
ue    & uuml;
ß    & szlig;

Unfortunately has also quark here problems.

Links

Link as follows one produces:

<a href="address">Text with link</a>

If we e.g. one link for the start page PYGMY PYGMY-Servers to insert want, we must a directory more highly to the file index.htmlrefer:

<a href=".../index.html">Start page our PYGMY-Servers</a >

Who wants to be occupied more with HTML, should these link follow:

http://www.netzwelt.com/selfhtml

Naturally one can also these links to the own Website to take up:

<a href="http://www.netzwelt.com/selfhtml">http://www.netzwelt.com/selfhtml</a>

written in the vi editor

Exercise

Produce in the directory /a/mywebsite a second HTML file with the name test.html. Use for it the third console. Left then the HTML files index.html and test.html among themselves, so that one can arrive from a file at in each case different the file with the help of a on the left of.

Around this exercise to terminate we lift those mount - allocation of our work diskette up.
/ a # CD /
/ # umount / a
/ # _

[Back] [Home] [Forward]      

Robert.Warnke@giso.de (copyleft) Robert Warnke, Berlin (Germany) - You can write me in English. | http://rowa.giso.de
  
Ubuntu & Kubuntu Linux 9.04 "Jaunty Jackalope". Doppel-DVD mit Ubuntu und Kubuntu 9.04 als Live- und Vollversionen, inkl. Einsteiger-Handbuch
von Open Source Press
Siehe auch:
Ubuntu 9.04 Jaunty Jackalope: Das Einsteigerbuch
Ubuntu GNU / Linux: Das umfassende Handbuch, a...
Linux lernen mit Ubuntu
Ubuntu & Kubuntu Linux 9.10 "Karmic Koala" (Doppel-DVD inkl. Han...
Ubuntu 9.10 Karmic Koala: Das Einsteigerbuch
Einstieg in Linux: Eine distributionsunabhän...
 
   
 
     

Back to the topic site:
StudyPaper.com/Startseite/Computer/Informatik

External Links to this site are permitted without prior consent.
   
  Home  |  deutsch  |  Set bookmark  |  Send a friend a link  |  Copyright ©  |  Impressum