Network Installation Objectives Manage linux installation from network
Network Installation • Objectives – Manage linux installation from network install server • Contents – Preparing for a network installation – Setting up the install server for http, nfs, ftp – Copy files – Setting up Webserver – Setting up NFS – Setting up FTP – Configuring your DHCP server – Creating boot diskettes • Practical – Install one linux from network • Summary
Prepairing network installation • Your network server need one or more of the following – NFSD – HTTPD – VSFTPD – DHCPD – NAMED • You will need to setup each server after your need – Full flexibility you can mix netowk installation modes on same server – Local machine Policy must allow you to setup, usally only root can do. – Named and DHCPD can run on any machine in network
Setting up the install server • Installation server – Types which can be used: NFS HTTP FTP – You can support all at same time if you like or any combination – You must configure and start your selected servers – It will eat up about 2 Gigabyte for each distribution of Red. Hat • Create installation tree – /export/network-install/Red. Hat & /export/network-install/ISO • HTTP and FTP preparation – Copy all contents of each 3 cdrom Red. Hat/* to server Red. Hat/. –catalog. # mount /mnt/cdrom # cp -var /mnt/cdrom/Red. Hat /export/network-install/Red. Hat # eject cdrom • NFS preparation – Create ISO images of your 3 installations CD’s and place them in ISO – You can also download iso-images from Red. Hat/sunet sites on internet.
Setting up install server continued • Create CD-rom ISO files # cd /export/network-install/ISO # mount /mnt/cdrom # mkisofs -J -r -T -o shrike-i 386 -disc 1. iso /mnt/cdrom . . . . Wait take some time. . . . # eject cdrom # mount /mnt/cdrom # mkisofs -J -r -T -o shrike-i 386 -disc 2. iso /mnt/cdrom . . . . Wait take some time. . . . # eject cdrom # mount /mnt/cdrom # mkisofs -J -r -T -o shrike-i 386 -disc 3. iso /mnt/cdrom . . . . Wait take some time. . . . # eject cdrom
Setup your Webserver • Apache webbserver is used – Configure apache httpd. conf to share your install tree – Start your apache webserver • httpd. conf Name. Virtual. Host 192. 168. 1. 100 # # For HTTP Installations # <Virtual. Host 192. 168. 1. 100> Document. Root /export/ </Virtual. Host> <Directory /export/network-install> Options +Indexes Allow. Override Auth. Config order allow, deny allow from all </Directory> • Restart apache
Setting up your FTP server • Configure VSFTPd Add to /etc/vsftpd. conf # # Anonymous FTP Root Directory # anon_root=/export/network-install/ # • Restart vsftpd # /sbin/service vsftpd restart • Create a special vsftpd non anonymous install user (You can have blank password) # useradd -g users ftpinstall # passwd ftpinstall # usermod -d / ftpinstall
Setting up your NFS server • FTP configuration Add to /etc/exports, use <tab> not <space> /export/network-install *(ro, sync) Activate your ”export” # exportfs -ra • NFS make use of portmap – Check if portmap is running, then start NFS – You start with keyword start and reload config with keyword reload # /sbin/service portmap status # /sbin/service nfs start • NFS is dependent of DNS forward and revers lookup host 192. 168. 1. 96 –# The client to be installed must resolve in both forward and reverse host client. ikea. se –# You might need to setup your NDS as well
Configuring your DHCP server • For comfort in network use a DHCP – Add to your /etc/dhcpd. conf # private intranet subnet 192. 168. 0. 0 netmask 255. 0 { option routers 192. 168. 0. 254; option log-servers 192. 168. 0. 1; option broadcast-address 192. 168. 0. 255; option domain-name-servers 192. 168. 1. 100; option domain-name ”ikea. se"; range 192. 168. 1. 32 192. 168. 1. 64; } • Start your DHCP server # /sbin/service dhcpd start More about DHCP/DNS server’s in class LINUX TCP/IP
Creating boot diskettes in Windows • To boot the client you need two floppies – Bootdisk: bootdisk. img – Network drivers: drvnet. img • Using Windows – To create the bootdiskette Goto dosutils on cdrom 1 – Execute rawrite. exe – Enter imagesbootdsk. img – To create the network drivers diskette Goto dosutils on cdrom 1 – Execute rawrite. exe again – Now select imagesdrvnet. img
Creating boot diskettes in Linux • It is basically the same procedure as in Windows – Create bootdisk – Create network drivers disk • These are the steps – Mount first cdrom and insert a floppy # mount /mnt/cdrom # dd if=/mnt/cdrom/images/bootdisk. img of=/dev/fd 0 2880+0 records in 2880+0 records out – Remove first floppy and inser a new blank floppy # mount /mnt/cdrom # dd if=/mnt/cdrom/images/drvnet. img of=/dev/fd 0 2880+0 records in 2880+0 records out # eject cdrom
The Network installation 1. 2. 3. 4. Boot on the boot-floppy Enter at the lilo prompt lilo: Disk support logical and raw devices Go through the usual steps until it prompts for the "Installation Method". You will see a number of choices: – – – Local CDROM Hard Drive NFS Image FTP HTTP 5. Select the network option of your choice (NFS, FTP, HTTP) 6. You will then get a "No Driver Found" screen at which point you should remove the boot diskette and replace it with the driver diskette
The Network installation, continued 7. Select the "Use a Driver Disk" option, choose the floppy device "fd 0" as the source of the files and then proceed to the "Networking Device" menu 8. Select the Ethernet device to which the installation client is connected to the installation server network. This would most likely be interface "eth 0". 9. Select "DHCP" in the following "Configure TCP/IP" screen. This will make the Installation client use DHCP during the installation, if you have DHCP!
The Network installation, NFS 10. You will now reach the "NFS setup" menu. 11. Enter the IP address of the installation server as the "NFS Server Name". The "Red. Hat directory" will be "/export/Red. Hat/ISO". 12. The following menus will be the usual Red. Hat GUI installation screens.
The Network installation, HTTP 10. You will now reach the "HTTP Setup" menu. 11. Enter the IP address of the installation server. The "Red. Hat directory" will be "/Red. Hat". 12. The following menus will be text based versions of the usual Red. Hat installation screens.
The Network installation, FTP 10. You will now reach the "FTP Setup" menu. 11. Enter the IP address of the installation server as the "FTP Site Name". 12. Not Selecting The Non-Anonymous FTP Box 13. The "Red. Hat directory" will be "/". 14. The following menus will be text based versions of the usual Red. Hat installation screens. 12. Selecting The Non-Anonymous FTP Box The "Red. Hat directory" will be "/export/Red. Hat". 13. Enter the username and password of your special FTP user account 14. The following menus will be text based versions of the usual Red. Hat installation screens.
- Slides: 15