Sie sind auf Seite 1von 8

ISCG 6403 Network Operating Systems

Management
Week 1
Department of Computing

Prepared by: Dr. Bashar Barmada


Revised by: Sachin Sen

Introduction
ISCG 6403 Network Operating Systems Management (NOSM) introduces students to how to
setup, manage and maintain basic client/server networks using Linux Operating Systems.
The course includes services such as, HTTP, SSH, FTP, NFS, DHCP, DNS and Email. This course
also includes some simple system automation using shell scripting.
Why Linux?
Open Source operating system - Stable - Robust - Support ...
In this course, we shall use Fedora 12 as the Linux environment for its simplicity and
emphasis will be given in configuration and testing network services rather than the
operating system version.

Course Description
The course is 100% practical - No theory exam
The assessment is divided into:
45% Practical Tests: there will be 4 practical tests distributed over the semester,
some of them are open book, other are closed book.
15% Assignment: this is a group assignment (2-3 students) and it will be toward the
end of the course. All network services that we are going to study during the
semester under Fedora 12 will be implemented under Debian 8 (the latest version of
Debian). Students will notice that only minor differences between the two
implementations.
40% Final Practical Exam: which is an open book, but E-books, tablet PCs etc. are
NOT allowed. Only printed materials are allowed. For that Students are highly
advised to take their own notes during lectures.
To pass the course, students need to score at least 40% of the final exam, and at least 50%
overall.
To pass with confidence:
- Attend every lecture
- Practice during the free time of the lab.

- Make mistakes and learn from them.


- Help each other
- Take notes
The final exam is for 2 hours during which students are asked to rebuild the Linux
environment with essential network services (HTTP, DHCP, NFS, DNS, etc). If a student is
well prepared (practice, notes, ....) they can finish early.

Requirements
1- Two good quality 8G USBs: to install Fedora Live on one USB drive and the other one
to install the full version of Fedora
2- Fedora 12 IOS image: available in Labs 183 - 2003 / 2001 on every machine. The path
is D:\Documents and Settings\User\Desktop\Live Fedora 12
3- Although the lab provides network cables, but it is recommended that students bring
their own network cables (Cat5e or Cat6), so no one else will be using their cables to
ensure a proper connectivity to the network. Besides, students can use their cables
with other network courses as well.
4- Digital / non-digital method to take notes. Although it is highly recommended to use
the non-digital method, as digital methods are not allowed in the final exam.
5- For the assignment: For Debian 8 to work properly you need good quality 16G USB

Resource
1234-

Moodle pages: many extra materials are available there


EBook on Moodle written by K. Ganeshen, covers basic materials
The Internet, as Linux is an open source OS
Many other books

Servers
In order to install packages and applications, students need remote network access to the
LAB server. The server is available on 24/7 and connected to Unitec network that can be
accessed from the Workshop LAB 183-2005. The IP address of the server is 192.168.185.12

Workshop LAB 183-2005


The lab is equipped with 28 PCs organized in 7 kiosks, each kiosk contains 4 PCs. The PCs do
not have internal HDD and each of those are built with 1 wireless and 2 wired LAN cards.
The two wired network cards of each PC are connected to wall sockets which are connected
to the Lab Patch panel. The socket numbers are labeled for each PC and you can find it on
wall next to the kiosk. It is essential that students don't disconnect or change any of these
cables.

The Patch panel


Each PC will have its two network sockets labeled clearly on the patch panel. To be able to
connect a PC to the server in order to download packages, the PC should be connected to
the "Lab Switch" and the "L1" port (the uplink port) should also connected to the "Lab
Switch". L1 is the port to connect the Lab to the outside world and servers, including the
Internet.
The lab is also equipped with VLANs switch which will be used later on when services are
installed and configured on the system. To test the functionality of these services students
can use one of these VLANs so they do not create any conflict with other systems and
services.
Each VLAN in the switch consists of 6 ports: 3 in each row. Start counting ports by 3 from
left or right and take both lines to know any VLAN.

Revision of Basic Linux Commands


To use Linux commands you need to open a "Terminal", which will come later.
Students are asked to fill the empty spaces in the description fields these command
themselves. Try to use "man" with any of these commands to see the full description
Table 1.1
The Command
cd
cd..
cd / cd ~
ls
ls -a ls -l
ls -al
clear

Description
Change directory
Lists the contents of the current working directory
ls -a-l
To clear the screen

pwd

Prints working directory

man
man ls

The manual for any command. Provide a detailed


description ( the help) for that command
Use" q" to quit
Displays details of the logged in user

man cd

whami
rm
rm filename
rm -r directoryname
rm -rf /

remove file/files

su

To work as a superuser. As students are required to


install and configure services under Linux, they need
to have the right permission to do so; they need to
be a superuser

The most dangerous command in Linux. DONOT try


that unless you backup all your files and planning to
reinstall the operating system
Describe what this command does:

mv
echo
yum
vi
nano
pico
exit

Visual Text editor

halt -p
shutdown
shutdown now
reboot

shutdown -P now

history
top
ps
mkdir directoryname
mkdir -p /dir1/dir2/dir3/dir4
ifconfig
I (pipe)
> (redirection)
cat
cat filename
cat > file1.txt

Type to a file, overwrite to old contents.


Ctrl+d to quit

cat >> file1.txt


cat file1.txt > file2.txt
cat file1.txt | more
cat file1.txt | less
chmod
useradd
usermod
passwd
userdel
groupadd
groupdel

Note: Linux is a case sensitive operating system when it comes to naming files and using
commands

What is "root" in linux


1- root is the superuser who has a full permission over the system
2- the top level in the file system is called root: /
1- there is a directory under the top level called root: /root . By default only the
superuser (root) can access this directory
Absolute path vs relative path
A path describes how to reach to a particular file or directory in the file system.
An Absolute path describes the path staring from the root (the top level). Examples:
cat /etc/named.conf
cd /var/www/html
cd /home/paul
A relative path describes how to reach a file or directory from any other place, but not from
the root. Example
cd test
change directory to "test" from the current place
cat ~/file1.txt view the content of "file1.txt" which exists in the home directory of the user
cd ../paul
change directory to "paul" which exists in one level up of the current place

Demonstrate the installation of Fedora operating system


What is Fedora Live?
The live operating system allow you to boot the PC with Linux OS first with the basic
functionalities without installing the OS on the hard drive. Usually the live OS is stored on a
CD / DVD or USB (in our case it is USB)
Any new configuration under Live OS will be lost once the operating system is rebooted. For
that after booting from the Live USB we need to install the full version of Fedora onto HDD
or USB. As you machines in Lab 2005 are not equipped with HDD so it has to be on USB.
Warning: Cautious has to be taken if a student is trying to install the full Febora OS on the
second USB (USB2) from the Live USB (USB1) using their own PC, as this PC will definitely be
equipped with at least one internal HDD. Choosing the wrong drive might end up installing
Fedora on the internal HDD and loss everything on that drive.
To install Full Febora on USB2
Boot the PC using the Live Fedora (USB1)
Choose "Install on HDD" on the desktop
Set the domain name to something suitable. for example "nosm.ac.nz"
Set the right time zone.
Set an appropriate password for the root
choose USB2 as a drive to install. Most likely USB2 will be named "sdb", as "sda"
should be for USB1 (the Live USB)
Choose "use the entire drive for installation"

Start installing

When complete, we don't need USB1 any more, shut down and start again using USB2.
Note: always shut Fedora in the correct way to avoid any corruption to the operating
system. Don't force it to shut down.
For the first time of booting from the full version of Fedora, the OS will asking to create a
username. After that you can use this username to logon to the system.
The "Terminal"
A Terminal is a command prompt window where we can type the Linux commands. All Linux
services can be installed and configured using commands on Terminal. No need for the GUI
environment.
Open a Terminal:
Files --> Applications --> Terminal
Try some basic commands from Table 1.1
Text Editor vi:
vi is one of the text editors available by default under Linux. To create a file using vi under
the home directory:
vi ~/file1.txt
press i (insert) to start typing
once finish, to end the typing session and return to the command line, use Esc then : (colon)
To Save: w
To quit: q
To save and quit: wq OR x
To force to quit without saving: q!
To view the line numbers: set number OR se nu
Note: If the file already exists, the vi will open the file for editing.

Setup a web server


By default, the original installation of Fedora includes HTTP and SSH services. Other services,
such as DNS, DHCP, etc, need to be installed first (try: service named start)
for a machine to acts as a web server (and listens to port 80)
1) set a static IP address for the machine:
ifconfig eth0 192.168.7.gm
(replace gm with your group number and PC number
inside its group, respectively. for example for group 4,
PC1, the IP address will be 192.168.7.41)

eth0 is the name of the network interface, which varies from a machine to another. To
check the name of the network interface type: ifconfig
2) start HTTP service:
service httpd start
the letter d in httpd refers to the word Daemon, which is a small program runs in the
background and listens to a specific port.
others option for command service:
service httpd restart
service httpd stop
service httpd status
3) open the browser and put the IP address of the server (192.168.7.gm)
the default Fedora page will appear in the browser.
4) to set your own web page, create index.html inside /var/www/html
Example for index.html
<html>
<body>
This is PC1 of group 4
</body>
</html>
Then this statement appears in the browser.

Setup a remote connection to a machine


The service to use is SSH, which is installed by default
1) set a static IP address
ifconfig eth0 192.168.7.gm
2) start SSH service
service sshd start
3) from another machine (which is on the same network of the first one) access the first
machine remotely:
ssh
username@192.168.7.gm
where 192.168.7.gm is the IP of the first machine (the server)
For example to access the server as a root:
ssh
root@192.168.7.gm
Note: Another way to get an IP address, is to connect the PC to the Lab switch, and connect
the uplink (L1) to the lab switch. The PC will get an dynamic IP address from the DHCP server
of Unitec.

Das könnte Ihnen auch gefallen