Trying out old CentOS images

Trying out the oldest available CentOS images

I use Debian all the time, however I also like CentOS for a couple of reasons.

It's nice that Yum/DNF has transaction history and the ability to undo/redo a certain installation/removal of packages.

What is however great is the longer(~10 years) supported life time of a release, compared to Debian's 3-5 years.

CentOS 2.1

This is the first release I could get my hands on.

From the CentOS vault, I had tried to download the ISO files to no avail.

However, these mirrors are linked from the 2.1 download page:

USA:
http://archive.kernel.org/centos-vault/
rsync://archive.kernel.org::centos-vault/

Europe:
http://mirror.nsc.liu.se/centos-store/
rsync://mirror.nsc.liu.se::centos-store/

http://linuxsoft.cern.ch/centos-vault/
rsync://linuxsoft.cern.ch/centos-vault/

I actually used the nsc.liu.se links from above.

Both disc1 and disc2 images are needed for the installation to complete.

I also pulled down the MD5SUMS file to check the ISO-s I got were OK.

CentOS 2.1 on KVM with virt-manager

I've started a local install with disc1.

Then in the OS type field entered linux, the field "Include EOL OS-s" were already ticked.

From there, all I had to was find RHEL 2.1.

Selecting RHEL 2.1 will bring up some default settings which worked OK for this test VM.

The defaults for the disk & cd bus were ide and the network adapter model defaulted to e1000e.

The installation was fairly straight-forward, however using the mouse inside the console was finicky, I ended up using the keyboard(space, tab and enter are great here) instead.

While installing the packages, the installer asked for disk2.

I forgot to add a second disk drive before starting the installer, so what I did was swap the ISO file to disc2 from virt-manager's "Show virtual hardware details" section.

Then the installer carried finished and all that was left to reboot the VM.

Connecting to CentOS 2.1

By default the Debian ssh client couldn't connect to SSH 3.1 on C2.1.

The following command let me connect:

ssh -c aes128-cbc -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.122.16

I tried using ssh-copy-id for C2.1, but only using ~/.ssh/config as a workaround I managed to get this working. Relevant ssh-config snippet:

Host c2
    Hostname 192.168.122.16
    User root
    Port 22
    Identityfile ~/.ssh/id_rsa
    Ciphers aes192-cbc
    KexAlgorithms=+diffie-hellman-group1-sha1

Then all it was just ssh-copy-id c2 and enter the password.

To enable the use of yum, I had to swap the repos in /etc/yum.conf to the mirror where I got the iso from.

In my case, /etc/yum.conf looks like the following:

[root@localhost root]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest

[base]
name=CentOS-2 base
baseurl=http://mirror.nsc.liu.se/centos-store/2.1/i386/CentOS/

[updates]
name=CentOS-2 updates
baseurl=http://mirror.nsc.liu.se/centos-store/2.1/updates/

[extras]
name=CentOS-2 extras
baseurl=http://mirror.nsc.liu.se/centos-store/2.1/extras/

This let me update all the packages on the system to latest.

[root@localhost root]# yum -y update
Gathering package information from servers
Getting headers from: CentOS-2 base
Getting headers from: CentOS-2 extras
Getting headers from: CentOS-2 updates
Finding updated packages
Downloading needed headers
No Packages Available for Update
No actions to take

Now my Centos 2.1 VM is so secure!

Now let's enable and start httpd, because what could go wrong?

What's interesting is that the package used to be called apache, but the service was already called httpd like it is nowadays.

[root@localhost root]# service httpd start
Starting httpd:                                            [  OK  ]
[root@localhost root]# chkconfig httpd on
[root@localhost root]# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@localhost root]# httpd -v
Server version: Apache/1.3.27 (Unix)  (Red-Hat/Linux)
Server built:   Jan 16 2008 12:08:50

Here are some screenshots:

rhel 2.1 selection from virt-manager

press enter to boot the installer

installer booting

starting the package installer

install in progress

install finished

old grub screen

old boot process

apache 1.3.27

Centos 3.9

Centos 3 originally was released in 2004/03/19 as 3.1.

I grabbed both i386 and amd64 versions of 3.9 from the liu.se mirror.

The installation was a bit simpler than doing Centos 2.

To connect with SSH, I've set the following settings in ~/.ssh/config, which is a lot similar to what I have for c2:

Host c3
        Hostname 192.168.122.137
        User root
        Port 22
        Identityfile ~/.ssh/id_rsa
        Ciphers aes256-cbc
        KexAlgorithms=+diffie-hellman-group1-sha1

Afterwards, I add my SSH keys to my C3 vm with ssh-copy-id and I'm in!

There were 4 commands required to setup yum to work properly today.

First making a backup of /etc/yum.conf. This is just optional.

cp /etc/yum.conf{,.bak}

Second changing the repo urls in /etc/yum.conf to the mirror I use.

sed -i 's#mirror.centos.org/centos#mirror.nsc.liu.se/centos-store#g' /etc/yum.conf

sed -i 's#$releasever#3.9#g' /etc/yum.conf

I was surprised to see '#' to work for gnu sed 4.0.7.

Last, yum was missing a gpg key (warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 025e513b), which has to be imported:

rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-3

I also tried getting httpd working on 3.9, here's how it went.

First, the package name has changed to httpd instead of apache.

The service and chkconfig commands are the same as for 2.1.

Also, apache was at version 2.0 at this time.

However, for this VM, I forgot to add http for to be allowed during installation, so had to update the firewall:

iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
service iptables save

Compared to Centos 2, v3 didn't require a second cd to finish the installation.

A couple screenshots for Centos 3:

Centos 3 linux mascot

Centos 3 install complete

Centos 3 console

apache 2.0 on Centos 3.9

Centos 4

Using the 4.9 installation media, the installer process is better than that of 3.

To install C4, the first ISO("CentOS-4.8-x86_64-bin1of5.iso") was enough.

A couple lines of sed were required to get yum working:

cp /etc/yum.repos.d/CentOS-Base.repo{,.bak}
# uncomment mirror list
sed -i 's/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-Base.repo
# use baseurl instead
sed -i 's/#baseurl=/baseurl=/g' /etc/yum.repos.d/CentOS-Base.repo
# change centos mirror to lie.se mirr
sed -i 's#mirror.centos.org/centos/$releasever#mirror.nsc.liu.se/centos-store/4.9#g' /etc/yum.repos.d/CentOS-Base.repo

Getting httpd to run was the same process as it was for CentOS 3.

[root@localhost ~]# chkconfig httpd on
[root@localhost ~]# service httpd start
Starting httpd:                                            [  OK  ]
[root@localhost ~]# httpd -v
Server version: Apache/2.0.52
Server built:   Oct 20 2011 14:31:42

Screenshots:

Centos 4 installer first screen

Centos 4 installer

Centos 4 grub

Centos 4 booting

Centos 4 EOL message

Centos 4 httpd welcome page

links

social