Update: I have created a CentOS 2 virtual machine image for
VirtualBox which is available for download
I’ve created a VMWare image of a RedHat 7.2 operating system. I need one for compiling and testing programs since a cluster that I sometimes use runs this aging OS, and programs that I compile on my Ubuntu laptop or the Fedora Core 6 server at the lab don’t work properly on that system.
I would love to redistribute the base image for other people who might require it but unfortunately Red Hat’s trademark protection policy prevents this. I don’t have time to go through the image and remove all the trademark-covered files, so here’s a quick guide to getting a useful system in a short time. By useful, I mean with Subversion, GSL and Boost libraries.
- Download the Red Hat 7.2 “enigma” ISOs. These are available, currently, at a few mirror sites, but here a link to cd1 and cd2.
- Download and install the free-as-in-beer VMWare Player (unless you have bought VMWare Workstation or similar). In Ubuntu this is as easy as
apt-get install vmware-player
. - Create a VMWare config file, also known as a “.vmx” file. I used the fantastic Easy VMX to help with mine. I added two virtual CDROM drives which I used to mount the two Red Hat ISOs. You can download my own vmx file which shows how to do this. Note also that you should use the ‘vlance’ virtual network card since the virtual Intel card didn’t work automatically in Red Hat 7.2 for me.
- Create (or download from Easy VMX) a virtual hard disk file. Using qemu-img this is as easy as
qemu-img create -f vmdk redhat72.vmdk 10G
. - Start the virtual machine, with the ISO images mounted as virtual CDROM drives.
- Proceed with the installation, which is pretty straightforward. I chose the “workstation” installation option, with the “development” packages selected. I also added ‘screen’, ‘sudo’ and ‘openssh-server’ packages.
- After installation, I had a virtual machine with a working network, taking up about 1.7GB of disk space in total.
Install Subversion
I really need the Subversion revision control system, which was not included in the original Red Hat 7.2 packages since it was a young project at the time. Luckily there are reasonably recent third-party packages available, since it has a few dependencies that make compiling it from source non-trivial. From that repository, download and install at least the apache-libapr, db4, libxml2, neon, subversion and zlib packages. The zlib, libxml2 and db4 packages will be an upgrade to the original Red Hat packages, so use, e.g. rpm -U zlib-1.1.4-0.1.i386.rpm
to install. You may also require the -devel packages too, depending on your needs.
Install GCC 3.4.6
Red Hat 7.2 came by default with GCC 2.96 installed, an unofficial fork of GCC that was quite controversial and broke binary compatibility with other versions of GCC. It also included GCC v3.0.2, which as an early version of GCC 3.x was not perfect, but is better. I chose to install both of the GCC versions, with the v3.0.2 being installed to “/usr/bin/gcc3”.
My own software uses parts of the Boost libraries and I found that Boost does not compile with GCC 3.0.2. The quickest way around this was to install a later version of GCC, and the latest version of GCC v3.X is 3.4.6. Luckily, that is really easy to do…
- Download GCC 3.4.6
./configure
make
make install
The new compiler will be installed at /usr/local/bin/gcc and will be used by default since /usr/local/bin is in the $PATH before /usr/bin in this OS.
Installing Boost
In my case, I only need boost_filesystem, but this should work for all of Boost if necessary. As noted above, I installed GCC v3.4 from source since Boost failed to build with GCC v3.0.2
- Download Boost (the latest version, 3.4.1, worked fine)
./configure --with-libraries=filesystem
make
(will build the ‘jam’ build tool first, then boost_filesystem)make install
(installs boost_filesystem, also most of the header-only libraires).
Installing Gnu Scientific Library
The latest version of GSL (v1.9) compiles and installs easily with either GCC 3.0.2 or GCC 3.4.6. I didn’t try it with v2.96.
The Final Product
I wish I could provide a download link to my virtual machine, but if you follow these instructions it will only take a couple of hours to reproduce it. With the source directories of the software I installed, the total size of the image is 2GB, although the actual disk usage shows less than that.
12 replies on “Creating a RedHat 7.2 VMWare Image”
I can get the Red Hat .iso image to boot but when I get to the point where Disk Druid asks for a Partition I can’t get the “Next” button to become active. The only thing I can see that might be a problem is the Device namd in the Partitions section only allow me to select hda1 when the only device I have is hda.
I am stuck.
I’m not sure what the problem is. I just tried again with my vmx file (linked above) and a fresh disk image created using the command in step 4. The installation started fine, and either Manual partion or Automatic partition worked, allowing me to proceed to package selection.
Here’s a screenshot of the Disk Druid screen. For manual partition, click on ‘Free’ then ‘New’ to create partitions. You should make at least a swap partition and a root partition.
It appears that the smaller disk size that EasyVMX allows you to create (such as 650) will not allow RedHat to auto partition. Once I created a package using 4.7 GB RedHat would allow partitioning.
I like the concept of keeping your virtual hard drive to the size of a CD-ROM for backing up but it simply will not work.
[…] my adventures with RedHat 7.2 in VMWare, I decided to make a redistributable VM that was more or less compatible. The main reason is that […]
I came for the Subversion on Redhat 7.2 instructions, which worked well. Thanks.
Have you considered making multiple vhds for /boot, /usr, /home, /tmp, swap, et al? Then you can easily reclaim some real hd space, perhaps.
@piyo: You can absolutely do this, it would certainly offer flexibility in HD space. But in general since the VHDs grow as required, it’s not going to get you much unless you are filling the VHDs. You can always add extra VHDs later and mount them as /home or whatever.
Hi,
It may be off topic but I had to install Xubuntu 7.04 on an very old PC ( P3 500 Mhz and only 62 Mo of RAM).
I had to install only command line and after fluxbox but it’s not user friendly for whom has never used linux!
Can an old red hat 7.2 be used on the internet and can it be upgraded online?
I will read the doc on yum (I’m using apt-get on ubuntu).
Or can you give me a link for a red hat newbye?
Did u get the X window?. I’ve failed to configure on Virtual box.
Yamo: I can’t recommend running an old OS for day-to-day usage. RH7.2 was supported even after the official end-of-life by the Fedora Legacy project but it isn’t supported any more, so there will be security vulnerabilities in it and you won’t be able to use the latest software.
On the other hand once software becomes really old, most malware won’t be designed to attack it (since no-one uses it.) Especially on a laptop (as opposed to a server). However you will still be dealing with really crusty software (e.g. what web browser does RH7 have?)
You can install Yum, you’ll have to get it off the CD or download it, then point it to the least-outdated repository, such as this mirror: http://limestone.uoregon.edu/ftp/fedoralegacy/redhat/7.2/
Ihsan: I didn’t even try to get X running – I used this image for compiling some software I need to run on a RH7 cluster. I just used the console interface for that. You can probably get X to run using the vesa driver (VirtualBox has a vesa-compatible driver).
Hi,
I have downloaded vmware server 2.0 and installed redhat 7.2. there seems to be problem in running X Server. But that is ok for me.
Problem i am facing is that network is not working. we want to set static ip address and provide our name server, gateway ip addresses.
There seems to be some problem. we have set the values properly using netconfig command, but it is not working.
Similar thing is working fine in fedora core 10 or the redhat advanced server version of the linux.
Could you please suggest me what can i do to get this fixed.
we need redhat 7.2 because we needed that particular version of gcc for our application.
Thanks
Harinath
Just in case anyone is wanting to run RH7.2 on vmware with X, here is how to do it. I am posting this here because when I tried to do this I came to this website and found no answer.
To get X working it is necessary to go to http://www.xfree86.org and download an updated version of the X server, which has the vmware driver included. This removes the need to use the video driver included in the vmware tools (which has problems).
I downloaded version 4.4.0, built it and installed it according to the provided instructions, and it works perfectly.
Andy