Step-by-Step Linux Guide

Text-only Preview

Step by
Step Linux
Guide

by

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
configurations.

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
Vitharana.


























Step by StepTM Linux Guide. Page 2


Quick Configs

Jabberd
Sendmail
Qpopper

Qmail
CourrierIMAP Server
Squirrelmail
DHCP Server
PHP and Mysql
PostGRE
File Server
Squid
Squidguard
Iptables
Freeradius
Apache
Apache Monitoring Tool (AWTStats)
Samba
DNS Bind
OpenLDAP
NoCatAuth
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)
Students

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
expert.

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.
1.
Save the file jabberd-1.4.2.tar.gz to /tmp/ (or to a directory of your
choice).
1.
Open a console window and create the directory as /path/to/jabber/
as follows
[root@im root]#mkdir /path/
[root@im root]#mkdir /path/to/
[root@im root]#mkdir /path/to/jabber/
3. Type mv /tmp/jabberd-1.4.2.tar.gz /path/to/jabber/
4.
Type cd /path/to/jabber/
5.
Type gzip -d jabberd-1.4.2.tar.gz
6.
Type tar -xvf jabberd-1.4.2.tar (this creates a jabberd-1.4.2/
directory containing various files and subdirectories)
7.
Type cd jabber-1.4.2/
8.
Type ./configure
9
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
jabberd/jabberd
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:

Trying 127.0.0.1...

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:

<stream:stream

to='localhost'

xmlns='jabber:client'

xmlns:stream='http://etherx.jabber.org/streams'>
You should immediately receive a reply from your server:
<?xml version='1.0'?> <stream:stream
xmlns:stream='http://etherx.jabber.org/streams' 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
follows:
<host><jabberd:cmdline flag="h">localhost</jabberd:cmdline></host>
You now need to give Jabber server's ip address or hostname here.
Ex.
<host><jabberd:cmdline flag="h">192.168.200.8</jabberd:cmdline></host>
or
<host><jabberd:cmdline flag="h">im.jic.com</jabberd:cmdline></host>
Note:
Make sure to create a folder and name it as the name you put in the
above line that is 192.168.200.8 or im.jic.com in
/path/to/jabber/jabber-1.4.2/spool/

Ex:
[root@im root]#mkdir /path/to/jabber/jabber-
1.4.2/spool/192.168.200.8

or
[root@im root]#mkdir /path/to/jabber/jabber-1.4.2/spool/im.jic.com

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
port="5269">yourIPaddress</ip>.
Ex:
<ip port=”5222”>192.168.200.8</ip>
<ip port=”5269”>192.168.200.8</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:0.9.0.0 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”

or
Step by StepTM Linux Guide. Page 8




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


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




or


Step by StepTM Linux Guide. Page 10