Install MC (Midnight Commander) on RHEL3/Centos3
After writing my previous post “Mc (GNU Midnight Commander) missing?” I have received many requests to explain how this can be done on RHEL3. To respond to these requests here is some short information on how you can install MC on RHEL3 and corresponding clones (like Centos3 for ex.).
The thing is that RedHat have forgotten to include MC in RHEL3, so the installation can’t be done using the regular repositories as shown in “Mc (GNU Midnight Commander) missing?”. In order to do this we have two choices:
- build a compatible package ourselves. Do this if you are comfortable rebuilding rpm packages from rpm sources and you don’t like to install any packages from un-trusted 3rd party sources. The disadvantage will be that in case of any security updates, you will need to do this again with the updated package (and also to keep track of this).
- install a pre-build rpm for RHEL3 compiled by someone else. Much faster and easier. Just download the compiled rpm and install it and you are set. The rpm’s I will recommend are maintained by Milan Kerslager and I have been using them myself without any problems. Milan Kerslager also provides a yum/up2date repository so you can keep your package automatically updated.
I will show you both methods so you can use whatever suits best in your case:
Build a compatible package
If you want to build the package yourself then just get the source rpm from some of the latest usable Fedora repositories. For example at the time I wrote this FC4 has available in the updated sources: mc-4.6.1a-5.fc4.src.rpm Download it and install it:
rpm -ivh mc-4.6.1a-5.fc4.src.rpm
Then rebuild it:
cd /usr/src/redhat/SPECS
rpmbuild -ba mc.spec
And install the resulting rpm:
rpm -ivh /usr/src/redhat/RPMS/i386/mc-4.6.1a-5.fc4.i386.rpm
Note: depending from your installation you might need to install the dependent packages for rebuild firs (glib2-devel, e2fsprogs-devel). Just use up2date/yum to install them.
Install a pre-build rpm for RHEL3
In case you don’t want to complicate yourself you can just use the rpm’s build by Milan Kerslager. He provides a great job also keeping some other rpm’s available that you might want to check out. You can either add his repository to your yum/up2date sources and:
up2date mc
or you can download the package manually and install it. http://ftp.linux.cz/pub/linux/people/milan_kerslager/RHEL-3/stable/ Locate the MC package, download it using wget and install it as any rpm package:
rpm -ivh mc-4.6.1a-4.ker.rhel3.i386.rpm
as an example with the version available while writing this.
As a shortcut you can install it without saving the file with one command:
rpm -ivh http://ftp.linux.cz/pub/linux/people/milan_kerslager/RHEL-3/\\
stable/mc-4.6.1a-4.ker.rhel3.i386.rpm
Since Milan Kerslager provides only rpm’s for i386, in case you will need this for a different architecture, you will have to build your own compatible rpm for RHEL3.