Next Previous Contents

6. Redhat Server Setup

This section explains how to set up your server machine to be an install server for Redhat Linux. You can set up any Linux distribution to be a Redhat install server, this machine does not necessarily have to be running Redhat.

This guide starts from the point where you have a machine installed with Linux which is already up and running and connected to your network. If you require help with installing Linux on your server then please consult the Further Information section of this HOWTO in Appendix A.

6.1 Setting Up Filespace

In order for your server to act as a Redhat network install server you will need to put on all the required data that will be needed to perform a full installation of the Redhat version you are serving. For example, if you are used to installing Redhat using CDs then you will need space on your server to copy ALL the contents of each CD onto your server.

So, before you even think about setting up your machine as an install server, you must check that you have the required space available. This sounds like a trivial thing to check but it is very important and easily forgotten when you're setting up.

How much space will you need?

A guide for the amount of space that you will require will be the amount or space of install media that you are intending to copy from later. This might be one of the following examples:

How much space do you have?

You will need the appropriate amount of space available to your system on some local filesystem. It does not matter what form this takes, whether it's a RAID device, local disk (either SCSI or IDE), etc. Ensure that the space you intend to use is formatted with your chosen filesystem and is mounted.

You can check this space with the command:

df -h

If this output shows you have enough space to copy your install media then great, you can continue installation. If not then it's time to think about an upgrade to your intended server machine!

6.2 Copy Installation Media

Once you know you have enough space available it's time to start copying your install media to your chosen filesystem and directory. For the purposes of this HOWTO we will use the following example to represent the directory from which our install server will be setup and running:

/install

Copy your install media to /install. The following example shows you how to do this for copying your Redhat CD images to /install:

  1. Mount your CD
    e.g. mount /mnt/cdrom
  2. Copy the data from CD
    e.g. cp -av /mnt/cdrom /install
  3. Unmount the CD
    e.g. umount /mnt/cdrom
  4. Now swap CDs and repeat from step 1 for each of your CDs you have.

6.3 Enable Remote Access

Time to make your install data available to other machines on the network. Redhat can be installed over the network using NFS, HTTP and FTP protocols. You can select which of these will be used at install time on the client. If one of the services is not setup on the machine then it will still be available for selection by the client but the install will not work. Therefore, it is either best to enable all three services on your server (so they all work on each client machine) or if you don't enable all three then advertise the fact very well and say which service should be used for your particular install server.

NFS

The NFS protocol is the only one which will work with the graphical install method of Redhat when installing your client machine. Therefore, if you want to do graphical (as opposed to text based) installations then you must enable this service on your server.

To install over NFS you need to meet certain conditions on the server:

To export your install directory edit the /etc/exports file and add an entry for /install to it. In our example, we would use the folowing line:

/install *(ro)
When you have saved your exports file you must then get your NFS daemon to read its configuration file again in order to export the directory you just added. Do this by running the command:
exportfs -r
This gives us the most simple read-only export to all hosts on our network. If you want to include more advanced options in your export e.g. only exporting to certain hosts on the network or a certain subnet, etc then see your man page for the exports file at exports (5).

FTP

The FTP protocol will only allow text installs to be performed by your clients. This may or may not be ideal for your situation but bear it in mind.

To install over FTP you need to allow FTP access to the directory that you have setup on the server as the installation directory. This can be either anonymous FTP access or access through a named account with a password. Anonymous access is probably best unless you have a reason to protect your install server via a password.

If you want anonymous FTP to point to a different directory then you can use sym links to point to the directory that you have set up as the install directory on the server. This will allow FTP into a chrooted environment but still give you access to the install images in a different location.

HTTP

Similarly to the FTP protocol, HTTP will only allow text installs on the client side. If you have a web server running and want to enable HTTP access to your install server then add sym links from your document root to the install server directory and this will grant access. If you are not familiar with web servers or are not comfortable with this approach then leave out HTTP access from your install server as it provides no benefits over NFS or FTP installs which may be simpler to set up.

If you do choose to use HTTP then basically all you have to do is make the install directory visible to your web server by making it appear under the document root by some means.

You have now completed the basic setup of your install server.

6.4 Package Customisation

You can, if you wish, add your own packages to the Redhat distribution so that they are installed along with Redhat over the network when you install your clients. The advantage of this is that you don't have to spend time configuring each machine for packages that you may want installed that are not included with Redhat. Examples of this might be your own RPM packages that you have created or some specialised package.

Make sure you have the anaconda-runtime package installed on your server. This is normally installed if you're running Redhat but if you have another distribution on the server then you should be able to install the Redhat RPM without too much trouble. To check if you have the correct package enter the command

rpm -q anaconda-runtime
If the name of the package is returned then you have it installed, if nothing is returned the install the RPM as required.

Now simply copy your RPM package files into the following directory

/install/Redhat/RPMS
This is the directory that should already contain all the Redhat standard RPMS for the Redhat version you have setup on your install server.

Once you have copied your custom RPMS you need to regenerate Redhat's list of packages that it can install. Do this using the following command:

/usr/lib/anaconda-runtime/genhdlist /install
The directory used here of /install is the example directory we have been using so far. Replace this with the directory where you copied the Redhat CD images to. The directory should be the base directory of the Redhat CD set i.e. the one that contains a subdirectory called Redhat before the directory called RPMS

Your custom RPM packages should now be available to the clients.

Further Customisation

In addition to adding your own RPMS to Redhat you can also create RPM groups for the installation process. These will be similar to the standard groups offered by the Redhat install already such as the "Software Development" group which will install all packages for this purpose onto your system.

This allows quick installation of many RPMS for a specific purpose on your systems and the groups will become available like the normal Redhat groups (and are used in the same way) upon installation of the client.

To create your own groups you must edit a text file called the comps file. In our example, this is located at:

/install/Redhat/base/comps

Copy the syntax for the groups that are already in the file and you can create your own groupings. These can include both packages from the standard Redhat install or any custom packages that you might have already added i.e. you can include any package in the RPMS directory.

Once you have edited the file then save it back out over the original (it might be an idea to take a backup of the original but it will always be on your CD images anyway if you need it). You must now run the genhdlist command again as explained above.


Next Previous Contents

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:22