How to re-install Centos yourself remotely

NOTE: This is only for Dedicated Servers. All VPS, go to client area.

Assuming you currently have a Centos 5 64-bit that was installed by us (if you have or want 32-bit, set/use 32-bit accordingly).

Below will reinstall to Centos 5.6 64-bit, change it accordingly if you want other versions of centos.

1. SSH to your server and login as root

2. Type below:

mkdir /centos_install
cd /centos_install
wget http://vault.centos.org/5.6/os/x86_64/images/pxeboot/initrd.img
wget http://vault.centos.org/5.6/os/x86_64/images/pxeboot/vmlinuz
cp vmlinuz /boot/vmlinuz.cent.pxe
cp initrd.img /boot/initrd.img.cent.pxe
 
3. Add to/Edit the grub menu.lst entry to load the pxe kernel (note: if you were already using grub you do not need to type again the first 2 lines)
 
nano -w /etc/grub.conf

in that file paste this in BETWEEN "hiddenmenu" and "title CentOS..." (IMPORTANT):
title Centos Install (PXE)
root (hd0,0)
kernel /vmlinuz.cent.pxe vnc vncpassword=YOURPSW headless ip=YOURIP netmask=255.255.255.0 gateway=GATEWAYIP dns=8.8.8.8 ksdevice=eth0 method=http://vault.centos.org/5.6/os/x86_64/ lang=en_US keymap=us
initrd /initrd.img.cent.pxe
 
replace
YOURPSW with the VNC password you want setup
YOURIP with the ip of the box…
GATEWAYIP with the gateway assigned to your box
(hd0,0) match it with what you see on the existing kernel, some server may use (hd1,0)
 
 
Hint: you can see the gateway ip by issuing
route -n | grep UG
once you have done this you need to count the number of times “title” appears in the file, press ctrl +x, and save the file
 
4. Reboot the server by typing 
 
reboot
 
5. Assuming above is done correctly, you can then use vncviewer (download from realvnc.com) and connect to YOURIPHERE:1
And password is whatever you set above.
 
For Centos 6.5 64-bit, FIRST make sure you can go to http://mirror.teklinks.com/centos/6.5/ then you can use this:
mkdir /centos_install
cd /centos_install
wget http://mirror.teklinks.com/centos/6.5/os/x86_64/images/pxeboot/initrd.img
wget http://mirror.teklinks.com/centos/6.5/os/x86_64/images/pxeboot/vmlinuz
cp vmlinuz /boot/vmlinuz.cent.pxe
cp initrd.img /boot/initrd.img.cent.pxe

title Centos Install (PXE)
root (hd0,0)
kernel /vmlinuz.cent.pxe vnc vncpassword=YOURPASS headless ip=YOURIP netmask=255.255.255.0 gateway=YOURGATEWAY dns=8.8.8.8 ksdevice=eth0 method=http://mirror.teklinks.com/centos/6.5/os/x86_64/ lang=en_US keymap=us
initrd /initrd.img.cent.pxe

آیا این پاسخ به شما کمک کرد؟

 پرینت این مقاله

در همین زمینه

Hypervm Xen Windows VPS Network not showing 1Gbps

If you're running HyperVM Xen VPS and your Windows vm somehow not showing 1Gbps port, only...

How to install lm_sensors on XenServer

This is tested on Xenserver 6, may also work on other similar OS 1. ssh to server as root 2....

Hints on Creating Windows KVM Templates

Templating Windows is a fairly easy process for KVM. All versions of windows can be resized by...

How to change cPanel password from command line?

cPanel password of a domain can be changed from command line using cPanel script. Given below are...

How to reboot a unix server via telnet?

Using a telnet program like http://www.telnet98.com/ or SSH Client like putty (for windows),...