全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2042|回复: 9
打印 上一主题 下一主题

[疑问] How to re-install Centos yourself remotely

[复制链接]
跳转到指定楼层
1#
发表于 2012-2-27 21:30:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 ㄒiger 于 2012-2-27 21:30 编辑

  大牛们 告诉下。这个必须服务器支持啥可以正常运行。。



sentris的机器。我正在重装..好像可以  ~~~~.. VPS的不知道行不行。。。


456.jpg (93.08 KB, 下载次数: 0)


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.pxe3. 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
     

     
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.2 64-bit, you can use this:
   

   
mkdir /centos_install
cd /centos_install
wget http://linux.mirrors.es.net/centos/6.2/os/x86_64/images/pxeboot/initrd.img
wget http://linux.mirrors.es.net/centos/6.2/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=YOURPSW headless ip=YOURIP netmask=255.255.255.0 gateway=GATEWAYIP dns=8.8.8.8 ksdevice=eth0 method=http://linux.mirrors.es.net/centos/6.2/os/x86_64/ lang=en_US keymap=us
initrd /initrd.img.cent.pxe
  
   


相关帖子

2#
发表于 2012-2-27 21:32:15 | 只看该作者
作为二楼.我深感责任重大.要是我不回复..楼主还以为自己玩的是单机版的主机论坛,另外.我要摸摸4楼的狗头,我之所以不摸3楼的.是因为怕有孙子跟我抢2楼.一不小心就摸了自己.
3#
发表于 2012-2-27 21:32:59 来自手机 | 只看该作者
3楼
。。。。
4#
发表于 2012-2-27 22:04:47 | 只看该作者
没有ipmi/kvm的吗
5#
发表于 2012-2-27 22:05:35 | 只看该作者
去申请ipmi试试。。。
6#
 楼主| 发表于 2012-2-27 22:06:19 | 只看该作者
guaku 发表于 2012-2-27 22:04
没有ipmi/kvm的吗

  没 我这样都重装好了。。
7#
发表于 2012-2-27 22:12:55 | 只看该作者
winder 发表于 2012-2-27 21:32
作为二楼.我深感责任重大.要是我不回复..楼主还以为自己玩的是单机版的主机论坛,另外.我要摸摸4楼的狗头,我 ...

经典
8#
发表于 2012-2-27 22:43:39 | 只看该作者
这个教程基本所以的机房都支持,包括在本地。
但是,路径一定一定一定要写对,不然。。。。
9#
 楼主| 发表于 2012-2-27 22:44:54 | 只看该作者
qingniancom 发表于 2012-2-27 22:43
这个教程基本所以的机房都支持,包括在本地。
但是,路径一定一定一定要写对,不然。。。。 ...

我的对了  现在在折腾中。。
10#
发表于 2012-2-27 23:02:13 | 只看该作者
ㄒiger 发表于 2012-2-27 22:44
我的对了  现在在折腾中。。

kvm架构和xen-hvm架构的vps也可以这么做,之前试验成功。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-4-13 22:23 , Processed in 0.076536 second(s), 16 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表