Let's do a clean install of Scientific Linux 4.7 under VMWare Server.
Create the VM
- Choose VM type:
- OS RedHat Enterprise Linux 4 32bit
- VM type 6
- RAM 512MB
- 2 Processors (so that SMP kernel gets installed)
- make a 12 GB HD disk
- as IDE0, so that I can easily port the VM to VirtualBox
- choose "fast mode", we'll change it later for CEs
- network type bridged
- no floppy
- no usb
The WMware Server webaccess console does not support OsX yet and has also trouble with SL4. But there is a workaround: use the (mostly undocumented) VNC server inside VMWare!
From http://communities.vmware.com/thread/135874: add in the .vmx file
remotedisplay.vnc.enabled= "TRUE"
remotedisplay.vnc.port = <aport number maybe 5901 or 5902>
remotedisplay.vnc.password = <apasswordofyourchoosing>
then open a tunnel, like ssh -L 5901:localhost:5901 gridvm, and connect your VNC client (like JollyFastVNC) to localhost port 5901. And boot your server via the WMware webaccess interface.
Install Linux
- Connect the ISO image of SL47 disc1
- boot the VM
- start "linux text" (with my VNC the mouse does not work)
- choose Custom
- custom partitions
- make an ext3 / expandable
- make a swap of ~1GB
- no /boot
- Set SELinux disabled
- System clock uses UTC
- Packages: you MUST disable everything except
- YUM
- Text-based Internet
- Development Tools (only for UIs)
- X Software Development (only for UIs)
- Total package install size should be 1,340MB (on SL4.7)
Configure
cfgsync
- Login as root and run
ssh localhost to create the .ssh directory
- copy the main configurations from gridvm
- this includes many basic configurations
- restart network (
ifdown eth0; ifup eth0)
- update the system
yum update
- install gcc:
yum install gcc
- power off
- switch to one CPU
- restart
- login via SSH
install various utilities
yum -y install screen mc net-snmp subversion emacs yum-versionlock
Configure NIS
add new host in gridvm:/etc/hosts.allow and sudo service xinetd reload
add domain in /etc/sysconfig/network
NISDOMAIN=ujcluster
on host
chkconfig ypbind on
domainname ujcluster
service ypbind start
NTP
yum install -y ntp
chkconfig ntpd on
service ntpd start
Configure NFS
cd /etc/
./fstabmerge fstab.UInfs
mkdir -p /nfs/home
mkdir -p /nfs/data
mkdir -p /nfs/osg
mkdir -p /nfs/glite
mkdir -p /nfs/spool_pbs
mount -a
SMTP
yum -y localinstall /nfs/data/PKG/ssmtp-2.61-11.1.el4.i386.rpm
yum -y remove sendmail
VMWare tools
yum -y localinstall /nfs/data/PKG/VMwareTools-2.0.0-122956.i386.rpm
/usr/bin/vmware-config-tools.pl
disable unnecessary/unwanted services
chkconfig cups off
chkconfig isdn off
chkconfig pcmcia off
chkconfig NetworkManager off
chkconfig bluetooth off
chkconfig nfslock off
chkconfig rawdevices off
chkconfig rpcgssd off
chkconfig cpuspeed off
chkconfig gpm off
Misc config
- remove the
HWADDR line from /etc/sysconfig/network-scripts/ifcfg-eth0
- configure SUDO
visudo
Prepare new servers
- Run yum update on the clean image.
- power off
- take a new VM snapshot
- copy the new image
cd /VMs
sudo cp -r CleanSl47_386 glite-ui_i386
- check VNC ports already in use:
grep vnc.port .*/*.vmx
- rename vmx:
mv CleanSl47_386.vmx glite-ui_386.vmx
- change in
glite-ui_386.vmx:
displayName = "glite-ui_386"
remotedisplay.vnc.port = "5905"
ethernet0.generatedAddress = ""
#RemoteDisplay.vnc.key
- from the VMware interface, "Virtual Machine/Add Virtual Machine to Inventory"
- re-connect the hard disk
- boot the image
- connect via VNC
- change the IP address in
/etc/sysconfig/network-scripts/ifcfg-eth0
- restart all networking:
telinit2; telinit 3