Linux installation guide

From CSWiki
Jump to navigation Jump to search

Linux General Policy and Installation instructions

This document contains guidelines in setting up/configuring and updating of Linux systems. If you need to operate the system differently then a clear argument must be made and the decisions taken documented. In any case an accurate account of what has been done for each machine (server) MUST be made in the \\electra\docs\System-configs folder. Clients do not need an entry in this folder but it is nice to have a group config file ex. linux-rackables.

For Linux:

   * we have standardized on the Fedora distribution of Linux
   * our current standard release is Fedora Core 3
   * we also operate our own update service for doing updates
   * each machine installed MUST operate with these parameters and the following 
     guideliness unless it is strictly or evaluation purposes.

Installing Linux

A.1. Filesystem structure

   * Filesystem configuration
     We always use LVM version 2 and up for setting up Fedora filesystems
   * Physical partitions and volume groups set up
         o One physical partition for /boot with 100MB ( MUST be outside of LVM set up)
         o One physical partition, large enough, to contain the LVM Volume group(s )
         o One LVM Volume group (VolGroup00) for OS.
         o One LVM Volume group (VolGroup01 or DataVG01 etc) for DATA (if required). This is 
           prepared only if a very large volume of data is anticipated or if we determine that
           a separete volume group is necessary. Otherewise we can create a filesystem within 
           the OS volume group. It can also be constrained into a physical drive if required.
   * Filesystems
         o Within the VolGroup00 we have:
           (root) / 	1024MB (1GB)
           /usr 	4096MB (3GB) for server machines
                       5120MB (5GB) for client machines
                       (can be increased or decreased if requirements demand it)
           /var 	1024MB (1GB)
           /tmp 	512MB
           /usr/local 	512MB
           /opt 	512MB
           /home 	512MB (before mounts)
           swap space 	
           this depends on what the system will be doing. If physical memory is large 
           enough >= 1GB then swap=memory.
           /sys-data (optional)
           
           Remaining of disk space.
           Data file-system (in case VolGroup01 will not be used)
         o Within VolGroup01, if it exists, create a filesystem for data and mount it to a 
           suitable directory node (prefer /sys-data). This file system can be any format 
           of ext3, xfs, jfs. If extra speed is required prefer xfs.

B. Services and Applications installed

A list of services and applications that the machine is being used for must be maintained.

B.1 Client machines

B.2 Server machines

C. Configuration of Linux systems

C.1 Network

   * we prefer a DHCP assigned network configuration

C.2 NTP

   * the following minimum configuration must be made in /etc/ntp.conf

C.3 Logging and monitoring (syslogd, snmp)

C.4 NIS

D. Updating Linux

The CS dept operates its own yum server for upgrading all Linux machines. Updates are maintained for FC2 and FC3. Updates are downloaded every Sunday at 2:00 am.

In order for a Linux Fedora machine to access the YUM server it must be configured to do so. A working configuration is available on system eris (also the yum server machine).

D.1 For FC2

in the file /etc/yum.conf replace the following lines:

name=Fedora Core $releasever - $basearch - Base baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/

[updates-released] name=Fedora Core $releasever - $basearch - Released Updates baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/

with

[base] name=Fedora Core $releasever-$basearch - Base on CS-UCY Yum server baseurl=ftp://yum.cs.ucy.ac.cy/pub/linux/fedora/core/$releasever/$basearch/os

[updates-released] name=Fedora Core $releasever-$basearch - Released Updates on CS-UCY Yum server baseurl=ftp://yum.cs.ucy.ac.cy/pub/linux/fedora/core/updates/$releasever/$basearch

D.2 For FC3

- make sure that the reposdir parameter is NOT defined in /etc/yum.conf.

- in the file /etc/yum.conf add the lines

[base] name=Fedora Core $releasever-$basearch - Base on CS-UCY Yum server baseurl=ftp://yum.cs.ucy.ac.cy/pub/linux/fedora/core/$releasever/$basearch/os

[updates-released] name=Fedora Core $releasever-$basearch - Released Updates on CS-UCY Yum server baseurl=ftp://yum.cs.ucy.ac.cy/pub/linux/fedora/core/updates/$releasever/$basearch

[extras] name=Fedora Core $releasever-$basearch - Extra packages on CS-UCY Yum server baseurl=ftp://yum.cs.ucy.ac.cy/pub/linux/fedora/extras/$releasever/$basearch

A YUM-HOWTO is found here.

D.3 RedHat's up2date

If we like to be able to use also the up2date tool provided by RedHat and the up2date applet on our desktop then the following configuration should be made in /etc/sysconfig/rhn/sources:

   * comment out the default yum configuration
   * insert the following lines:
         o yum fedora-core ftp://yum.cs.ucy.ac.cy/pub/linux/fedora/core/3/$ARCH/os
         o yum updates-released ftp://yum.cs.ucy.ac.cy/pub/linux/fedora/core/updates/3/$ARCH

Unfortunately up2date cannot detect the release level installed and therefore it must be configured for either FC2 or FC3. Above we have it for FC3.

D.4 Update Policy

The following policy MUST be adhered to in upgrading all Linux machines managed by Support: Downloading of upgades are done every Sunday night.

D.4.1. Client Machines

Client machines should be updated weekly with all the updates available (kernel included).

   * It is advisable that NOT all machines are upgraded the same day so that in case of error in the updates only a small number of clients will be affected. One possible way to do this is to have all machines with system number ending to 1 or 2 (ex CS101, CS102) make an upgrade on Monday, number 3,4 on Tuesday etc.
   *

D.4.2 Server Machines

D.5.1 Automatic Installation using kickstart

Linux enables administrator to prepare a configuration file,named ks.cfg in order to prepare multiple clients, with minimal effort. Kickstart file, can be placed on a floppy drive, on bootable cd, or on ftp, http server.

Click here to find out how this can be done.