Step-by-Step Linux Guide

Text-only Preview

Step by
Step Linux


M. B. G. Suranga De Silva

Step by Step Linux Guide, describes the system administration aspects of using Linux.
It is intended for people who know nothing about system administration. This book
Step by StepTM Linux Guide. Page 1

doesn’t tell you how to install Linux since it is very straight forward but it gives you
real world mail, DNS, proxy, web, messaging etc… server installations and

System administration is all the things that one has to do to keep a computer system in a
useable shape. It
Includes things like backing up files and restoring , installing new programs, creating
accounts for users, making certain that the filesystem is not corrupted, and so on.

There is no one official Linux distribution, so different people have different setups,
and many people
have a setup they have built up themselves. This book is not targeted at any one
distribution, even though
I use Red Hat Linux 8 and 9 the contents can be applied to any distribution.

Many people have helped me with this book, directly or indirectly. I would like to
especially thank my own brother Dilan Kalpa De Silva, Luckshika Jayadeva for her
excellent type-setting, my ever loving mother, two sisters and my aunt Mallika

Step by StepTM Linux Guide. Page 2

Quick Configs


CourrierIMAP Server
DHCP Server
PHP and Mysql
File Server
Apache Monitoring Tool (AWTStats)
DNS Bind
Load Balancers
Load Sharing
Network Monitoring Tool (nagios)
Kernal Recompilation
Java in Linux
Linux commands in brief

Step by StepTM Linux Guide. Page 3

Target Market

IT Training Institutes
IT Departments of any organization
Libraries (school/public/ universities)

Unique Selling Points

1. Open Source freely available

2. Stable

3. Everything in single book

4. Administrators can build their own systems, from that they can take
the full control over the system. When company relies on the system,
administrators will feel more job security.

5. No need of expensive PCs to learn, just 486 is enough to become an

6. High Security

7. Free Five hours onsite cooperate training.

8. Easiest way to become a System Administrator or Systems Engineer.

Jabberd Quick Installation Guide

Step by StepTM Linux Guide. Page 4

The jabberd server is the original open-source server implementation of
the Jabber protocol, and is the most popular software for deploying
Jabber either inside a company or as a public IM service.
Save the file jabberd-1.4.2.tar.gz to /tmp/ (or to a directory of your
Open a console window and create the directory as /path/to/jabber/
as follows
[[email protected] root]#mkdir /path/
[[email protected] root]#mkdir /path/to/
[[email protected] root]#mkdir /path/to/jabber/
3. Type mv /tmp/jabberd-1.4.2.tar.gz /path/to/jabber/
Type cd /path/to/jabber/
Type gzip -d jabberd-1.4.2.tar.gz
Type tar -xvf jabberd-1.4.2.tar (this creates a jabberd-1.4.2/
directory containing various files and subdirectories)
Type cd jabber-1.4.2/
Type ./configure
Type make
10. Open another console and type cd /path/to/jabber/jabber-1.4.2/
11. Type ls -l jabberd/jabberd to view the permissions on the Jabber
daemon. The output on your console should look something like
this: -rwxr-xr-x 1 user group 675892 Feb 25 2004
12. Type ./jabberd/jabberd to start the Jabber daemon. This will run
the server using the default hostname of localhost. You should see
Step by StepTM Linux Guide. Page 5

one line of output in your console window: 20020923T02:50:26:
[notice] (-internal): initializing server.

13. Open a separate console window on the same machine and type
telnet localhost 5222 to connect to your server (yes, you can
connect using simple old telnet!). You should see the following:


Connected to your-machine-name.

Escape character is '^]'.

14. Now open an XML stream to your server by pasting the full text of
the following XML snippet into your telnet window:




You should immediately receive a reply from your server:
<?xml version='1.0'?> <stream:stream
xmlns:stream='' id='some-random-
id' xmlns='jabber:client' from='localhost'>

Congratulations! Your Jabber server is working.
15. Close the stream properly by pasting the following XML snippet
into your telnet window: </stream:stream>
16. Stop the server by killing the process or simply typing ^C in the
window where you started the server deamon.

Configuring the Hostname

Step by StepTM Linux Guide. Page 6

You change the configuration of jabberd by editing a file named
jabber.xml, which is located in your /path/to/jabber/jabber-1.4.2
directory. The jabber.xml file contains a great deal of comments that
help you understand what each configuration option does. However,
right now all that we need to change is the hostname. So open jabber.xml
in your favorite text editor (vi, emacs, etc.) and edit the line that reads as
<host><jabberd:cmdline flag="h">localhost</jabberd:cmdline></host>
You now need to give Jabber server's ip address or hostname here.
<host><jabberd:cmdline flag="h"></jabberd:cmdline></host>
<host><jabberd:cmdline flag="h"></jabberd:cmdline></host>
Make sure to create a folder and name it as the name you put in the
above line that is or in

[[email protected] root]#mkdir /path/to/jabber/jabber-

[[email protected] root]#mkdir /path/to/jabber/jabber-1.4.2/spool/

Now you need to configure your server to bind to a specific IP address.
First, in the <pthcsock/> section of your jabber.xml file, change <ip
port="5222"/> to <ip port="5222">yourIPaddress</ip>. Second, in the
Step by StepTM Linux Guide. Page 7

dialback section of your jabber.xml file, change <ip port="5269"/> to <ip
<ip port=”5222”></ip>
<ip port=”5269”></ip>
Now jabber.xml and type in console again ./jabberd/jabberd to start the
Jabber daemon previously you have killed.
Install windows jabber client exodus version: in your win PC in
the same lan segment that the jabber server runs. You can specify the
jabber server name by typing server name or ip address in the Server
drop down menu. Type your user name and password (any username and
password you like) and click “ok”

Step by StepTM Linux Guide. Page 8

Then it ask to create a new user since it was not previously in the jabber

Click “yes” and proceed. You need to add another user like this and add
contact between the other user and start messaging. Following
screenshots show how to add a new contact.

Step by StepTM Linux Guide. Page 9


Step by StepTM Linux Guide. Page 10