18
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, what is needed Service Location Protocol Configuring your DHCP server Creating boot diskettes Practical Install one linux from network Summary

Network Installation

  • Upload
    saniya

  • View
    64

  • Download
    0

Embed Size (px)

DESCRIPTION

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, what is needed Service Location Protocol Configuring your DHCP server Creating boot diskettes - PowerPoint PPT Presentation

Citation preview

Page 1: Network Installation

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, what is needed

– Service Location Protocol

– Configuring your DHCP server

– Creating boot diskettes

• Practical– Install one linux from network

• Summary

Page 2: Network Installation

Prepairing network installation• Your network server need one or more of the following

– NFSD

– HTTPD

– VSFTPD

– DHCPD

– NAMED

– SLP

• 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

– SLP can be very dangerous and expose servers weakness

Page 3: Network Installation

Setting up the install server• Installation server

– Types which can be used: NFS HTTP FTP (SFTP)

– 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 3.4Gigabyte for each distribution of SuSE

• Create installation root tree

• HTTP, FTP and NFS preparation– Copy all contents of each 5 SuSE cdrom’s to server SuSE/9.3 –catalog.

– Just insert first CD and do the copy, remove it and insert the next one.

– Watch out for any I/O read errors while copy!

# cp –var /media/SUSE930_F01 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_002 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_003 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_004 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_005 /export/network-install/SuSE/9.3

# cp –var /media/SUSE930_F01 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_002 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_003 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_004 /export/network-install/SuSE/9.3# cp -var /media/SUSE930_005 /export/network-install/SuSE/9.3

# mkdir -p /export/network-install/SuSE/9.3# mkdir -p /export/network-install/SuSE/ISO

# mkdir -p /export/network-install/SuSE/9.3# mkdir -p /export/network-install/SuSE/ISO

Page 4: Network Installation

Setting up the install server continued• Install tree preparation

– Rename all CD’s directories to CD1, CD2 and so on

– If your were using Yast preparing your install server, all files will reside in one common directory

– Now we are ready to setup the ”sharepoint” with nfs, http, ftp or smb.

# cd /export/network-install/SuSE/9.3# mv SUSE930_F01 CD1# mv SUSE930_002 CD2# mv SUSE930_003 CD3# mv SUSE930_004 CD4# mv SUSE930_005 CD5

# cd /export/network-install/SuSE/9.3# mv SUSE930_F01 CD1# mv SUSE930_002 CD2# mv SUSE930_003 CD3# mv SUSE930_004 CD4# mv SUSE930_005 CD5

Page 5: Network Installation

Setting up your kernelNFS server• NFS is dependent on forward and revers name-lookup (DNS)

– The client to be installed must resolve in both forward and reverse

Server: /etc/hosts = Client: /etc/hosts

Example)

• NFS make use of portmapCheck if portmap & nfs is running Activate NFS and portmap at boot

• NFS configurationAdd to /etc/exports, use <tab> not <space>

Activate your ”export”

Test to mount your NFS share

/exports/network-install/SuSE/9.3/ *(ro,root_squash,sync)/exports/network-install/SuSE/9.3/ *(ro,root_squash,sync)

# /etc/init.d/portmap status

# /etc/init.d/nfsserver status

# /etc/init.d/portmap status

# /etc/init.d/nfsserver status

192.168.1.1 server.net05.se

192.168.1.101 client.net05.se

192.168.1.1 server.net05.se

192.168.1.101 client.net05.se

# exportfs -vra# exportfs -vra

# insserv /etc/init.d/nfsserver

# insserv /etc/init.d/portmap

# insserv /etc/init.d/nfsserver

# insserv /etc/init.d/portmap

# mount –t nfs localhost:/exports/network-install/SuSE/9.3 /mnt/a# mount –t nfs localhost:/exports/network-install/SuSE/9.3 /mnt/a

Page 6: Network Installation

Setting up SLP for kernelNFS server• SLP Registry file /etc/slp.reg.d/install.suse.nfs.reg

– SLP need to know what resource to annonce

• Service & Description– Name of resource registry file: install.suse– Service and directory to mount: nfs://$HOSTNAME/exports/SuSE/9.3/CD1– Description seen in resource browsers: NFS Installation Source for SuSE9.3

• Activate the SLP resource annonce

• Check that SLP reporst install.suse

• Activate slp at boot

# Register the NFS Installation Serverservice:install.suse:nfs://$HOSTNAME/exports/network-install/SuSE/9.3/CD1,en,65535description=NFS Installation Source for SuSE9.3

# Register the NFS Installation Serverservice:install.suse:nfs://$HOSTNAME/exports/network-install/SuSE/9.3/CD1,en,65535description=NFS Installation Source for SuSE9.3

# rcslpd start# rcslpd start

# slptool findsrvs service:install.suse:nfsservice:install.suse:nfs://server.net05.se/exports/network-install/SuSE/9.3/CD1,65535

# slptool findsrvs service:install.suse:nfsservice:install.suse:nfs://server.net05.se/exports/network-install/SuSE/9.3/CD1,65535

# insserv /etc/init.d/slpd# insserv /etc/init.d/slpd

Page 7: Network Installation

Setting up your vsFTPd server• Configure VSFTPd anonymous installations

Add to /etc/vsftpd.conf

• Standard anonymous ftp root is /srv/ftp– We changed this with the anon_root above

• If you need non anonymous installationsAdd to /etc/vsftpd.conf uncomment

Add special ftp install users with homedir inside install dir

## Anonymous FTP Root Directory#anon_root=/exports/network-install/SuSE#

## Anonymous FTP Root Directory#anon_root=/exports/network-install/SuSE#

# useradd -g users ftpinstall# passwd ftpinstall# usermod -d /exports/secret-install ftpinstall

# useradd -g users ftpinstall# passwd ftpinstall# usermod -d /exports/secret-install ftpinstall

local_enable=YESchroot_local_user=YES

local_enable=YESchroot_local_user=YES

Page 8: Network Installation

Setting up SLP for vsFTPd server• SLP Registry file /etc/slp.reg.d/install.suse.ftp.reg

– SLP need to know what resource to annonce

• Service & Description– Name of resource registry file: install.suse– Service and directory to open: ftp://$HOSTNAME/9.3/CD1,en,65535– Description seen in resource

browsers: ftp Installation Source for SuSE9.3

• Activate the SLP resource annonce• Check that SLP reporst install.suse

• Activate slp at boot

# Register the FTP Installation Serverservice:install.suse:ftp://$HOSTNAME/9.3/CD1,en,65535description=FTP Installation Source for SuSE9.3

# Register the FTP Installation Serverservice:install.suse:ftp://$HOSTNAME/9.3/CD1,en,65535description=FTP Installation Source for SuSE9.3

# rcslpd start# rcslpd start

# slptool findsrvs service:install.suse:ftpservice:install.suse:ftp://server.net05.se/9.3/CD1,en,65535

# slptool findsrvs service:install.suse:ftpservice:install.suse:ftp://server.net05.se/9.3/CD1,en,65535

# insserv /etc/init.d/slpd# insserv /etc/init.d/slpd

Page 9: Network Installation

Setup your Apache2 Webserver• Apache2 need to be installed

– In this case it is no use to install from anything else than YAST– Later we will do a more into the deepth installation of Apache21) Start yast and install only package apache22) Select apache2 and solve all dependencies that might appair. (in my case 3)

• Apache DocumentRoot lives in /srv/www/htdocs– We will use a subdirectory in that path, more exactly alias to our installation root

tree

• Install source in our case will be apache alias directory– Add after Alias /icons/ … </Directory>

• Restart apache• Test that you can see your sources http://<inst-server-ip>/SuSE/

# Network Install ServerAlias /SuSE/ "/exports/network-install/SuSE/"<Directory "/exports/network-install/SuSE"> Options Indexes MultiViews FollowSymlinks AllowOverride None Order allow,deny Allow from all</Directory>

# Network Install ServerAlias /SuSE/ "/exports/network-install/SuSE/"<Directory "/exports/network-install/SuSE"> Options Indexes MultiViews FollowSymlinks AllowOverride None Order allow,deny Allow from all</Directory>

# rcapache2 restart# rcapache2 restart

Page 10: Network Installation

Setting up SLP for Apache2• SLP Registry file /etc/slp.reg.d/install.suse.http.reg

– SLP need to know what resource to annonce

• Service & Description– Name of resource registry file: install.suse– Service and directory to browse: http://$HOSTNAME/SuSE/9.3/CD1– Description seen in resource browsers: HTTP Installation Source for SuSE9.3

• Activate the SLP resource annonce

• Check that SLP reporst install.suse

• Activate slp at boot

# Register the HTTP Installation Serverservice:install.suse:http://$HOSTNAME/SuSE/9.3/CD1,en,65535description=HTTP Installation Source for SuSE9.3

# Register the HTTP Installation Serverservice:install.suse:http://$HOSTNAME/SuSE/9.3/CD1,en,65535description=HTTP Installation Source for SuSE9.3

# rcslpd start# rcslpd start

# slptool findsrvs service:install.suse:httpservice:install.suse:http://server.net05.se/SuSE/9.3/CD1,65535

# slptool findsrvs service:install.suse:httpservice:install.suse:http://server.net05.se/SuSE/9.3/CD1,65535

# insserv /etc/init.d/slpd# insserv /etc/init.d/slpd

Page 11: Network Installation

Configuring your DHCP server• For most comfort in network installation use a DHCP server!

– It can be any DHCP server, but in our case we uses the install server– It delivers IP parameters to clients using dhcpcd, from e definded scope– It can also deliver deligated IP addresses based on client MAC

• Install your DHCP server– First check if you have it

– We had only the client and yast shell for the server– Install the dhcp libs and dhcpd-server– I do it all at once this time, yes by YAST!

• Do not start your DHCP server yet– The dhcp server can by mistake deliver IP parameters to someone else– We will need to deliver IP parameters based on client MAC if using PXE

boot.– Isolate your server and client from the rest of the network or release

client IP address from server and wait……

# rpm -qa | grep dhcp

dhcpcd-1.3.22pl4-202.2

yast2-dhcp-server-2.11.6-3

# rpm -qa | grep dhcp

dhcpcd-1.3.22pl4-202.2

yast2-dhcp-server-2.11.6-3

# yast dhcp-server# yast dhcp-server

Page 12: Network Installation

Configuring your DHCP server• Configure the dhcpd-server with yast the first time

– It is a mess to do anything else, SuSE has clobbed the DHCPD server to much– SUSE LINUX Enterprise Server is more designed to work with dhcpd servers– Basic DHCP Setup will need:

domain-name net05.se //Choose your domain name.primary-name-server 192.168.1.1 //Choose your 1:st DNS(secondary-name-server 80.84.37.3 //Choose your 2:ond DNS)default-gateway 192.168.1.1 //Choose your gatewayip-address-range 192.168.1.100 - 192.168.1.100 //Choose your rangeCheck start dhcp server manually

– Yast will prepare /etc/sysconfig/dhcpd and /etc/dhcpd.conf for you.

• After installation and yastsession you will have a sample /etc/dhcpd.conf!

• You will need to add client MAC to this!

option domain-name ”net05.se";

option domain-name-servers 192.168.1.1, 80.84.37.3;

option routers 192.168.1.1;

option ntp-servers 192.168.1.2;

default-lease-time 14400;

ddns-update-style none;

subnet 192.168.1.0 netmask 255.255.255.0 {

range 192.168.1.200 192.168.1.250;

default-lease-time 14400;

max-lease-time 172800;

}

option domain-name ”net05.se";

option domain-name-servers 192.168.1.1, 80.84.37.3;

option routers 192.168.1.1;

option ntp-servers 192.168.1.2;

default-lease-time 14400;

ddns-update-style none;

subnet 192.168.1.0 netmask 255.255.255.0 {

range 192.168.1.200 192.168.1.250;

default-lease-time 14400;

max-lease-time 172800;

}

Page 13: Network Installation

Configuring your DHCP server• Adding client MAC to /etc/dhcpd.conf

– Will allow client to recieve same IP address at all time– Nessesary for PXE boot

• If we like we can now remove the IP range.– Doing so will stop DHCP

server to deliver IP addresses to any other host exept the one with correct MAC

• Its now time to start your DHCP server– Dont do this if you do not know what

you are doing.

host client {

hardware ethernet 00:A0:C5:B7:56:BD;

fixed-address 192.168.1.101;

option broadcast-address 192.168.1.255;

}

host client {

hardware ethernet 00:A0:C5:B7:56:BD;

fixed-address 192.168.1.101;

option broadcast-address 192.168.1.255;

}

option domain-name ”net05.se";

option domain-name-servers 192.168.1.1, 80.84.37.3;

option routers 192.168.1.1;

option ntp-servers 192.168.1.2;

default-lease-time 14400;

ddns-update-style none;

subnet 192.168.1.0 netmask 255.255.255.0 {

# range 192.168.1.200 192.168.1.250;

default-lease-time 14400;

max-lease-time 172800;

}

option domain-name ”net05.se";

option domain-name-servers 192.168.1.1, 80.84.37.3;

option routers 192.168.1.1;

option ntp-servers 192.168.1.2;

default-lease-time 14400;

ddns-update-style none;

subnet 192.168.1.0 netmask 255.255.255.0 {

# range 192.168.1.200 192.168.1.250;

default-lease-time 14400;

max-lease-time 172800;

}

# rcdhcpd start# rcdhcpd start

Page 14: Network Installation

Creating boot diskettes in SuSE• To boot the client you need floppies or CD (CD1)

• Creating bootfloppies– Insert CD1 and

– Will create bootfloppies images in /root

– bootdisk1 contain msdos filesystem and syslinux bootloader

– syslinux can be modified after booting needs

• Creating floppies is easely done with dd– For each image make one floppy

# cd

# /media/SU930_F01/boot/mkbootdisk /media/SU930_F01

# cd

# /media/SU930_F01/boot/mkbootdisk /media/SU930_F01

# ls boot?

bootdisk1 bootdisk2 bootdisk3 bootdisk4 bootdisk5 bootdisk6 bootdisk7

# ls boot?

bootdisk1 bootdisk2 bootdisk3 bootdisk4 bootdisk5 bootdisk6 bootdisk7

# dd if=bootdisk1 of=/dev/fd02880+0 records in2880+0 records out

# dd if=bootdisk1 of=/dev/fd02880+0 records in2880+0 records out

Page 15: Network Installation

Creating boot diskettes in Windows• To boot the client you need the bootdisk images

– They can be found on internet if you do not keep them

• Using Windows rawwritewin

Page 16: Network Installation

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

– Remove first floppy and inser a new blank floppy

# mount /mnt/cdrom# dd if=/mnt/cdrom/images/bootdisk.img of=/dev/fd02880+0 records in2880+0 records out

# mount /mnt/cdrom# dd if=/mnt/cdrom/images/bootdisk.img of=/dev/fd02880+0 records in2880+0 records out

# mount /mnt/cdrom# dd if=/mnt/cdrom/images/drvnet.img of=/dev/fd02880+0 records in2880+0 records out# eject cdrom

# mount /mnt/cdrom# dd if=/mnt/cdrom/images/drvnet.img of=/dev/fd02880+0 records in2880+0 records out# eject cdrom

Page 17: Network Installation

Manual Network installation with SLP1. Boot on CD1 or boot floppies2. Move to INSTALL Press F3 and select SLP3. Hit Enter, a list should appair with possible install servers4. Choose one install server (FTP, HTTP or NFS)5. Hit Enter again, observe how syslinux try to get up the network and start loading.6. After a while, the standard installation will start.7. System analyzis is performed, after that CD1 content is fetched from the install

server8. After CD1 is installed, system will reboot, remove CD19. Installation will now continue with CD2 to CD5 if needed.10. You will be asked for root password11. Client network interfaces is analyzed12. Allow VNC if question comes13. Make the internet connection checkout if you need internet14. On-line update can take as long time as whole installation up to now.15. Add one local user NO AUTOLOGIN!16. SuSE Splash text arrives, just accept and continue17. Devices are now configured18. System will continue loading to runlevel 5 or runlevel 3 depending on your

selections in step7-9 and you try to login as root

Page 18: Network Installation

Manual Network installation no SLP1. Boot on CD1 or boot floppies

2. Move to INSTALL Press F3 and select (FTP, HTTP or NFS)

3. Depending on your choise you will now be askedUse DHCP addresses

Not using any proxy

Install server IP address or name + path to install sources

Username + Password (if using ftp)

FTP PATH is in our case /9.3/CD1

HTTP PATH is in our case /SuSE/9.3/CD1

NFS PATH is in our case /exports/network-install/suse/9.3/CD1

4. Hit Enter after you choises, observe how syslinux try to get up the network and start loading.

5. After a while, the standard installation will start.

6. Rest of installation will be standard, jump to 7 on previous page.