xiaowuhello
linux下的无盘工作站配置(centos)
展开Biu

linux下的无盘工作站配置(centos)

需求:需要多个系统同运行同样的服务,如j2ee模块、memcached等,这些服务不与硬盘相关,只运行在内存中,并且多个系统同时运行,为了规避单点故障以及实现高效。

下面步骤是centos5.4系统的无盘服务端配置步骤,客户端只要选择从网络启动,即可在无干预情况下启动系统。

一,新建主要目录

mkdir -p /diskless/x86_64/centos5.4/root

mkdir /diskless/x86_64/centos5.4/snapshot

二,拷贝预置模板到/diskless/x86_64/centos5.4/root目录

rsync -auv -e ssh --delete --exclude='/proc/*' --exclude='/sys/*' --exclude='/tmp/*'--exclude='/var/log/*' root@10.0.70.72:/ /diskless/x86_64/centos5.4/root/

三,配置所需tftp服务

yum -y install tftp tftp-server

yum -y install busybox

vi /etc/xinetd/tftp

diskable=no

chkconfig --level 345 xinetd on

chkconfig --level 345 tftp on

service xinetd start

四,配置dhcp服务

yum -y install dhcp-server

chkconfig --level 345 dhcpd on

vi /etc/dhcpd.conf

allow booting;

allow bootp;

class "pxeclients" {

match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";

next-server <server-ip>;

filename "linux-install/pxelinux.0";

}

service dhcpd start

五,配置nfs服务

yum -y install portmap nfs

vi /etc/exports

/diskless/x86_64/centos5.4/root *(ro,sync,no_root_squash)

/diskless/x86_64/centos5.4/snapshot/ *(rw,sync,no_root_squash)

service portmap start

service nfs start

六,利用桌面工具配置服务端

大致步骤如下:打开“Network Booting Tool “ ,选择添加无盘,配置nfs地址以及目录。

If starting the Network Booting Tool for the first time, select Diskless from the First Time Druid. Otherwise, select Configure => Diskless from the pull-down menu, and then click Add.

A wizard appears to step you through the process:

1、Click Forward on the first page.

2、On the Diskless Identifier page, enter a Name and Description for the diskless environment. Click Forward.

3、Enter the IP address or domain name of the NFS server configured in Section 4.3 Configuring the NFS Server as well as the directory exported as the diskless environment. Click Forward.

4、The kernel versions installed in the diskless environment are listed. Select the kernel version to boot on the diskless system.

5、Click Apply to finish the configuration.

七,添加无盘工作站节点

即配置无盘节点的镜像版本和网络接口。

1、Hostname or IP Address/Subnet — Specify the hostname or IP address of a system to add it as a host for the diskless environment. Enter a subnet to specify a group of systems.

2、Operating SystemSelect the diskless environment for the host or subnet of hosts.

3、Serial Console — Select this checkbox to perform a serial installation.

4、Snapshot name — Provide a subdirectory name to be used to store all of the read/write content for the host.

5、Ethernet — Select the Ethernet device on the host to use to mount the diskless environment. If the host only has one Ethernet card, select eth0.

[查看全文]
xiaowuhello
Linux无盘工作站的做法(debian)
展开Biu

Linux无盘工作站的做法(debian)一、远程启动原理

客户端在启动前,既无操作系统,又无启动的软盘或者硬盘,它只有计算机的基本部件: CPU, 内存,主板等。但最重要的必须有网卡和启动的BootRom。客户机只能通过网络获得操作系统。Linux的无盘远程启动与Novell、WinNT下的无盘启动技术不一样,不是采用RPL( Remote Initial Program Loader),而是基于标准的BootP/DHCP和TFTP协议,并通过NFS文件系统建立文件系统。相对前两种,更具有其通用性和适应性。可以基于Linux系统远程启动Dos,Win95,WinNT和Linux客户。

由于自己的网卡(3c905b-tpo100,有BUG,按照etherboot的说明没修正成功,现在是用软盘代替网卡的EPROM,不好多说,还请自己直接到http://sourceforge.net/下载所需要源码等或者编译自己所需要源码.

下面简单介绍Linux启动原理:

1.客户端个人电脑开机后, 在 TCP/IP Bootrom 获得控制权之前先做自我测试.

2.Bootprom 送出 BOOTP/DHCP 要求而取得 IP.

3.如果服务器收到个人电脑所送出的要求, 就会送回 BOOTP/DHCP 回应,内容包括客户端的 IP 地址, 预设网关及开机影像文件.否则, 服务器会忽略这个要求.

4.Bootprom 由 TFTP 通讯协议从服务器下载开机影像文件。

5.个人电脑通过这个开机影像文件开机, 这个开机文件可以只是单纯的开机程式也可以是操作系统.

6.开机影像文件将包含 kernel loader 及压缩过的 kernel, 此 kernel 将支持NFS root系统。

7.远程客户端根据下载的文件启动机器.

一切OK!!! 简单吧!好用吧!下面具体介绍如何建立Linux远程启动.

二、远程启动实例

作为例子定义以下:

Linux 服务器: server(IP:192.168.0.254)

第一个客户机:pc01(IP:192.168.0.1)

第二个客户机:pc02(IP:192.168.0.2)

所有远程启动客户目录:/client

第一个远程启动客户机目录:/client/pc01

第二个远程启动客户机目录:/client/pc02

支持rsh

首先重新编译Linux内核。

make menuconfig

注意网络的支持,NFS-Root 支持,BootP(DHCP) 的支持必须包括在内。

make clean

make dep

make bzImage

make modules

make modules_install

以上命令之后,你会发现客户端启动的影像文件在 /usr/src/linux/i386/boot 目录中,编译出新内核之后,用 mknbi-linux(mknbi-linux bzImage vmlinuz.nb)处理,将vmlinuz.nb 放在/tftpboot下即可。

然后执行以下命令:mknod /dev/nfsroot b 0 255 修改启动设备,让其指向NFSRoot.

下面为远程客户机修改服务器,用于建立远程客户机的文件系统。

在服务器/etc/exports 中加入:

/client/pc01 192.168.0.1(rw, no_root_squash)

/client/pc02 192.168.0.2(rw, no_root_squash)

/home 192.168.0.1/255.255.255.0(rw,no_root_squash)

使用DHCP,在/etc/dhcpd.conf 加入对远程客户的支持,其中server地址是192.168.0.254:

# dhcpd.conf

# Global options

option domain-name "server.ustc.edu.cn";

option domain-name-servers 202.38.64.1;

# Intranet

subnet 192.168.0.0 netmask 255.255.255.0 {

range 192.168.0.1 192.168.0.250;

default-lease-time -1;

# option root-path "/client/pc01";

option dhcp-server-identifier 192.168.0.254;

option broadcast-address 192.168.0.255;

# option routers 198.168.0.254;

server-name "server";

next-server 192.168.0.254;

filename "/boot/vmlinuz";

host pc01{

option root-path "/client/pc01";

hardware ethernet 00:01:02:96:65:92;

fixed-address 192.168.0.1;

}

host pc02{

option root-path "/client/pc02";

hardware ethernet 00:01:02:98:92:55;

fixed-address 192.168.0.2;

}

}

subnet 202.38.64.0 netmask 255.255.255.0 {

}

请参阅:DHCP-Howto

在服务器上建立远程客户机目录:

/client

/client/pc01

/client/pc02

下面说一下pc01的做法.

pc01目录下包括:bin,dev,etc,home,lib,mnt,proc,root,sbin,tmp,usr,var目录。

我们是把bin,dev,etc,lib,sbin,usr,var直接完全复制过来,home,mnt,proc,root,tmp是新建的空目录,(当时是重新安装了一个包括DHCP,NFS,RSH等支持的尽量小、尽量干净的Linux,然后完全将它们完全复制过来,这样一来必然有很多不必要的东西可以删除,可惜现在水平不照,按参考文献做不成功,只好用了这种省事的法子:(,等以后慢慢删除不必要的文件)

注意必须修改/client/pc01/etc/rc.d 启动文件:改 mount -avt nonfs 为 mount -av.允许使用NFS Root文件系统。(我们的是Debian Woody,这个文件变为了/client/pc01/etc/init.d/mountall.sh,并且我们的是mount -a -t noproc,nosmbfs )

以如下格式修改/client/pc01/etc/fstab文件:

192.168.0.254:/client/pc01 / nfs defaults,rw 0 0

192.168.0.254:/home /home nfs rw,bg 0 0

proc /proc proc defaults 0 0

修改client/pc01/etc/hostname:

pc01

修改client/pc01/etc/hosts:

127.0.0.1 localhost

192.168.0.254 pc00

192.168.0.1 pc01

192.168.0.2 pc02

修改client/pc01/etc/hosts.equiv:

+

server

pc01

pc02

修改client/pc01/etc/mtab:

192.168.0.254:/client/pc01 / nfs rw 0 0

proc /proc proc rw 0 0

devpts /dev/pts devpts rw,gid=5,mode=620 0 0

192.168.0.254:/home /home nfs rw,bg,addr=192.168.0.254 0 0

修改client/pc01/etc/network/interfaces

face eth0 inet static

address 192.168.0.1

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

gateway 192.168.0.254

接下来必须建立一个链,将远程客户机的IP地址链接到/client/pc01目录。

$:ln -s pc01 192.168.0.1

做pc02则可以复制pc01过来,并将上述几个文件修改一下.

下面在个人目录下设置rsh支持:

home/username/.rhosts

192.168.0.254 username

192.168.0.1 username

192.168.0.2 username

最后请确认服务器上的nfsd,tftpd 和 bootpd daemons是否启动。

一切完事!远程启动很快十秒钟左右就可享用Linux.

关于NFS,TFTP,BOOTP(DHCP)的设置请参阅How-to.

一点经验之谈, 最好把client的所有文件放在一个独立分区里面,这样就可以在这给分区里装上一个基本的系统(就像普通的安装一样).然后作为修改的基础(建议使用Debian,比较易于裁剪). 如果以后需要在客户端安装什么软件的话,可以这样做:

chroot /client/pc01

dselect或者apt -get

<

[查看全文]
xiaowuhello
xiaowuhello
解除网吧IE禁止下载的限制.BAT
展开Biu

解除IE禁止下载的限制解除网吧IE禁止下载的限制.BAT

把下面的红色文本保存为解除IE禁止下载的限制.BAT

然后运行就可以了

@title 解除IE禁止下载的限制

@echo off

@color c

@echo QQ:343977947正在为你解除IE禁止下载 请稍后......

@echo

reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v 1803 /t reg_dword /d 00000000 /f >nul

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v 1803 /t reg_dword /d 00000000 /f >nul

本内容已隐藏,回复后刷新可见哦

[查看全文]
lanyanlei
最精确的硬盘整数分区方法
展开Biu

本内容已隐藏,回复后刷新可见哦

[查看全文]
xiaowuhello
安装Linux无盘工作站
展开Biu

安装Linux无盘工作站(1)

安装Linux无盘工作站

其实Linux 对远程引导的支持非常好,Linnx内核自身又支持网络文件系统,因此非常适合做无盘工作站,本文将以一个实例向大家详细介绍无盘Linux工作站的安装办法。

当年Novell下的无盘DOS工作站很是流行,后来又流行过Win95无盘工作站,只是由于问题多多,后来微软自己停止了对无盘Windows的支持。随着Linux的日益流行,使用Linux的人越来越多,其实Linux 对远程引导的支持非常好,Linnx内核自身又支持网络文件系统,因此非常适合做无盘工作站,本文将以一个实例向大家详细介绍无盘Linux工作站的安装办法。

这个网络是一个小的局域网,有1台服务器和4台 Linux 无盘工作站,彼此之间用双绞线通过HUB连接,服务器的IP地址定为192.168.0.80 ,名字是server ,5台无盘工作站的地址由服务器动态分配,地址范围从 192.168.0.1 到 192.168.0.4 ,名字分别是c1,c2, c3,c4,服务器和无盘工作站使用的都是NE2000 兼容网卡,无盘工作站使用的网卡上都安 装了BOOTROM 启动芯片,服务器操作系统安装的是 RedHat Linux 6.0 ,安装时选用定制安装,并安装了全部软件。

Linux的远程引导有两种方式,一是利用Bootp协议,有一个专门的项目EtherBoot 提供支持(http://www.slug.org.au/etherboot/),这种方式引导 Linux 的速度是最快的,但这种方式有一个最大的问题,就是在市场上找不到支持这种远程引导协议的 BOOTROM 启动 芯片(除非自己刻录),因为市场上几乎所有的 BOOTROM 启动芯片都是遵循NOVELL远程引导 协议的,于是有人提出另外一种方式,就是服务器端用 NetWare 服务器,客户端就可以用现 有的BOOTROM 启动芯片了,说到这里大家一定胡涂了,作Linux无盘工作站岂不是还一台 NetWare 服务器?不是的,因为神通广大的 Linux 可以模拟 NetWare 服务器,就象Samba 可以把 Linux 模拟成 NT 一样,mars_nwe 可以把 Linux 模拟成 NetWare,不仅能提供 NetWare 文件和打印服务,还能提供远程引导支持(知道Linux的厉害了吧),本文讲述的 Linux 无盘工作站就是用这种方式作远程引导的。

准备启动盘

由于在 Linux 下没有制作符合 NetWare 远程引导协议启动映象的工具,所以只能用早期的Win95提供的工具(遗憾)。找一台装有 Win95 的机器启动后按 F8 进入纯DOS方式,格式化一张启动盘 format a: /s ,然后将RedHat Linux安装光盘上 dosutils 目录下的 loadlin.exe复制到启动盘,在启动盘上作一个 autoexec.bat 文件,代码只有一行 loadlin.exe bzImage root=/dev/nfsroot从 Windows 95 安装光盘的 Win95 目录下的cab文件中解出 rplboot.sys 文件放在启动 盘上,命令如下:

extract.exe /a /l a:\ win95-27.cab rplboot.sys

一张用来做启动映象的启动盘就作好了,保存好启动盘,以后作启动映象时会用到它。

编译内核

用于无盘工作站的Linux内核与用于从本地硬盘引导的Linux内核是不同的,无盘工作站的内核必须支持NFS作为根文件系统,即远程根文件系统,所以必须编译无盘工作站专用的内核。笔者使用的内核代码版本是2.2.16,将内核源代码解压到/usr/src下, cd /usr/src/linux 进入内核子目录,执行命令make menuconfig 进行内核编译配置,下列项目必须按要求设置:

Processor type and features  该项目下面的选项必须根据无盘工作站的CPU类型设置,而不是根据服务器的CPU类型设置

Loadable module support   该项目下面的所有选项都禁止,即不支持模块功能

Plug and Play support   设置为有效

Block devices     该项目下面的

Loopback device support

Network block device support

都设置为有效

Networking option    该项目下面的

kernel level autoconfiguration

DHCP support (NEW)

都设置为有效

Network device support   该项目下面的选项必须根据无盘工作站使用的网卡进        行设置,本例中使用的是NE2000兼容网卡,选项

Ethernet (10 or 100Mbit)

Other ISA cards

NE2000/NE1000 support (NEW)

都设置为有效

Filesystems      该项目下面的Network File Systems子项目下面的

NFS filesystem support

Root file system on NFS (NEW)

都设置为有效

以上设置完成后,退出内核编译设置程序,会出现一个对话框:Do you wish to save your new kernel configuration?

然后执行 make dep && make bzImage 进行内核编译,这个过程得花一点时间,特别是如果计算机的速度不快的话,花的时间会更长一些。编译内核如果没有错误,会得到内核映象文件/usr/src/linux/arch/i386/boot/bzImage ,将启动软盘插入计算机,执行下面的命令 mount -t vfat /dev/fd0 /mnt/floopy cp /usr/src/linux/arch/i386/boot/bzImage /mnt/floppy umount /dev/fd0

好了,启动盘上的文件都准备齐全了,等会儿用它到Win95环境下制作启动映象。

[查看全文]
xiaowuhello
公开的router_server
展开Biu

公开的router server

route server

有助于大家对bgp的学习和理解!!!

telnet://route-server.savvis.net/

telnet://tpr-route-server.saix.net/

telnet://route-server.skyinet.net/]telnet://route-server.skyinet.net/]telnet://route-server.skyinet.net/

route-server.skyinet.net

telnet://route-views.bmcag.net/]telnet://route-views.bmcag.net/]telnet://route-views.bmcag.net/

telnet://lg.ptt.ansp.br/]telnet://lg.ptt.ansp.br/]telnet://lg.ptt.ansp.br/

telnet://route-server.rhein-main-saar.net/

telnet://route-server.eastlink.ca/

telnet://route-server.videotron.net/

telnet://route-server.belwue.de/

telnet://route-views.on.bb.telus.com/

telnet://route-views.ab.bb.telus.com/

telnet://route-server.cerf.net/

telnet://route-server.ip.tiscali.net/

telnet://route-server.gblx.net/

telnet://public-route-server.is.co.za/

telnet://route-server.exodus.net/

telnet://route-server.as5388.net/

telnet://route-server.opentransit.net/

telnet://route-server.gt.ca/

telnet://route-server.he.net/

telnet://route-server.ip.att.net/"

telnet://route-server.wcg.net/

telnet://route-server.colt.net/"

telnet://route-views.oregon-ix.net/"

telnet://route-server.central.allstream.com/"

telnet://route-server.east.allstream.com/"

telnet://route-server.west.allstream.com/"

telnet://route-server.twtelecom.net/"

telnet://route-server.eu.gblx.net/"

telnet://route-server.as6667.net/"

telnet://routeserver.sunrise.ch/"

telnet://route-server.host.net/"

telnet://route-views.optus.net.au/

telnet://route-views3.routeviews.org/"

[查看全文]
lanyanlei
【批处理】Win7一键清理系统垃圾批处理!
展开Biu

这个是网上收集的Win7系统垃圾清理 批处理 有需要的朋友去下吧!

不喜欢下载的请查百度等!(网上很多)!

----------------------------------------------------------------------------

本内容已隐藏,回复后刷新可见哦

[查看全文]