Tero Karvinen - Articles - Downloads - Courses - Contact

Table of Contents

Back to FreeHelia Abstract and Contents - Prev References

8 Appendixes

8.1 Automated Installation

This kickstart file was demonstrated in Linux teaching session to Open Helia project. It is meant to be used with a boot cd to load it from network.

The boot cd can be created from “Fedora Core CD 1” : images/boot.iso, by modifying boot loader configuration isolinux.cfg to include the kickstart file by default, and then re-creating the cd image. A script for writing a bootable cd from this images is included in appendix “mkcd

For printing purposes, the lines ending with a backslash \ have been wrapped. These lines need to be concatenated for files to work.

8.1.1 ks.cfg Automatic Installation Script

# ks.cfg for FreeHelia 
# Copyright 2003-2004 Tero Karvinen tero.karvinen at iki.fi
# 20040123t1000

install
#url --url http://10.0.0.1/instero/terix/
url –url \ ftp://ftp.funet.fi/pub/linux/mirrors/redhat/fedora/linux/core/1/i386/os/
lang en_US.UTF-8
langsupport --default en_US.UTF-8 en_US.UTF-8
keyboard fi
# could use 2-button ps2 here, wheel can be enabled later
# usb works instantly when plugged
mouse --emulthree
xconfig --startxonboot --defaultdesktop=kde
network --device eth0 --bootproto dhcp
rootpw piilos-ana
firewall --high --ssh
authconfig --enableshadow --enablemd5
timezone --utc Europe/Helsinki
bootloader --location=mbr
# this will be done before script:
#zerombr yes
# reboot on pxe boot, but not with a cd in the drive
#reboot
#clearpart --linux --initlabel 

#part /boot --fstype ext3 --size=100 --ondisk=hda
#part / --fstype ext3 --size=700 --grow --ondisk=hda
# Use a pre script to make swap size equal to physical memory
#part swap --size=128 --grow --maxsize=256 --ondisk=hda

%packages --resolvedeps
# Lot of stuff
@ office
@ sound-and-video
@ editors
#@ admin-tools
@ emacs
@ base-x
@ gnome-desktop
@ gnome-software-development
@ graphics
@ development-tools
@ printing
@ games
@ text-internet
@ graphical-internet
kernel
#kernel-pcmcia-cs
grub
# Text mode basics
@ base
mc
nano
openssh-clients
elinks
lynx
screen
openssh-server
redhat-config-network-tui
### X basics: kde, gnome, light window man
#@ base-x
kdebase
 # icewm
redhat-config-xfree86
redhat-config-network
### minimum software 
xpdf
#nedit
openoffice.org
#@ printing
gimp
epiphany
rdesktop
vnc
gaim
# g-links
### applications
@ gnome-desktop
#@ admin-tools
xmms
gaim
ethereal-gnome
nmap-frontend
#kernel-pcmcia-cs
grub
fsh
-firstboot
#-up2date
#-up2date-gnome
-rhn-applet
-rhgb

%pre
#!/bin/sh
echo "Preinstall script running"

%post
#wget http://10.0.0.1/terix/post-install.sh
#sh post-install.sh |tee >> /var/tmp/post-install.log
# reboot, have cd check rh was not just installed
wget http://myy.helia.fi/~karte/helnux/yum.conf
cp yum.conf /etc/yum.conf
chkconfig yum on
wget http://myy.helia.fi/~karte/helnux/installed.php
# Copyright 2003 Tero Karvinen tero.karvinen at iki.fi

8.1.2 Isolinux.cfg for Bootable Installer

# isolinux.cfg Modifications (c) Tero Karvinen 
default helnux
prompt 1
timeout 60
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label helnux
  kernel vmlinuz
  append initrd=initrd.img ramdisk_size=8192 \ 
        ks=http://myy.helia.fi/~karte/helnux/ks.cfg
label linux
  kernel vmlinuz
  append initrd=initrd.img ramdisk_size=8192
label text
  kernel vmlinuz
  append initrd=initrd.img text ramdisk_size=8192
label expert
  kernel vmlinuz
  append expert initrd=initrd.img ramdisk_size=8192
label ks
  kernel vmlinuz
  append ks initrd=initrd.img ramdisk_size=8192
label lowres
  kernel vmlinuz
  append initrd=initrd.img lowres ramdisk_size=8192
label memtest86
  kernel memtest
  append -

8.1.3 mkcd – Creating a Bootable Installer Cdrom

#!/bin/sh
# a script to create bootable cd from a directory with isolinux
# mount -o loop boot.iso bootmnt/ && cd bootmnt
 
mkisofs -v -o helnux-ksnet.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /home/tee/terix/minibootcd/minibootcd/
 
cdrecord -eject helnux-ksnet.iso

8.2 Estimating the Number of Users in Helia

The number of users was aproximated with

 karte@myy.helia.fi$ cat /etc/passwd|grep /bin/bash|wc -l 
  10858

This probably includes non-active users, but we can assume that non-active users must be stored in future systems too.

The operating system version of myy was found out with

 karte@myy.helia.fi$ cat /etc/redhat-release
 Red Hat Linux Advanced Server release 2.1AS (Pensacola)

8.3 Yum automated software installation and update for Red Hat Linux

Published during this study at http://iki.fi/karvinen and tested with more than hundred users in Helia Tiko, Helia company training and volunteers worldwide.

Yum is the easiest way to keep all programs up to date. It downloads and installs the latest version of a program. A single command can update all software installed, including third-party software, security updates and operating system. It can do the updating automatically in the night. In this howto, we install yum and make it do all the above.

Yum is similar to, but better than apt, apt4rpm, windows update, up2date, yast and many other package managers I have seen.

Yum works in a safe, standardized way. It uses rpm (Red Hat package manager) for installing programs. Authenticity of packages is checked with strong gpg encryption. Package repositories are just folders on a web server.

This tutorial is for Red Hat 9. If you are using the newer Fedora Core 1 or later, you already have yum installed. For configuring Fedora version, see unofficial Fedora Faq.

We will install yum, then choose trusted packagers and start installing programs. We will also see some yum tips.

© Tero Karvinen

8.3.1 Install yum

Red Hat has rpm package manager installed by default. We use rpm to install yum.

Download yum-2.0.3-0.fdr.1.rh90.noarch.rpm

Open command prompt: Main menu (the red hat menu on bottom left corner), System Tools, Terminal. Become root with su -. Notice how your prompt turns from $ to #.

Go to the folder where you downloaded yum. Most likely cd /home/your-user-name/. If you can see the file with ls, you are on the right place.

rpm -Uvh yum*.noarch.rpm

In the command above, rpm -Uvh means installing just like rpm -i you may have used allready. -Uvh just displays some extra info and erases old version of program if necessary. You can rpm -q yum to see if yum is installed. It should tell you the version number of yum.

# rpm -q yum yum-2.0.3-0.fdr.1.rh90

8.3.2 Add trusted packagers to your keyring

In yum, it really does not matter if enemy takes over the internet and fakes to be some website offering software. All software is cryptographically checked before installation. To install some software, we must tell yum who we trust.

rpm –import /usr/share/doc/yum-*/Fedora-GPG-KEY rpm –import /usr/share/doc/yum-*/RPM-GPG-KEY

We installed the key of Red Hat Inc, as we obviously trust the company that compiled our operating system. We installed Fedora’s key, as we have allready installed yum packaged by Fedora. These two keys are probably the most usefull ones. 8.3.3 Start installing software

yum install lynx

Because it is your first run, it first downloads headers that contain information about what is available. This can take as long as 20 minutes, but it only needs to be done once. Yum prints the names of headers it downloads

Gathering header information file(s) from server(s)
Server: Fedora Linux / stable for Red Hat Linux 9 (i386)
Server: Fedora Linux / testing for Red Hat Linux 9 (i386)
Server: Red Hat Linux 9 (i386)
Server: Red Hat Linux 9 (i386) updates
Finding updated packages
Downloading needed headers
getting /var/cache/yum/fedora-stable/headers/leafnode-0-1.9.43-0.fdr.1.rh90.i386.hdr
getting /var/cache/yum/fedora-stable/headers/libzvt-devel-0-2.0.1-0.fdr.5.rh90.i386.hdr
getting /var/cache/yum/fedora-stable/headers/mhash-devel-0-0.8.18-0.fdr.1.rh90.i386.hdr
   [..]
Resolving dependencies
Dependencies resolved
I will do the following:
[install: lynx 0-2.8.5-7.1.i386]
Is this ok [y/N]: y

Accept with y and press enter. Yum downloads requested packages and installs them.

If any additional programs, dependencies, are needed, yum will ask if you want to install those too. For example, lynx needs perl-CGI, so if we don’t have that installed yet, yum installs it. Calculating available disk space - this could take a bit lynx 100 % done 1/1 Installed: lynx 0-2.8.5-7.1.i386 Transaction(s) Complete

Now all users can use lynx right away. No reboots, no changing cdroms, no nuisance. If you are still root (have a # on your command prompt), exit.

Now try lynx. If you can run lynx (the text mode web browser), you have succeeded. Congratulations, you have now installed the state of the art package manager yum.

8.3.4 Yum tips

That was just too easy, wasn’t it? To have some fun with yum, try

yum list "*ssh*"        # lists packages that have "ssh" in the name
chkconfig yum on        # make yum update all programs every night
yum remove up2date      # remove a program, dependencies handled
yum -y install pine     # -y answers "yes" to all questions
                        # pine is the package that has pico editor

8.3.5 Links

Duke University 2003: Yellow dog Updater, Modified. Official homepage of yum. Has a list of yum repositories.

Fedora Project 2003: Fedora.us. The biggest yum repository, now merging with Red Hat.

Saou, Mathias 2003: Freshrpms.net. The first big automated software repository for Red Hat. Best packages of many programs, such as mplayer and sylpheed. Good documentation.

To use yum in some real application, try some of my other tutorials. Most of them use yum to install software. 8.3.6 Copyright and Administrivia (for Appendix “Yum automated...”)

Tested with Red Hat Linux 9 Shrike

Copyright 2003-09-28, 2003-09-29, 2003-11-05 (yum list ssh), 2003-11-19 (Fedora Core advise+link) Tero Karvinen. 8.4 Legal Notice

No part of this paper should be considered legal advice. None of it has been checked by a lawyer. Licensing terms of any software referenced or included are here as reported by software vendor in question, for authoritative licenses, see legal notices in software in question. 8.5 Currently Installed Software in Helia and Free Alternatives

List of software installed in workstations of Helia on 2003, based on “Mama Ghost” (Helia IT services 2003) and observation by writer.

Multimedia players play music and videos in many file formats, such as mp3, dvd, real, quicktime, flash and shockwave. Currently installed are

Utilites

Browsers

Databases

Office

Educational

Other software

Sap gui (Enterprice Resource Planning) - MySAP client for Linux (SAP AG 2003).

Workstations management

8.6 Glossary

License – An agreement between software vendor and user. Accepting license is usually a requirement for using software.

Distribution - A combination of operating system and software. An installer has usually an easy to use installer, documentation and support.

Linux - The Free operating system and distribution or just the Free kernel (the tiny core of an operating system), depending on context.

Operating System (OS) – software platform that lies between applications and hardware. Some popular operating systems are Windowses, BSD, Apple OSX and Linux.

Information Technology (IT) – field of automatic processing of information, which in practice consists of computer systems and related organizations.

Copyright 2003-2005 Tero Karvinen http://iki.fi/karvinen

Back to FreeHelia Abstract and Contents

Last modified: 2005-10-30. Permanent url: http://www.iki.fi/karvinen/freehelia_appendixes.html

Tero Karvinen www.iki.fi/karvinen - Top - Validate HTML - Validate CSS