ramblings of an IT professional
CentOS
Install Yum on minimal CentOS
Jul 5th
Hello all!
I ran into an interesting issue with a “minimal” CentOS installation and had to help a colleague install Yum on a server where only rpm existed. Here’s the final RPM line I used:
rpm -Uvh http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/rpm-python-4.4.2.3-22.el5.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/rpm-4.4.2.3-22.el5.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/rpm-libs-4.4.2.3-22.el5.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/popt-1.10.2.3-22.el5.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/m2crypto-0.16-8.el5.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/libxml2-2.6.26-2.1.12.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/logrotate-3.7.4-12.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/expat-1.95.8-8.3.el5_5.3.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/nss-3.12.8-4.el5_6.x86_64.rpm http://mirror.centos.org/centos/5/os/x86_64/CentOS/nspr-4.8.6-1.el5_5.x86_64.rpm
This should install Yum and all the required depedancies for CentOS 5 x86_64 (at the time of this writing). Once this is ran, yum should be available to install any other software needed.
OpenSSH won’t start
Jun 18th
I ran into an issue with OpenSSH Server would not start after fresh installation of it on a minimal CentOS 5 x86_64 VPS:
[root@vps ~]# /etc/init.d/sshd restart Stopping sshd: [FAILED] Generating SSH1 RSA host key: [FAILED]
I delved a little further and discovered that ssh-keygen was failing:
[root@vps ~]# ssh-keygen cannot read from /dev/urandom, No such file or directory
And finally, from there, I generated the urandom file:
/sbin/MAKEDEV urandom
Also, to ensure on restarts the urandom file (as well as pty and tty) are created, I added the following to /etc/rc.d/rc.local:
/sbin/MAKEDEV pty /sbin/MAKEDEV tty /sbin/MAKEDEV urandom
Hopefully this helps if you run into a similar issue down the line!