Está en la página 1de 21

Linux Lesson Number 5

Brought to you by the Linux Awareness Project

www.randomkeystrokes.com/lap

1
C ONTENTS
➀ A New Linux Fact

➁ A Quiz to Revise our Commands

➂ Introduction to Networking
 Contacting another Computer
 Web Servers and Web Clients

➃ Introduction to Web Pages


 What do we Need ?
 Writing our First Web Page
 Introduction to HTML

C ONTENTS 2
A N EW L INUX FACT
 There are lots of Desktop Environments

 Two very popular ones are :

– KDE : The one you use in Knoppix

KDE Programs usually start with the letter K


For example: Konqueror, Konsole, KWrite, KAsteroids

– GNOME : Another type of Desktop

GNOME Programs usually start with the letter


G
For example: GEdit, Galeon, GMaze

A N EW L INUX FACT 3
A Q UIZ TO R EVISE OUR C OMMANDS

 Log onto the Chat Server


– I will give you the IP Address
– Don’t forget to set your name
– Put away your Notes and Yellow Summary Sheets
please
– You can use the Man pages if you need to
– The first person who correctly answers the most
questions will Win a Prize!

A Q UIZ TO R EVISE OUR C OMMANDS 4


I NTRODUCTION TO N ETWORKING

 Computer Networks:
– Allows Lots of Computers to Talk to each other
– For example:
When you were using the Chat Service. Without
the network you would not be able to talk to each
other.
– Take a Look at the back of your Computer, can you
see the Network Connection ?

I NTRODUCTION TO N ETWORKING 5
I NTRODUCTION TO N ETWORKING
 Contacting Another Computer
– If you are connecting the the Chat Server. How
does your computer know how to connect to the
Chat Server ?

– Well, just like humans, computers have names too.

– These are called IP Addresses.

– No two computers have the same IP Addresses

– What would happen if they did ?

I NTRODUCTION TO N ETWORKING 6
I NTRODUCTION TO N ETWORKING
 Web Servers and Web Clients
– What do we need to put a web page on
the internet ?
– Well, we need one place to store the web page.
This is called the Web Server
– And, we need a program to view the web page
from any computer in the world. This is called the
Web Client.
– An example of a web client is any web browser
– What web browsers do you know ?
– There is, Microsoft Explorer, Mozilla, Konqueror,
Opera, and lots lots more.

I NTRODUCTION TO N ETWORKING 7
I NTRODUCTION TO N ETWORKING
 Web Servers and Web Clients
– Lets see what happens when you ask the server for
a Web Page.

I NTRODUCTION TO N ETWORKING 8
I NTRODUCTION TO N ETWORKING
 Web Servers and Web Clients
– Have a Look at the Diagram.
– There are Four Boxes. Each Box is a Computer.
– A Computer can be either a Client or a Server.
– How many Clients are there ?
– How many Servers ?
– Did you notice that each Computer has
an IP Address ?
– What is the IP Address of the Server ?

I NTRODUCTION TO N ETWORKING 9
I NTRODUCTION TO N ETWORKING
 Web Servers and Web Clients
– Take a Look at Client 2 and the Server in
the Diagram.

– What is happening ?

– Client 2 is asking the Server for a web page

– The Server then goes and looks up the page and


sends it to Client 2

– Lets see what this would look like as human


conversation

I NTRODUCTION TO N ETWORKING 10
I NTRODUCTION TO N ETWORKING
 Web Servers and Web Clients
– Client 2: Hello 193.95.149.238
– Server: Hello 169.55.32.1
– Client 2: May I see the web page on linux tutorial
four please ?
– Server: Yes, just let me look it up for you. Here is your
requested web page.
– Client 2: Got It. GoodBye
– Server: GoodBye

I NTRODUCTION TO N ETWORKING 11
I NTRODUCTION TO N ETWORKING
 Web Servers and Web Clients
– In the Conversation (Write in your answers):

Who Started the Conversation ?

Who knew the name of the Server ?

What was the IP Address of the Client ?

Who needed the Information ?

Who had the Information ?

I NTRODUCTION TO N ETWORKING 12
I NTRODUCTION TO W EB PAGES
 What do we Need to write a Web Page ?
– A Text Editor (eg. KWrite)

– HTML (HyperText Markup Language)


This is the language that Web Pages are written in.
It is very very easy!

– A Web Browser to view our page (eg. Konqueror)

I NTRODUCTION TO W EB PAGES 13
I NTRODUCTION TO W EB PAGES
 Writing Our First Web Page
– Use the Command Line to do the following:

– Make a Directory in your Home Directory called


public_html

– Change into this Directory and use a text editor to


create a file called index.html.
You can type in kwrite index.html

I NTRODUCTION TO W EB PAGES 14
I NTRODUCTION TO W EB PAGES
 Writing Our First Web Page
– Type the following into your text editor and save it.
Fill in your own details where you see ...

<html>
<body>
Hi my name is .... I am in ... year in ... School. I
know a lot about Linux. The flavour of Linux I use is
Knoppix. I know how to use all of the following Linux
commands: ... . But the most important command
is the man command, because it tells you how to
use all the commands.
</body>
</html>

I NTRODUCTION TO W EB PAGES 15
I NTRODUCTION TO W EB PAGES
 Writing Our First Web Page
– Take a look at your web page in Konqueror

– HTML is a language for writing web pages


– It has tags. All HTML tags have < and > brackets
– What tags have you used ?
– Every HTML page must begin with <html>
and end in </html>
– Do you see the difference between the start
and end tags ?
– Your text goes in between the <body>
and the </body> tags.

I NTRODUCTION TO W EB PAGES 16
I NTRODUCTION TO W EB PAGES
 Writing Our First Web Page
– Add some more text into your Web Page
– Save the Changes
– You can use the Refresh Button in Konqueror to see
the Changes.

I NTRODUCTION TO W EB PAGES 17
I NTRODUCTION TO W EB PAGES
 Writing Our First Web Page
– Lets Add a Bit of Colour
– To change your background colour you can add an
attribute to the <body> tag.
– The attribute is called bgcolor. This is short for Back-
Ground Color.
– Try changing your <body> tag to look like this:
<body bgcolor=red>
– Save and refresh
– Try out different colours

I NTRODUCTION TO W EB PAGES 18
I NTRODUCTION TO W EB PAGES
 Writing Our First Web Page
– If you want to put a heading on your page you can
use the <h1> tag. The h stands for heading size 1.
– Whatever text is within the start <h1> tag and the
end </h1> tag will be bigger.
– Try putting this before your first sentence in the body
section:
(Remember all your text must be within the body
tags)

<h1>My Web Page</h1>

I NTRODUCTION TO W EB PAGES 19
N EXT W EEK
 How to make Bold and Italic and underlined text

 How to add your own pictures

 How to change the colours of your text

 How to create links to other pages

 We can upload your finished web pages to the Web


Server, so think of what you would like to put into your
web page for next week!

 Lots more!

N EXT W EEK 20
P LEASE A SK US Q UESTIONS

This coming week, you can practice what you learnt today.

You can use your CD to practice on your home computer or


at school. If still have questions about what you learnt today
after practising during the week, please ask us at next weeks
lesson. We like getting questions :-)

P LEASE A SK US Q UESTIONS 21

También podría gustarte