M01:
Introduction to Operating Systems
|
TU1: Installing, configuring and exploiting
a computer system
|
ASIX1
|
Practical Exercise 10: Managing services
|
16-2-12
|
Practical Exercise 10:
Managing services
GENERAL CONDITIONS
1-
Deadline: 23-02-2012.
2-
Send your report as a PDF file
attached to an e-mail with the
following specifications:
a) E-mail
address:
cf(at)collados.org or jordi.binefa(at)fje.edu
depending who is your teacher
b)
File Name: asixdawA_surname_name_m01tu01pr10.pdf
c) Subject: asixdawA_surname_name_m01tu01pr10.pdf
3- Make this report individually.
4-
Left, right, top and bottom margins: 2cm.
5-
Character format: a) Font:Times New Roman (or Liberation Serif), b)
Size: 10, c) Questions typeface: Bold, d) Answers typeface: Regular
6-
Page numbering on footer bar
1- What is a server program?
A
server
is a computer program running in a computer that provides services to
other computer programs (the clients) running in the same
computer or in other computers connected through the network.
Usually, a server is a
program that awaits a request from a client programs in the same or
other computers. When a request is received from a client, the server
program will fulfill the task requested by the client.
The most of the times a server is a daemon, therefore it is a process running continuosly that has been
initialized at system startup
and then wait in the background until their service is required.
Typical servers are:
- Apache: It is a Web
server. A client (firefox, chrome,....) can gain access to a web pages
stored in the computer where Apache is running
- Mysql: It is Database server. A client can gain access to a database stored in the computer where MySQL is running.
- Postfix: It is a Mail server. A client can send e-mails through Postfix or receive e-mails stored in the computer where Postfix is running
- Pulseaudio: It is a
sound server for Linux. A client can gain access to the sound hardware
in the computer where Pulseaudio is running.
- CUPS: Local and network printer server for Linux.
2- service
A command-line utility that can report or change the status of any of
the system services (a service is provided by a server program). The
following options are available:
a) start --> Starting a service. Example: service apache2 start
b) stop --> Stopping a service. Example: service apache2 stop
c) restart --> Restarting a service. The service will be
stopped and started, its service file configuration will be read again,
and its PID will be changed. Example: service apache2 restart.
c) status -->
Displaying a service status (is stopped or started). Example: service apache2 status
3- chkconfig
This mode lists the state of all
known services. Every printed line consists of the name of the service
and its status. If it is configured and running, the command will
display the service's name in the first column and the status in the
second column (off for a not running service and on for a running service).
4- BootUp-Manager
Boot-Up Manager
is a GUI application to handle services of any debian derivative
system. With this program the user will easily start and stop boot-up
scripts, without the necessity to handle thru complex links and
permissions. Boot-Up Manager has been developed and tested on Ubuntu,
but as it only relies on Perl-Gtk2 libraries, it can be run on any
Debian-like system.
PRACTICAL EXERCISE
1-
Install the chkconfig command and the Boot-Up Manager program (by default, the service command is installed in your system).
2- Using Boot-Up Manager, display and check the current status of apache2 and cups.
3- Find out the following features of apache2 and cups, using the GNOME System Monitor: a) PID, b) owner, c) status and d) command-line.
4- Stop apache2 and cups using Boot-Up Manager. Check if both service have been stopped using the GNOME System Monitor.
5- Start apache2 and cups using Boot-Up Manager. Check if both service are running again using the GNOME System Monitor.
6- Using a command-line tool, find out if ssh is runnig or stopped. Take note of its PID and who its owner is.
7- Using a command-line tool, stop the ssh service. Check if that service has been stopped using a command-line tool.
8- Using a command-line tool, start the ssh service. Check if that service is running again using a command-line tool. Check its PID. Any change?.
9- Using a command-line tool, restart the ssh service. Using a command-line tool, check if that service is running. Check its PID. Any change?.
9- Check the status of all your system services.
10- Check the status of apache2, cups and ssh using one only command (Read the manpage of chkconfig).
11- Find out the file name and path (folder where the program file is stored) of cups, apache2 and ssh.
12- Check the listening port for the ssh server using netstat -atupn as a root user. Restart the ssh service. Any change?
13- As a root user, Change the value of the parameter Port at the /etc/ssh/sshd_config file. Restart the ssh service. The new value will be 2222.
14- Check again the listening port for the ssh server using netstat -atupn as a root user. Any change?. Why?