[HOWTO] Install CentOS on a remote server through VNC

Status
Not open for further replies.

coldabhishek

Active Member
705
2009
24
0
It is actually very simple to do, but this is how…

Execute these commands :

Code:
mkdir /cleaninstall
cd /cleaninstall

For 32-bit CentOS:

Code:
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/images/pxeboot/initrd.img

wget http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/images/pxeboot/vmlinuz

For 64-bit CentOS:

Code:
wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/initrd.img

wget http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/images/pxeboot/vmlinuz

Then copy the pxe boot files to the /boot partition

Code:
cp vmlinuz /boot/vmlinuz.cent.pxe
cp initrd.img /boot/initrd.img.cent.pxe
Install grub bootloader:

Code:
yum install grub

Edit the bootloader file:

Code:
 nano -w /boot/grub/menu.lst

Paste this in the bootloader file:

For 32-bit CentOS:

Code:
default 0
timeout 30
title Centos Install (PXE)
        root (hd0,0)
        kernel /boot/vmlinuz.cent.pxe vnc vncpassword=YOURPASSWORD headless ip=IPADDR netmask=255.255.255.0 gateway=GATEWAY dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/ lang=en_US keymap=us
        initrd /boot/initrd.img.cent.pxe

For 64-Bit CentOS:

Code:
default 0
timeout 30
title Centos Install (PXE)
        root (hd0,0)
        kernel /boot/vmlinuz.cent.pxe vnc vncpassword=YOURPASSWORD headless ip=IPADDR netmask=255.255.255.0 gateway=GATEWAY dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/i386/ lang=en_US keymap=us
        initrd /boot/initrd.img.cent.pxe

Replace:

YOURPASSWORD = A password of your choice, this is a a temporary password and is only used during the installation via VNC
IPADDR = The main IP address of your server
GATEWAY = The gateway IP address of your server

You can see the gateway ip by issuing:

Code:
route -n |grep UG

Once you have done all this save the bootloader file.

Next we need to install GRUB into the MBR of the server's disk

Code:
grub-install /dev/sda
grub-install --recheck /dev/sda

Once that’s done, we need to reboot the box:

Code:
shutdown -r now

Wait a couple of minutes for the server to come back online (you can monitor it using ping requests). Once the server is contactable again fire up a VNC client and in the connection box type in the IP address of your server followed by “:1″, for example, if your IP was 192.168.0.5, the VNC connection box will read 192.168.0.5:1

Enter the password you specified as and you will be presented a VNC window at the first step of the CentOS installation screen.

20986211xq2.png


Follow the installer (make sure you leave the network options alone – for now at least). After the installation completes and reboots, you now have a PROPER CentOS installation.
 
7 comments
32 or 64 doesn't make any difference when pasting in the bootloader file.

I think it should look like this for the 64 bits version:

default 0
timeout 30
title Centos Install (PXE)
root (hd0,0)
kernel /boot/vmlinuz.cent.pxe vnc vncpassword=YOURPASSWORD headless ip=IPADDR netmask=255.255.255.0 gateway=GATEWAY dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5/os/x86_64/ lang=en_US keymap=us
initrd /boot/initrd.img.cent.pxe
 
could u pls clear the doubts.

what kind a install is this. clean install of centos 5.4 from Centos older versions ?

every datacenter gives latest centos installed. then why u want to install it. without CentOS or a linux or windows with vncserver in it u cant start a vnc installtion.

so there is no advantage of this install. just email data center and tell them to install. all the additional things etc can be installed from shell.
 
could u pls clear the doubts.

what kind a install is this. clean install of centos 5.4 from Centos older versions ?

every datacenter gives latest centos installed. then why u want to install it. without CentOS or a linux or windows with vncserver in it u cant start a vnc installtion.

so there is no advantage of this install. just email data center and tell them to install. all the additional things etc can be installed from shell.

If the datacenter is using a customized kernel which limits you in installing some software on the server you might want to make use of the stock OS which doesn't have these limits.
 
Status
Not open for further replies.
Back
Top