Home | VizagInfo Mirror of LG


December 2003, Issue 97       Published by Linux Journal

Front Page  |  Back Issues  |  FAQ  |  Mirrors
The Answer Gang knowledge base (your Linux questions here!)
Search (

Linux Gazette Staff and The Answer Gang

TAG Editor: Heather Stern
Senior Contributing Editor: Jim Dennis
Contributing Editors: Ben Okopnik, Dan Wilder, Don Marti

TWDT 1 (gzipped text file)
TWDT 2 (HTML file)
are files containing the entire issue: one in text format, one in HTML. They are provided strictly as a way to save the contents as one file for later printing in the format of your choice; there is no guarantee of working links in the HTML version.
Linux Gazette[tm],
This page maintained by the Webmaster of Linux Gazette,

Copyright © 1996-2003 Specialized Systems Consultants, Inc.

Customizing the splash image in GRUB - Linux Gazette Home | VizagInfo Mirror of LG

  Customizing the splash image in GRUB
Submitted by c_r_jayanth on Friday, November 7, 2003 - 10:46

Customizing the splash image in GRUB

The splash image is the image shown in the background when GRUB (the GRand Unified Bootloader) is displaying the list of operating systems you can boot. Typically, this is the corporate logo of your Linux distribution. But its very simple to customize it to an image of your choice. All you need is the GIMP and gzip. My GIMP version is 1.2. Even older versions may do the job.

Here's how:(You need to have root access)
1)Start the GIMP.
2)Click on File->New or type Ctrl+N
3)In the new image dialog, change Width to 640 pixels and Height to 480 pixels. (The image should be of size 640x480 pixels.) Now click OK.
4)Create the image which you would like to be the splash image. It's quite fun to experiment with the various tools of the GIMP!
5)After you have finished creating the image, hit Alt+i or right click on the image and click on Image->Mode->Indexed...
6)In the Indexed Color Conversion dialog that appears, click on the radio button "Generate optimal Palette" and in "# of colors" enter 14. Click OK.(The image should be of only 14 colors)
7)Now right-click on the image and click on File->Save As...Save the file as splash.xpm in a directory of your choice.
8)Now open a terminal window and navigate to the directory where you have saved splash.xpm
9)Now key in gzip splash.xpm
10)You will find that a file named splash.xpm.gz is created in the directory where splash.xpm used to exist.
11)Copy this splash.xpm.gz to the /boot/grub directory. You may want to back up the pre-existing splash.xpm.gz file in the /boot/grub directory first.

That's it! When you reboot, you will find your image in the background, with the menu of operating systems etc. in the foreground.

Of course, this is not the only way to change the image, but it is a very simple one.

A little help on installing Linux on a PC running MS Windows by C,R. Jayanth - Linux Gazette Home | VizagInfo Mirror of LG

  A little help on installing Linux on a PC running MS Windows by C,R. Jayanth
Submitted by c_r_jayanth on Sunday, November 2, 2003 - 09:26

A little help on installing Linux on a PC running MS Windows.

Complexity level: Novice/Beginner

All around the world today, many business corporations, governments and universities are switching over to the Linux operating system (OS) for their network servers and workstations. At the same time, many (adventurous?) PC owners have tried to install it on home PCs, usually already running fine on Windows, with varying degrees of success. Perhaps they just got sick of Windows. Or they are fascinated by the philosophy of Linux. Or its just plain curiosity that drives them. If you are reading this, you probably belong to this group.

Sure, for Unix/Linux illiterates, it is usually a daunting task to switch to Linux. I, for one, had a lot of problems initially: from learning to operate a new (and very different) OS to getting my video card to work; and had to spend a little money on buying books and downloading 'drivers'. But at the end of it all, I have a virus-free OS, an excellent C compiler, internet and mail programs, an image manipulator comparable to Adobe Photoshop, better memory management (I don’t really know why, but it takes about 9 minutes to copy the contents of a CD (~650 MB) to the hard drive in Windows while it takes only about 2 minutes in Linux on my PC.) and a lot more for (almost) free. Besides, if a program runs only on Windows, I still have my old Windows OS for back-up. So, if you have decided to install Linux, you don’t really have to lose Windows. Maybe this article will be of a little help.

Which brings us to the actual topic of this article: How to install Linux (whatever distribution) on a system which already has Windows (whatever version) installed, without losing Windows or the stored files? Some Linux distributions such as Desktop Dragon actually require Windows to be running to be setup. However, most distributions must be installed on separate partitions. The actual installation is quite pain-free, so don’t grumble to take a few simple precautions before installation to ensure that you have a PC that can run two operating systems (albeit not simultaneously!).

First, for a few basics. You probably know all of this, but skim through it anyway.
1. Operating System (OS): It is the software that lets you control and use your computer. Windows, UNIX, Linux, OS/2 are all OSs, while Winamp, Netscape Navigator and all others are mere programs that run on the OS.
2. The hard disk (or hard drive): It is the part of your computer which stores your program, data and other files permanently, i.e., the contents of the hard drive will not get erased when the power is turned off, but you can add or remove data from the hard drive using your OS.
3. Disk formatting: To read/write the information on a hard disk, the disk should be organized into identifiable parts so that the computer would know where to look or write. The basic form of this organization is formatting. Hard disks must be formatted in 2 ways: (i) Physical formatting, which is done by the manufacturer. (ii) Logical formatting, which should be done after the physical formatting. Logical formatting creates a file system on the disk. Different OSs require different file systems and hence different types of logical formatting.
4. File system: The file system is an arrangement for managing data. Different OSs use and recognize different file systems. DOS uses FAT file system, while Windows 98 uses FAT32. Windows 2000 use NTFS system. Linux uses ext2 or ext3 and swap file systems. Windows XP can recognize FAT, FAT32 and NTFS file systems while Linux can recognize all these and also its own file systems. Newer versions of Linux support many more file systems.
5. Partitions: A partition is a separate physical section of the hard disk. It is created after the physical formatting and before the logical formatting. If your hard disk has more than one partition (which is usually true), each partition functions as an individual unit, and can be logically formatted with any desired file system. So you can have more than one file system on your hard disk, which means you can have more than one OS. But there are certain restrictions.

There are 3 types of partitions: Primary, Extended and Logical. A primary partition is a main disk division. Most OSs can be installed and booted from only primary partitions. One hard disk may contain up to four primary partitions, or three primary partitions and one extended partition. At a time only one primary partition may be visible and active, all others are hidden. An extended partition cannot hold any data by itself but you can further physically divide the disk space in it by creating an unlimited number of logical partitions, each with a different file system. The extended partition is meant to overcome the 4 partition limit. Logical partitions and are meant to contain only data files and OSs that can be booted from a logical partition such as Linux and Windows XP.

If you already have Windows installed, it is almost certainly on a primary partition. Also, most home PCs have just one primary partition. I recommend that you install Linux on a logical partition.

Now, all you have to do before installing Linux is to create additional partitions that can hold Linux. The idea of this article is to help you in doing just that (Without damaging Windows).Of course, we are presuming that Linux can actually run on your hardware and that you have already verified this with the hardware compatibility list of the Linux distribution. Also, you must be familiar with the setup process before beginning.

Let’s follow step-by-step, what I actually did and what you probably should do.

Step 1. I first got hold of the bootable setup CDs of RHL 7.2. I then started up my PC, while repeatedly pressing the DEL key, to enter the BIOS settings. Then, I changed the first boot device to CDROM drive, second boot device to FDD A(Floppy Disk Drive A) and third boot device to HDD 0 (Boot sector of Hard Disk Drive). Comments: Obviously, the first step would be to get your hands on the Linux setup files. You have a choice of several distributions including Debian, Mandrake, RedHat etc. If you want support and service, you have the option of either buying a boxed set from a company or depending on the large number of open-minded individuals on the internet who are dedicated to solving the problems of the Linux community out of the goodness of their hearts. If you opt for the latter, you can get the setup files by downloading them from the internet and burning them onto CDs, or you can get free CDs with some magazines, or you can borrow them from a friend etc.

You can setup Linux from CDs, DVDs, the hard drive or over a network. I would recommend CD based install which is quite hassle free. If your first installation CD is bootable, great! Otherwise you have to create a boot floppy. For RHL, you can do this in Windows or DOS using rawrite.exe or rawritewin.exe in the dosutils folder on the 1st disk. If you are using a boot floppy, you need not change the boot priority as I did.

Step 2. Next I inserted the first setup disk into the CDROM drive and restarted the computer.
Comments: Wrong move! Once you insert the CD and restart, the setup process begins. And before the setup begins, you are supposed to know and expect what happens during setup and what input you should give during the setup. Although you can just quit setup, why waste the precious seconds of your life by being unprepared? Read as much as you can on the actual setup process so that you know and expect. Even if you have memorized the setup procedure, keep a hard copy of the setup manual at hand, just to be on the safer side.

Step 3. The graphical setup program starts. I select English as the language for setup. The program detects my keyboard and mouse (But my scroll mouse is detected as a 3 button mouse. Newer distributions have fixed the problem.) It now asks for the partitions to install Linux on. I am given 3 options: One to partition automatically and the other two to partition manually with Disk Druid or Linux FDISK. I choose to partition automatically, assuming that Linux will create the required partitions out of the available free space on the disk. Then, setup flashes a warning saying "All existing data will be wiped out! Do you want to continue?". D-oh! I cancel, go back and choose manual partitioning using Disk Druid. Now I am presented with a diagram showing my 2 precious partitions. I have the option of deleting either of them to make space for Linux. At this point, I realize that I goofed up by not being sufficiently prepared before starting setup. Its CTRL+ALT+DEL for restart.

Step 4. I remove the Linux CD from the drive before the setup program starts again, start Windows, log on to the internet and do some research. It turns out that to install (most flavors of) Linux, you need at least 2 partitions: One "root" partition (denoted by '/') and one "swap" partition. The root partition must be big enough to hold all your Linux programs and files (Please refer to your Linux documentation to find out the exact size. Mine is about 4 GB and about 2 GB of it is occupied by system files.) and the swap partition should be double the size of your RAM. Moreover, these partitions need not be primary partitions, unlike the requirement in Windows 9x. OK, so we now know what partitions are necessary. So how do we create them? There are programs specifically written to facilitate safe partitioning, such as Powerquest Partition Magic. There were a few demo-version partitioning programs for free download on the net. But to download at my connection speed would take hours. Waitaminute!! Isn’t there a program called fdisk in DOS that can manipulate partitions?

Step 5. I start an MSDOS console and hit fdisk /? .It gives a message "Configures a hard disk for use with MS-DOS....” But I want to configure the disk for use with the Linux ext2 file system. Have I come to the wrong program? I now key in fdisk .It asks "Do you want to enable large disk support?” I answer Yes. Next I am given a menu:
1. Create DOS partition or Logical DOS Drive
2. Set active partition
3. Delete partition or Logical DOS Drive
4. Display partition information

Hmmm. If I now create DOS partitions of the size required for Linux, I can later format the partitions in the ext2 format during Linux setup. The important thing is to create the partitions, not whether they are DOS or Linux partitions.

I first check out the partition information. There are 2 partitions with no free (unallocated) space. I exit fdisk and check the available free space on the partitions. D drive has 5 GB free space out of about 19 GB. If I could somehow split this partition into 3 partitions: 3-4 GB for root partition, 256 MB for swap partition and the remaining for D drive, everything would be just nice. To do so using fdisk, I would have to:
1. Remove all data from D drive and store it elsewhere.
2. Delete D drive using option 3 of fdisk menu.
3. Create the 3 required partitions by using option 1 of fdisk menu three times.
4. Return the data to D drive (ie the largest of the 3 partitions.)

Step 6. Now all the data from D drive cannot be moved into C drive, there is just not enough space. So I run to my friend's place, get his hard drive, plug it into my computer in the slave configuration, and transfer some of the data into it. The rest of the data, I transfer to the C drive. So D drive is finally empty! Next, I start fdisk again, and choose to "Delete partition or Logical DOS Drive". Next, I choose to delete logical DOS drive(s) in the Extended Partition. Then I choose to delete D drive. Now, from the first menu, I select "Create DOS partition or Logical DOS Drive". In the following menu, I choose "Create Logical DOS Drive(s) in the Extended DOS Partition". Next, I specify the size of the partition, about 3 GB. Similarly, I create the other 2 partitions. It’s time to restart again. Comments: You probably don’t need to connect another hard disk to empty the contents of a partition. You can probably store the contents somewhere safe on your network or to a laptop via a LAN card or to a storage device via USB port. If you have no other option, take the help of an expert. Of course, it is a simple procedure, and you can probably get it right without anyone's help.

Step 7. Now we're ready to try installation again. This time around, when the setup asks me to specify the partitioning method, I confidently choose to partition manually using Disk Druid. Next, I choose to format the 3 GB partition as root (/) with ext3 file system. Since I am installing Linux on a logical partition, I am warned that the partition may not meet boot requirements and strongly recommended to create a boot diskette. No problem. The 256 MB partition is formatted as swap.

Step 8. When installing Linux, its best that LiLo (the boot loader) is installed to the root superblock (boot sector equivalent) of the Linux partition, not the Master Boot Record (MBR). You can let the setup modify the MBR, but if you reinstall Windows, Linux will be rendered inaccessible. Don’t forget to create a boot diskette!

That’s about it! The rest of the setup should proceed without any glitches and you will have a dual boot computer. You will be presented a convenient menu by the bootloader (GRUB or LiLo or a commercial bootloader that you have installed) every time your computer starts. From this menu, you can choose the OS to boot: either Linux or DOS (Windows).

IMPORTANT! I repeat, do not set up partitions with Linux FDISK or Disk Druid; they may render partition tables unreadable to other operating systems. You can use them to change partition types and set partition mount points, but that is all.

Copyright © 2003, C.R. Jayanth. Copying license
Published in Issue 96 of Linux Gazette, November 2003

configure; make; make install - Linux Gazette Home | VizagInfo Mirror of LG

  configure; make; make install
Submitted by Willy on Saturday, November 22, 2003 - 12:55

Over and over I have heard people say that you just use the usual configure, make, make install sequence to get a program running. Unfortunately, most people using computers today have never used a compiler or written a line of program code. With the advent of graphical user interfaces and applications builders, there are lots of serious programmers who have never done this.

What you have are three steps, each of which will use a whole host of programs to get a new program up and running. Running configure is relatively new compared with the use of make. But, each step has a very distinct purpose. I am going to explain the second and third steps first, then come back to configure.

The make utility is embedded in UNIX history. It is designed to decrease a programmer's need to remember things. I guess that is actually the nice way of saying it decreases a programmer's need to document. In any case, the idea is that if you establish a set of rules to create a program in a format make understands, you don't have to remember them again.

To make this even easier, the make utility has a set of built-in rules so you only need to tell it what new things it needs to know to build your particular utility. For example, if you typed in make love, make would first look for some new rules from you. If you didn't supply it any then it would look at its built-in rules. One of those built-in rules tells make that it can run the linker (ld) on a program name ending in .o to produce the executable program.

So, make would look for a file named love.o. But, it wouldn't stop there. Even if it found the .o file, it has some other rules that tell it to make sure the .o file is up to date. In other words, newer than the source program. The most common source program on Linux systems is written in C and its file name ends in .c.

If make finds the .c file (love.c in our example) as well as the .o file, it would check their timestamps to make sure the .o was newer. If it was not newer or did not exist, it would use another built-in rule to build a new .o from the .c (using the C compiler). This same type of situation exists for other programming languages. The end result, in any case, is that when make is done, assuming it can find the right pieces, the executable program will be built and up to date.

The old UNIX joke, by the way, is what early versions of make said when it could not find the necessary files. In the example above, if there was no love.o, love.c or any other source format, the program would have said:
make: don't know how to make love. Stop.

Getting back to the task at hand, the default file for additional rules in Makefile in the current directory. If you have some source files for a program and there is a Makefile file there, take a look. It is just text. The lines that have a word followed by a colon are targets. That is, these are words you can type following the make command name to do various things. If you just type make with no target, the first target will be executed.

What you will likely see at the beginning of most Makefile files are what look like some assignment statements. That is, lines with a couple of fields with an equal sign between them. Surprise, that is what they are. They set internal variables in make. Common things to set are the location of the C compiler (yes, there is a default), version numbers of the program and such.

This now beings up back to configure. On different systems, the C compiler might be in a different place, you might be using ZSH instead of BASH as your shell, the program might need to know your host name, it might use a dbm library and need to know if the system had gdbm or ndbm and a whole bunch of other things. You used to do this configuring by editing Makefile. Another pain for the programmer and it also meant that any time you wanted to install software on a new system you needed to do a complete inventory of what was where.

As more and more software became available and more and more POSIX-compliant platforms appeared, this got harder and harder. This is where configure comes in. It is a shell script (generally written by GNU Autoconf) that goes up and looks for software and even tries various things to see what works. It then takes its instructions from and builds Makefile (and possibly some other files) that work on the current system.

Background work done, let me put the pieces together.

  • You run configure (you usually have to type ./configure as most people don't have the current directory in their search path). This builds a new Makefile.
  • Type make This builds the program. That is, make would be executed, it would look for the first target in Makefile and do what the instructions said. The expected end result would be to build an executable program.
  • Now, as root, type make install. This again invokes make, make finds the target install in Makefile and files the directions to install the program.

This is a very simplified explanation but, in most cases, this is what you need to know. With most programs, there will be a file named INSTALL that contains installation instructions that will fill you in on other considerations. For example, it is common to supply some options to the configure command to change the final location of the executable program. There are also other make targets such as clean that remove unneeded files after an install and, in some cases test which allows you to test the software between the make and make install steps.

Linux, At Your Service - Linux Gazette Home | VizagInfo Mirror of LG

  Linux, At Your Service
Submitted by BobW on Friday, November 21, 2003 - 03:20

For the first few years of working with Linux I heard people talk about ports, protocols and services and I just hoped I could ignore them and keep getting my work done. Usually, this was the case but I eventually decided to bite the bullet and see what all this was about. This article won't tell you everything there is to know but it should help you put together the pieces.

One of the most helpful crib sheets in learning about all this stuff is a file on your system. In virtually all systems it is named /etc/services. It is just an plain ASCII file which provides a mapping between textual names for services and their assigned port numbers and protocol types. You may have noticed that all three buzzwords appeared in that one sentence. They appear in that file as well. I include a few lines from that file to give you an idea what I am talking about. I have included the comments from the top of the file so we can talk about them as well.

# Network services, Internet style
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
# This list could be found on:
# (last updated 2002 January 15)
# The port numbers are divided into three ranges: the Well Known Ports,
# the Registered Ports, and the Dynamic and/or Private Ports.
# The Well Known Ports are those from 0 through 1023.
# The Registered Ports are those from 1024 through 49151
# The Dynamic and/or Private Ports are those from 49152 through 65535
# The Well Known Ports are assigned by the IANA and on most systems can
# only be used by system (or root) processes or by programs executed by
# privileged users.
# Ports are used in the TCP [RFC793] to name the ends of logical
# connections which carry long term conversations.  For the purpose of
# providing services to unknown callers, a service contact port is
# defined.  This list specifies the port used by the server process as
# its contact port.  The contact port is sometimes called the
# "well-known port".
# To the extent possible, these same port assignments are used with the
# UDP [RFC768].
# The range for assigned ports managed by the IANA is 0-1023.
# Port Assignments:
#                 0/tcp    Reserved
#                 0/udp    Reserved
tcpmux          1/tcp           # TCP Port Service Multiplexer
tcpmux          1/udp           # TCP Port Service Multiplexer
ftp-data        20/tcp          # File Transfer [Default Data]
ftp-data        20/udp          # File Transfer [Default Data]
ftp             21/tcp          # File Transfer [Control]
fsp             21/udp          # official is File Transfer, ftp use no udp
ssh             22/tcp          # SSH Remote Login Protocol
ssh             22/udp          # SSH Remote Login Protocol
telnet          23/tcp          # Telnet
telnet          23/udp          # Telnet

There is a whole lot to talk about already. If you look at the last few lines you will see lines that start with ftp, ssh and telnet. If you have never heard of any of those names you probably need to read a different article. However, if you do know what they are, a light may have just come on for you.

What these lines tell you is that ftp uses ports 20 and 21, ssh uses port 22 and telnet uses port 23. If you use command line versions of these programs you might have noticed you could specify a port number. If you are curious, type ftp --help or telnet --help and see what you get. With ftp, you use the -P option to specify a port. With telnet, the port number just follows the hostname. With either command, the port number is optional. What that means is that if you don't specify it then the program uses the default port.

Looking back at the file you can see that each port number is followed by a slash and "tcp" or "udp". These are two standard Internet protocols. UDP is connectionless. What this means is that one computer can sent a message to another computer without asking permission first. The problem is that the sender will not know if the other system ever received the message. The buzzword here is unreliable.

The TCP protocol is reliable which just means that the sender and receiver talk to each other to make sure everything worked. Each protocol has a purpose. For example, when the systems want to establish a connection, sending a UDP message to that effect makes sense. It is just faster and easier.

So far, we have been talking about services that run on well known port numbers. Here are a few more that will likely be familiar to you.

smtp            25/tcp  mail    # Simple Mail Transfer
smtp            25/udp  mail    # Simple Mail Transfer
http            80/tcp          # World Wide Web HTTP
http            80/udp          # World Wide Web HTTP
pop2            109/tcp         # Post Office Protocol - Version 2
pop2            109/udp         # Post Office Protocol - Version 2
pop3            110/tcp         # Post Office Protocol - Version 3
pop3            110/udp         # Post Office Protocol - Version 3
nntp            119/tcp         # Network News Transfer Protocol
nntp            119/udp         # Network News Transfer Protocol
imap            143/tcp imap2   # Internet Message Access Protocol
imap            143/udp imap2   # Internet Message Access Protocol
imap3           220/tcp         # Interactive Mail Access Protocol v3
imap3           220/udp         # Interactive Mail Access Protocol v3
imaps           993/tcp         # imap4 protocol over TLS/SSL
imaps           993/udp         # imap4 protocol over TLS/SSL

You will certainly know about port 80. In addition, you can see that the various mail protocols have an assortment of ports. imaps is a secure connection for fetching your mail from a mail server. I should mention that you now can see two uses of the word protocol. First, in TCP or UDP and second in the protocol of the actual content. For example, SMTP stands for Simple Mail Transfer Protocol. Don't get confused--TCP and UDP have to do with the protocol for getting the message to the other end. The second use of the word protocol has to do with the specifics of the message content.

SMTP is the most common way a computer sends email to another computer. Your computer might send the message directly or it might send it thru what is called a smart host. In any case, the mail message is transfered by some computer connecting to the recipient computer using port 25 and then communicating using the SMTP protocol. This is a simple protocol and you can use your local telnet command to explore how it works. Just for kicks, try a command like this
telnet 25
but replace with a computer that is listening on port 25. I tried

You should see a message about the connection succeeding and then you are likely to not even get a prompt. If you are connected, try typing help and pressing the Enter key. Generally you will get a terse message of the commands that are supported. Here is what I got.

sid@firefly:/tmp> telnet 25
Connected to
Escape character is '^]'.
220 ESMTP Exim 3.35 #1 Sun, 16 Nov 2003 11:44:51-0800
214-Commands supported:
221 closing connection
Connection closed by foreign host.

Is this starting to make some sense? Ok, let me give you a new buzzword. When I performed the telnet connection, the remote computer was listening on port 25. This is actually just what it sounds like. There was a programming running that was just waiting for someone to try to connect to port 25. When telnet sent the request, that program established the connection. Some programs that are listening can only connect to one computer at a time, others can handle multiple connections.

Finally, I want to explain about the registered ports, which are the ports whose numbers are above 1024. In order for a program to listen on the ports that we have already covered, it has to be started as root. This didn't mean the program continued to run as root. This is actually pretty common. The apache web server, for example, is generally started as root, it does any necessary setup such as binding to port 80 and then changes it user ID to something less powerful--generally nobody or some other ordinary user.

On these higher numbered ports, any program can bind to them. Below I have included a few of the more common ones.

mysql           3306/tcp        # MySQL
mysql           3306/udp        # MySQL
x11             6000/tcp        # X Window System
x11             6000/udp        # X Window System
x11             6019/tcp        # X Window System
x11             6019/udp        # X Window System
x11             6063/tcp        # X Window System
x11             6063/udp        # X Window System
gnutella-svc    6346/tcp        # gnutella-svc
gnutella-svc    6346/udp        # gnutella-svc
gnutella-rtr    6347/tcp        # gnutella-rtr
gnutella-rtr    6347/udp        # gnutella-rtr
http-alt        8008/tcp        # HTTP Alternate
http-alt        8008/udp        # HTTP Alternate
http-alt        8080/tcp        # HTTP Alternate (see port 80)
http-alt        8080/udp        # HTTP Alternate (see port 80)

The first one, mysql, should help explain why it doesn't seem to matter if MySQL is running on your local computer or another system. Communication with it is thru a port so the only thing that changes is the hostname in the connection message.

Ports 8008 and 8080 are of interest if you are testing out a new web server or want to run more than one web server on the same computer. Because you don't have to be root to bind to ports 8008 or 8080 you can test a web server or even run one on a machine where you don't have root access.

I hope this introduction to ports, protocols and services has been helpful to you. I welcome your comments.

Familiarize Yourself with sendmail - Linux Gazette Home | VizagInfo Mirror of LG

  Familiarize Yourself with sendmail
Submitted by h.santhosh@timk... on Saturday, November 22, 2003 - 15:24

Familiarize Yourself with sendmail


When we do a default Linux server installation you will find the default /etc/mail/ . This file has various macros defined and with very little explanation. Firstly, preview your default Than the below article explains the details for most of the macros defined in in the same order. For more information refer to Explained



dnl This is the sendmail macro config file. If you make changes to this file,

dnl you need the sendmail-cf rpm installed and then have to generate

dnl new /etc/mail/ by running the following command:


dnl        m4 /etc/mail/ > /etc/mail/




This is a requirement in order to process the macro file and generate the file. This include the cf.m4 macro files which contains lots of macro definition for the rest of the file.


VERSIONID('linux setup for Red Hat Linux')dnl

      VERSIONID is a macro that stuffs the version information into the resulting file.  You could use SCCS, RCS, CVS, something else, or omit it completely.  This is not the same as the version id included in SMTP greeting messages -- this is defined in m4/version.m4.




      You must specify an OSTYPE to properly configure things such as the pathname of the help and status files, the flags needed for the local mailer, and other important things.  If you omit it, you will get an error when you try to build the configuration.  Look at the ostype directory for the list of known operating system types. DOMAIN('CS.Berkeley.EDU')dnl This example is specific to the Computer Science Division at Berkeley. You can use "DOMAIN('generic')" to get a sufficiently bland definition that may well work for you, or you can create a customized domain definition appropriate for your environment.


dnl define('SMART_HOST','smtp.your.provider')

Uncomment and edit the following line if your mail needs to be sent out through an external mail server:



      confDEF_USER_ID         DefaultUser [1:1] Default user id.



      UUCP_RELAY  The host that will accept UUCP-addressed email.

            If not defined, all UUCP sites must be directly connected.



      BITNET_RELAY      The host that will accept BITNET-addressed email.

            If not defined, the .BITNET pseudo-domain won't work.


dnl define('confAUTO_REBUILD')dnl


define('confTO_CONNECT', '1m')dnl

confTO_CONNECT    Timeout.connect   [0] The timeout waiting for an initial connect() to complete.  This can only shorten connection timeouts; the kernel silently enforces an absolute maximum (which varies depending on the system).



      confTRY_NULL_MX_LIST    TryNullMXList[False] If this host is the best MX

                              for a host and other arrangements

                              haven't been made, try connecting

                              to the host directly; normally this

                              would be a config error.




      confDONT_PROBE_INTERFACES  DontProbeInterfaces

                              [False] If set, sendmail will _not_

                              insert the names and addresses of any

                              local interfaces into class {w}

                              (list of known "equivalent" addresses).

                              If you set this, you must also include

                              some support for these addresses (e.g.,

                              in a mailertable entry) -- otherwise,

                              mail to addresses in this list will

                              bounce with a configuration error.

                              If set to "loopback" (without

                              quotes), sendmail will skip

                              loopback interfaces (e.g., "lo0").



      PROCMAIL_MAILER_PATH    [/usr/local/bin/procmail] The path to the procmail program.  This is also used by FEATURE('local_procmail').


define('ALIAS_FILE', '/etc/aliases')dnl

      ALIAS_FILE        [/etc/mail/aliases] The location of the text version

                  of the alias file(s).  It can be a comma-separated

                  list of names (but be sure you quote values with

                  commas in them -- for example, use define('ALIAS_FILE', 'a,b')

                  to get "a" and "b" both listed as alias files;

                  otherwise the define() primitive only sees "a").


dnl define('STATUS_FILE', '/etc/mail/statistics')dnl

      STATUS_FILE       [/etc/mail/statistics] The file containing status information.


define('UUCP_MAILER_MAX', '2000000')dnl

      UUCP_MAILER_MAX         [100000] The maximum size message accepted for transmission by the UUCP mailers.


define('confUSERDB_SPEC', '/etc/mail/userdb.db')dnl

      confUSERDB_SPEC         UserDatabaseSpec