The Layout for your DRBL environment:
******************************************************
NIC NIC IP Clients
+-----------------------------+
| DRBL SERVER |
| |
| +-- [eth1] 218.195.119.227 +- to WAN
| |
| +-- [eth0] 192.168.1.100 +- to clients group 0 [ 12 clients, their IP
| | from 192.168.1.1 - 192.168.1.12]
+-----------------------------+
******************************************************
Total clients: 12
客户机密码 wlzx
#private IP public IP netmask gateway
192.168.1.1 218.195.119.231 255.255.255.0 218.195.119.1
192.168.1.2 218.195.119.232 255.255.255.0 218.195.119.1
192.168.1.3 218.195.119.233 255.255.255.0 218.195.119.1
192.168.1.4 218.195.119.234 255.255.255.0 218.195.119.1
192.168.1.5 218.195.119.235 255.255.255.0 218.195.119.1
192.168.1.6 218.195.119.236 255.255.255.0 218.195.119.1
192.168.1.7 218.195.119.237 255.255.255.0 218.195.119.1
192.168.1.8 218.195.119.238 255.255.255.0 218.195.119.1
192.168.1.9 218.195.119.239 255.255.255.0 218.195.119.1
192.168.1.10 218.195.119.240 255.255.255.0 218.195.119.1
#------------------------------------------------------
OK! Let's continue...
******************************************************
The Layout for your DRBL environment:
******************************************************
NIC NIC IP Clients
+-----------------------------+
| DRBL SERVER |
| |
| +-- [eth1] 218.195.119.227 +- to WAN
| |
| +-- [eth0] 192.168.1.100 +- to clients group 0 [ 10 clients, their IP
| | from 192.168.1.1 - 192.168.1.10]
+-----------------------------+
******************************************************
Total clients: 10
******************************************************
Press Enter to continue...
******************************************************
------------------------------------------------------
In the system, there are 3 modes for diskless linux services:
[0] Full DRBL mode, every client has its own NFS based /etc and /var.
[1] DRBL SSI (Single system image) mode, every client uses tmpfs based /etc and /var. In this mode, the loading and necessary disk space of server will be lighter. NOTE! (a) The client machine memory is recommended at least 256 MB. (b) The setting and config files of client will not be saved to the DRBL server! They are just used once and will vanish after the machine shutdowns! Besides, if you modify any file in the template client (located in /tftpboot/nodes), you have to run /opt/drbl/sbin/gen_ssi_files to create the template tarball in /tftpboot/node_root/drbl_ssi/. (c) If you want to provide some file to overwrite the setting in the template tarball when client boots, check /tftpboot/node_root/drbl_ssi/clients/00_README for more details.
[2] I do NOT want to provide diskless Linux service to client.
Which mode do you prefer ?
[0]
Full DRBL mode is chosen!
******************************************************
******************************************************
------------------------------------------------------
In the system, there are 3 modes available for clonezilla:
[0] Full Clonezilla mode, every client has its own NFS based /etc and /var.
[1] Clonezilla box mode, every client uses tmpfs based /etc and /var. In this mode, the loading and necessary disk space of server will be lighter than that in Full Clonezilla mode. Note! In Clonezilla box mode, the setting and config files of client will not be saved to the DRBL server! They just use once and will vanish after the machine shutdowns!
[2] I do NOT want clonezilla.
Which mode do you prefer ?
[0] 1
Clonezilla box mode is set, an elegant mode for clonezilla is on the way!
******************************************************
******************************************************
------------------------------------------------------
When using clonezilla, which directory in this server you want to store the saved image (Please use absolute path, and do NOT assign it under /mnt/, /media/ or /tmp/) ?
[/home/partimag]
Directory for clonezilla saved images: /home/partimag
------------------------------------------------------
If there is a local harddrive with swap partition or writable file system in your client machine,
do you want to use that swap partition or create a swap file in the writable filesystem so that client has more memory to use ? (This step will NOT destroy any data in that harddisk)
[Y/n]
******************************************************
OK! We will try to create a swap space for your client if it has a local hard drive!
------------------------------------------------------
What's the maximun size (Megabytes) for the swap space ?
We will try to allocate the swap space for you, if it's not enough, 60% of the free space will be used.
[128]
maxswapsize=128
******************************************************
------------------------------------------------------
Which mode do you want the clients to use after they boot ?
"1": Graphic mode (X window system) (default),
"2": Text mode.
[1]
The clients will enter graphic mode after booting.
******************************************************
------------------------------------------------------
Which mode do you want when client boots in graphic mode ?
0: normal login, 1: auto login, 2: timed login
[0] 1
Do you want to use *RANDOM* password for auto login accounts ?
[Y/n] y
OK! Let's continue...
The clients will auto login when they boot.
******************************************************
[10] accounts will be created for the client machines to auto login.
The auto login ID is same as the hostname of client.
The information of accounts and password will be listed in file "/etc/drbl/auto_login_id_passwd.txt"
------------------------------------------------------
Do you want to set the root's password for clients instead of using same root's password copied from server ? (For better security)
[y/N] y
New root's password for clients (It will not be echoed in the screen) ?
Retype new password (It will not be echoed in the screen).
------------------------------------------------------
Do you want to set the pxelinux password for clients so that when client boots, a password must be entered to startup (For better security)
[y/N] n
OK! Let's continue...
------------------------------------------------------
Do you want to set the boot prompt for clients ?
[Y/n]
How many 1/10 sec is the boot prompt timeout for clients ?
[70] 10
OK! Let's continue...
------------------------------------------------------
------------------------------------------------------
Do you want to use graphic background for PXE menu when client boots ?
Note! If you use graphical PXELinux menu, however client fails to boot, you can switch to text mode by running "/opt/drbl/sbin/switch-pxe-bg-mode -m text".
[Y/n]
Use text PXE Linux menu for client.
------------------------------------------------------
------------------------------------------------------
Do you want to let audio, cdrom, floppy, video and plugdev (like USB device) open to all users in the DRBL client ? If yes, we will add all the users to those device groups in the server and client.
[Y/n]
OK! Let's continue...
------------------------------------------------------
------------------------------------------------------
By using alias interface, every client can have 2 IPs,
one of them is private IP for clients connected to DRBL server, and the other is public IP for clients directly connected to WAN from switch!
Do you want to setup public IP for clients ?
[y/N] y
------------------------------------------------------
Do you want to let DRBL clients have an option to run terminal mode ? i.e. you want to let that client run remote display (which will mostly use resources of server), say "Y" here.
Note!
0. If you say yes to this option, this will be a very limited environment for client, i.e. NO local access for USB, CD, audio, printer, etc. in client.
1. If your server is not powerful, say "no" here.
2. By saying "yes" here, we will turn on xdmcp,
It is never a safe thing to turn on that. Setting up /etc/hosts.allow and /etc/hosts.deny to only allow local access is another alternative but not the safest.
Firewalling port 177 is the safest if you wish to have xdmcp on.
Read the manual for more notes on the security of XDMCP.
Please set it by yourself!
3. If you say "yes" here, you might have to restart your desktop environment manager (gdm/kdm) later, remember to save your data before you close applications!
Do you want to let client has an option to run terminal mode ?
[y/N]
OK! Let's continue...
------------------------------------------------------
------------------------------------------------------
Do you want to let DRBL server as a NAT server ? If not, your DRBL client will NOT be able to access Internat.
[Y/n]
OK! Let's continue...
------------------------------------------------------
------------------------------------------------------
Do you want to keep the old setting of existing DRBL clients if they exist ?
[Y/n] n
We will remove all the setting of the DRBL clients if they already exist.
******************************************************
******************************************************
The running kernel in the server supports NFS over TCP!
Note! If you change the running kernel in the server, and not sure whether the kernel supports NFS over udp or tcp, you'd better to re-run "drblpush -i" again to avoid the client boots in failure!
Press Enter to continue...
------------------------------------------------------
Searching installed Etherboot files for dhcpd.conf... done!
******************************************************
The calculated NETWORK for eth0 is 192.168.1.0.
******************************************************
OK! Let's do it!
------------------------------------------------------
Enter the public IP for this client (Its IP in DRBL is 192.168.1.1)
[] 218.195.119.231
Enter the gateway for this client (Its IP in DRBL is 192.168.1.1)
[218.195.119.254] 218.195.119.1
Enter the netmask for this client (Its IP in DRBL is 192.168.1.1)
[255.255.255.0]
#------------------------------------------------------
We will set clients' public IP network parameters as:
#------------------------------------------------------
# The private IP is for the client connected to DRBL server.
# The public IP is for the client connected to WAN.
#------------------------------------------------------------
#private IP public IP netmask gateway
192.168.1.1 218.195.119.231 255.255.255.0 218.195.119.1
192.168.1.2 218.195.119.232 255.255.255.0 218.195.119.1
192.168.1.3 218.195.119.233 255.255.255.0 218.195.119.1
192.168.1.4 218.195.119.234 255.255.255.0 218.195.119.1
192.168.1.5 218.195.119.235 255.255.255.0 218.195.119.1
192.168.1.6 218.195.119.236 255.255.255.0 218.195.119.1
192.168.1.7 218.195.119.237 255.255.255.0 218.195.119.1
192.168.1.8 218.195.119.238 255.255.255.0 218.195.119.1
192.168.1.9 218.195.119.239 255.255.255.0 218.195.119.1
192.168.1.10 218.195.119.240 255.255.255.0 218.195.119.1
#------------------------------------------------------
Accept ? [Y/n]
******************************************************
******************************************************
We are now ready to deploy the files to system!
Do you want to continue ?
Warning! If you go on, your firewall rules will be overwritten during the setup!
The original rules will be backuped as iptables.drblsave in system config directory (/etc/sysconfig or /etc/default).
[Y/n]
******************************************************
OK! Let's do it!
------------------------------------------------------
Checking the necessary disk space... done!
Copying the config file to /etc/drbl... done!
Backup the original /etc/hosts as /etc/hosts.drblsave... done!
Generate the /etc/hosts for clients connected to eth0... done!
Cleaning the stale files of the diskless nodes if they exist... done!
*****************************************************.
*****************************************************.
The version number for your GNU/Linux: DBN-TU
Completely cleaning old common root files if they exist... done !
Completely cleaning old nodes if they exist... done !
Creating common root files... This might take several minutes........... done!
Update the kernel for client if necessary...
The DRBL client uses i486 kernel with version 2.6.22-14-386...
Trying to update the /tftpboot/node_root/lib/modules/2.6.22-14-386 from server's /lib/modules/... This might take several minutes...
"i486" 2.6.22-14-386 kernel in this DRBL server is not found, so skip this.
Copying the directory /etc/ to clients common root /tftpboot/node_root...
Cleaning the ssh key file ssh_host_dsa_key copied from server... done!
Cleaning the ssh key file ssh_host_dsa_key.pub copied from server... done!
Cleaning the ssh key file ssh_host_rsa_key copied from server... done!
Cleaning the ssh key file ssh_host_rsa_key.pub copied from server... done!
Commenting the TCPwrapper related file /tftpboot/node_root/etc/hosts.deny copied from server... done!
Commenting the TCPwrapper related file /tftpboot/node_root/etc/hosts.allow copied from server... done!
The startup services for DRBL client are:
firstboot portmap nis nfs-common makedev ssh hal dbus acpid acpi-support usplash consolekit cupsys drblthincli mkswapfile arm-wol sendsigs umountfs
Using udev for clients... Set graphic mode for Debian DRBL client...
Deleting the accounts (except root) in the clients common root template... done!
Enabling the NIS client in the common root template... done!
Creating some necessary files in the clients common root template....... done!
Creating DRBL client: youlijia-desktop001 192.168.1.1... Generating SSH host keys for client 192.168.1.1 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.1 as auto_login... Creating account youlijia-desktop001... The password_opt is set as "8". Note!!! To avoid confusion, these random password does NOT contain digit 0 (zero) and digit 1 (one)!!!
Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.1...done!
Creating DRBL client: youlijia-desktop002 192.168.1.2... Generating SSH host keys for client 192.168.1.2 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.2 as auto_login... Creating account youlijia-desktop002... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.2...done!
Creating DRBL client: youlijia-desktop003 192.168.1.3... Generating SSH host keys for client 192.168.1.3 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.3 as auto_login... Creating account youlijia-desktop003... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.3...done!
Creating DRBL client: youlijia-desktop004 192.168.1.4... Generating SSH host keys for client 192.168.1.4 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.4 as auto_login... Creating account youlijia-desktop004... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.4...done!
Creating DRBL client: youlijia-desktop005 192.168.1.5... Generating SSH host keys for client 192.168.1.5 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.5 as auto_login... Creating account youlijia-desktop005... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.5...done!
Creating DRBL client: youlijia-desktop006 192.168.1.6... Generating SSH host keys for client 192.168.1.6 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.6 as auto_login... Creating account youlijia-desktop006... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.6...done!
Creating DRBL client: youlijia-desktop007 192.168.1.7... Generating SSH host keys for client 192.168.1.7 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.7 as auto_login... Creating account youlijia-desktop007... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.7...done!
Creating DRBL client: youlijia-desktop008 192.168.1.8... Generating SSH host keys for client 192.168.1.8 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.8 as auto_login... Creating account youlijia-desktop008... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.8...done!
Creating DRBL client: youlijia-desktop009 192.168.1.9... Generating SSH host keys for client 192.168.1.9 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.9 as auto_login... Creating account youlijia-desktop009... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.9...done!
Creating DRBL client: youlijia-desktop010 192.168.1.10... Generating SSH host keys for client 192.168.1.10 if they do not exist... done!
Display manager for this client:"gdm"...
Setting node 192.168.1.10 as auto_login... Creating account youlijia-desktop010... The password_opt is set as "8". Generating random password from password length 8... done!
The created ID and password are listed in /etc/drbl/auto_login_id_passwd.txt. It would be a good idea to put that file in other safe place, then delete /etc/drbl/auto_login_id_passwd.txt.
Change the root's password for DRBL client 192.168.1.10...done!
Template client for DRBL SSI is 192.168.1.1
Using template host /tftpboot/nodes/192.168.1.1
Generating SSH host keys for client 192.168.1.1 if they do not exist... done!
Generating the files for DRBL single system image template... etc... var... opt/drbl... Root's openssh public key... done!
Disable the password in pxelinux simple menu for all clients...
Disabling PXE password in config file /tftpboot/nbi_img/pxelinux.cfg/default...
done!
Now add necessary services to this DRBL server: DHCP, TFTP, NFS, NIS...
Generating the NFS exports for DRBL clients...
Backup the original /etc/exports as /etc/exports.drblsave
Exporting to clients by IP address line-by-line...
Full DRBL or Full Clonezilla mode, exporting client's directories etc, var, root...
The /etc/exports setting is ok now!
Now generate the firewall rules for NAT service...
Stop the NAT service first...
Flushing firewall rules: success
ip_forward is already on.
Now set the YP securenets...
Backup the original /etc/ypserv.securenets as /etc/ypserv.securenets.drblsave
The /etc/ypserv.securenets setting is done!
Update YP...
Now add the service: portmap dhcp3-server nis nfs-common nfs-kernel-server tftpd-hpa drbl-clients-nat
Force to add portmap service in this Debian DRBL server...
Force to add dhcp3-server service in this Debian DRBL server...
Force to add nis service in this Debian DRBL server...
Force to add nfs-common service in this Debian DRBL server...
Force to add nfs-kernel-server service in this Debian DRBL server...
Force to add tftpd-hpa service in this Debian DRBL server...
Force to add drbl-clients-nat service in this Debian DRBL server...
Now start the service: portmap dhcp3-server nis nfs-common nfs-kernel-server tftpd-hpa drbl-clients-nat
* Stopping portmap daemon... [ OK ]
* Starting portmap daemon... [ OK ]
* Stopping DHCP server dhcpd3 [fail]
* Starting DHCP server dhcpd3 [ OK ]
* Starting NIS services [ OK ]
* Stopping NFS common utilities [ OK ]
* Starting NFS common utilities [ OK ]
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... [ OK ]
* Starting NFS kernel daemon [ OK ]
Restarting HPA's tftpd: in.tftpd.
Stopping the NAT services for DRBL clients... Now stop the NAT service...
Flushing firewall rules: success
done!
Starting the NAT services for DRBL clients... done!
ip_forward is already on.
The display manager in this DRBL server is "gdm"
The GDM remote access in the DRBL server is already off!
Disable the terminal mode for DRBL clients ...
done !
Clean all the previous saved config file if they exist...done!
Turn on the boot prompt for PXE client...done!
Turn off the thin client option in PXE boot menu...done!
Modifying /tftpboot/nbi_img/pxelinux.cfg/default to let DRBL client use graphical PXE boot menu... done!
Full DRBL mode. Remove clientdir opt for label drbl in pxelinux config...
Setting drbl_mode="full_drbl_mode" in /etc/drbl/drbl_deploy.conf and /etc/drbl/drblpush.conf... done!
Clonezilla box mode. Set clientdir opt for label clonezilla in pxelinux config...
Setting clonezilla_mode="clonezilla_box_mode" in /etc/drbl/drbl_deploy.conf and /etc/drbl/drblpush.conf... done!
You have to use "/opt/drbl/sbin/dcs" -> clonezilla-start to start clonezilla serivce, so that there will be a clonezilla menu when client boots
*****************************************************.
Adding normal users to group "audio cdrom plugdev floppy video"........ done!
*****************************************************.
Updating the YP/NIS for group...
*****************************************************.
Since you change the devices setting of clients, if you already logged in X-window in DRBL clients, then you have to logout and login X-window in DRBL client to make the devices settings take effect.
Note! If you add new or remove accounts in the DRBL server in the future, remember to run the following command again, so that some group (EX:plugdev) will be updated:
/opt/drbl/sbin/tune-debian-dev-group-perm -g "audio cdrom plugdev floppy video" -e
*****************************************************.
Enjoy DRBL!!!
http://drbl.nchc.org.tw; http://drbl.sf.net
NCHC Free Software Labs, Taiwan. http://free.nchc.org.tw
*****************************************************.
If you like, you can reboot the DRBL server now to make sure everything is ready...(This is not necessary, just an option.).
*****************************************************.
DRBL server is ready! Now set the client machines to boot from PXE or Etherboot (refer to http://drbl.sourceforge.net for more details).
NOTE! If Etherboot is used in client machine, version 5.4.0 or newer is required!
PS. The config file is saved as /etc/drbl/drblpush.conf. Therefore if you want to run drblpush with the same config again, you may run it as: /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf
youlijia@youlijia-desktop:~$
DRBL environment 企鹅龙配置过程
-
- 帖子: 135
- 注册时间: 2008-01-09 12:56