Benutzer-Werkzeuge

Webseiten-Werkzeuge


Action disabled: source
tachtler:repository_ausliefern_centos_7

Repository ausliefern CentOS 7

RPM (Package Manager) ist ein freies (GPL) Software-Paketverwaltungssystem, welches ursprünglich von einem prominenten Nord-Amerikanischen Linux-Distributor Red Hat entwickelt wurde. Eine Ansammlung von vielen RPM-Paketen stellt das sogenannte Repository dar, welches unter Zuhilfenahme eines Paket-Management Programms, wie z.B. YUM (Yellow Dog Updater) zur Aktualisierung von z.B. CentOS verwendet werden kann.

Mithilfe von Kickstart-Installationen kann der Installationsvorgang gänzlich oder teilweise automatisiert werden. Kickstart-Dateien enthalten Antworten auf alle Fragen, die normalerweise vom Installationsprogramm gestellt werden, beispielsweise welche Zeitzone für das System eingestellt werden soll, wie die Festplatten partitioniert werden sollen und welche Pakete installiert werden sollen. Eine derart vorbereitete Kickstart-Datei ermöglicht es dem Installationsprogramm sogar, die Installation automatisch und ohne Benutzereingriff durchzuführen.

Beschreibung Externer Link
RedHat Dokumentation Chapter 21. Preparing for a Network Installation
RedHat Dokumentation Chapter 23. Kickstart Installations

Ab hier werden zur Ausführung nachfolgender Befehle root-Rechte benötigt. Um der Benutzer root zu werden, melden Sie sich bitte als root-Benutzer am System an, oder wechseln mit nachfolgendem Befehl zum Benutzer root:

$ su -
Password:

Vorbereitungen

Nachfolgend soll beschrieben werden, wie z.B. ein gespiegeltes Repository - wie unter nachfolgendem internen Link beschrieben:

als Installationsmethode bzw. -medium via PXE Boot als Installationsquelle genutzt werden kann.

Folgende technische Voraussetzungen müssen mindestens erfüllt werden:

  • Die Client-Netzwerkkarte muss via PXE (Preboot Execution Environment) booten/starten
  • Es muss ein Web-Server in/aus dem Netzwerk erreichbar sein
  • Es muss ein DHCP-Server in/aus dem Netzwerk erreichbar sein
  • Es muss ein TFTP-Server (Trivial File Transfer Protocol) in/aus dem Netzwerk erreichbar sein
  • Es soll ein NFS-Server (Network File System) in/aus dem Netzwerk erreichbar sein

Voraussetzungen

Als Voraussetzung für die Auslieferung eines Repository, sind folgende Komponenten erforderlich:

  • Lauffähiger Web-Server z.B. Apache HTTP Server
  • Lauffähiger DHCP-Server z.B. ISC DHCP
  • tftp-server - ist im base-Repository von CentOS enthalten
    • TFTP-Server zum ausliefern der PXE Boot/Start Pakete
  • syslinux - ist im base-Repository von CentOS enthalten
    • LINUX Start-System, welcher via PXE Boot geladen wird
  • nfs-utils - ist im base-Repository von CentOS enthalten
    • NFS-Server zum ausliefern der eigentlichen Installations-Pakete

Nachfolgende rpm-Pakete sind als Abhängigkeit erforderlich und werden ebenfalls benötigt:

  • keyutils - ist im base-Repository von CentOS enthalten
  • libevent - ist im base-Repository von CentOS enthalten
  • libnfsidmap - ist im base-Repository von CentOS enthalten
  • libtirpc - ist im base-Repository von CentOS enthalten
  • mtools - ist im base-Repository von CentOS enthalten
  • quota - ist im base-Repository von CentOS enthalten
  • quota-nls - ist im base-Repository von CentOS enthalten
  • rpcbind - ist im base-Repository von CentOS enthalten
  • tcp_wrappers - ist im base-Repository von CentOS enthalten
  • xinetd - ist im base-Repository von CentOS enthalten

Installation

Mit nachfolgendem Befehl, werden die Pakete tftp-server, syslinux und nfs-utils installiert:

# yum install tftp-server syslinux nfs-utils
Loaded plugins: changelog, priorities
61 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.3.0-0.el7 will be installed
--> Processing Dependency: libtirpc >= 0.2.3-1 for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: quota for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: libnfsidmap for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: libevent for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: keyutils for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: libtirpc.so.1()(64bit) for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: libnfsidmap.so.0()(64bit) for package: 1:nfs-utils-1.3.0-0.el7.x86_64
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: 1:nfs-utils-1.3.0-0.el7.x86_64
---> Package syslinux.x86_64 0:4.05-8.el7 will be installed
--> Processing Dependency: mtools for package: syslinux-4.05-8.el7.x86_64
---> Package tftp-server.x86_64 0:5.2-11.el7 will be installed
--> Running transaction check
---> Package keyutils.x86_64 0:1.5.8-3.el7 will be installed
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed
---> Package libnfsidmap.x86_64 0:0.25-9.el7 will be installed
---> Package libtirpc.x86_64 0:0.2.4-0.3.el7 will be installed
---> Package mtools.x86_64 0:4.0.18-5.el7 will be installed
---> Package quota.x86_64 1:4.01-11.el7 will be installed
--> Processing Dependency: quota-nls = 1:4.01-11.el7 for package: 1:quota-4.01-11.el7.x86_64
--> Processing Dependency: tcp_wrappers for package: 1:quota-4.01-11.el7.x86_64
---> Package rpcbind.x86_64 0:0.2.0-23.el7 will be installed
--> Running transaction check
---> Package quota-nls.noarch 1:4.01-11.el7 will be installed
---> Package tcp_wrappers.x86_64 0:7.6-77.el7 will be installed
--> Finished Dependency Resolution

Changes in packages about to be updated:


Dependencies Resolved

================================================================================
 Package              Arch           Version                 Repository    Size
================================================================================
Installing:
 nfs-utils            x86_64         1:1.3.0-0.el7           base         357 k
 syslinux             x86_64         4.05-8.el7              base         1.0 M
 tftp-server          x86_64         5.2-11.el7              base          44 k
Installing for dependencies:
 keyutils             x86_64         1.5.8-3.el7             base          54 k
 libevent             x86_64         2.0.21-4.el7            base         214 k
 libnfsidmap          x86_64         0.25-9.el7              base          45 k
 libtirpc             x86_64         0.2.4-0.3.el7           base          85 k
 mtools               x86_64         4.0.18-5.el7            base         203 k
 quota                x86_64         1:4.01-11.el7           base         176 k
 quota-nls            noarch         1:4.01-11.el7           base          89 k
 rpcbind              x86_64         0.2.0-23.el7            base          55 k
 tcp_wrappers         x86_64         7.6-77.el7              base          78 k

Transaction Summary
================================================================================
Install  3 Packages (+9 Dependent packages)

Total download size: 2.4 M
Installed size: 6.2 M
Is this ok [y/d/N]: y
Downloading packages:
(1/12): keyutils-1.5.8-3.el7.x86_64.rpm                    |  54 kB   00:00     
(2/12): libevent-2.0.21-4.el7.x86_64.rpm                   | 214 kB   00:00     
(3/12): libtirpc-0.2.4-0.3.el7.x86_64.rpm                  |  85 kB   00:00     
(4/12): libnfsidmap-0.25-9.el7.x86_64.rpm                  |  45 kB   00:00     
(5/12): nfs-utils-1.3.0-0.el7.x86_64.rpm                   | 357 kB   00:00     
(6/12): mtools-4.0.18-5.el7.x86_64.rpm                     | 203 kB   00:00     
(7/12): quota-4.01-11.el7.x86_64.rpm                       | 176 kB   00:00     
(8/12): quota-nls-4.01-11.el7.noarch.rpm                   |  89 kB   00:00     
(9/12): rpcbind-0.2.0-23.el7.x86_64.rpm                    |  55 kB   00:00     
(10/12): syslinux-4.05-8.el7.x86_64.rpm                    | 1.0 MB   00:00     
(11/12): tcp_wrappers-7.6-77.el7.x86_64.rpm                |  78 kB   00:00     
(12/12): tftp-server-5.2-11.el7.x86_64.rpm                 |  44 kB   00:00     
--------------------------------------------------------------------------------
Total                                              3.7 MB/s | 2.4 MB  00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libtirpc-0.2.4-0.3.el7.x86_64                               1/12 
  Installing : rpcbind-0.2.0-23.el7.x86_64                                 2/12 
  Installing : mtools-4.0.18-5.el7.x86_64                                  3/12 
  Installing : 1:quota-nls-4.01-11.el7.noarch                              4/12 
  Installing : tcp_wrappers-7.6-77.el7.x86_64                              5/12 
  Installing : 1:quota-4.01-11.el7.x86_64                                  6/12 
  Installing : keyutils-1.5.8-3.el7.x86_64                                 7/12 
  Installing : libnfsidmap-0.25-9.el7.x86_64                               8/12 
  Installing : libevent-2.0.21-4.el7.x86_64                                9/12 
  Installing : 1:nfs-utils-1.3.0-0.el7.x86_64                             10/12 
  Installing : syslinux-4.05-8.el7.x86_64                                 11/12 
  Installing : tftp-server-5.2-11.el7.x86_64                              12/12 
  Verifying  : 1:nfs-utils-1.3.0-0.el7.x86_64                              1/12 
  Verifying  : libtirpc-0.2.4-0.3.el7.x86_64                               2/12 
  Verifying  : libevent-2.0.21-4.el7.x86_64                                3/12 
  Verifying  : libnfsidmap-0.25-9.el7.x86_64                               4/12 
  Verifying  : keyutils-1.5.8-3.el7.x86_64                                 5/12 
  Verifying  : syslinux-4.05-8.el7.x86_64                                  6/12 
  Verifying  : tcp_wrappers-7.6-77.el7.x86_64                              7/12 
  Verifying  : tftp-server-5.2-11.el7.x86_64                               8/12 
  Verifying  : 1:quota-nls-4.01-11.el7.noarch                              9/12 
  Verifying  : mtools-4.0.18-5.el7.x86_64                                 10/12 
  Verifying  : 1:quota-4.01-11.el7.x86_64                                 11/12 
  Verifying  : rpcbind-0.2.0-23.el7.x86_64                                12/12 

Installed:
  nfs-utils.x86_64 1:1.3.0-0.el7           syslinux.x86_64 0:4.05-8.el7         
  tftp-server.x86_64 0:5.2-11.el7         

Dependency Installed:
  keyutils.x86_64 0:1.5.8-3.el7           libevent.x86_64 0:2.0.21-4.el7        
  libnfsidmap.x86_64 0:0.25-9.el7         libtirpc.x86_64 0:0.2.4-0.3.el7       
  mtools.x86_64 0:4.0.18-5.el7            quota.x86_64 1:4.01-11.el7            
  quota-nls.noarch 1:4.01-11.el7          rpcbind.x86_64 0:0.2.0-23.el7         
  tcp_wrappers.x86_64 0:7.6-77.el7       

Complete!

:!: HINWEIS - Teilweise sind bereits benötigte Pakete schon auf dem Server, aus vorhergehenden Installationen, vorhanden!

Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit dem Paket tftp-server installiert wurden.

# rpm -qil tftp-server
Name        : tftp-server
Version     : 5.2
Release     : 11.el7
Architecture: x86_64
Install Date: Tue 16 Dec 2014 02:26:52 PM CET
Group       : System Environment/Daemons
Size        : 65505
License     : BSD
Signature   : RSA/SHA256, Fri 04 Jul 2014 07:32:55 AM CEST, Key ID 24c6a8a7f4a80eb5
Source RPM  : tftp-5.2-11.el7.src.rpm
Build Date  : Tue 10 Jun 2014 01:44:42 AM CEST
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.kernel.org/pub/software/network/tftp/
Summary     : The server for the Trivial File Transfer Protocol (TFTP)
Description :
The Trivial File Transfer Protocol (TFTP) is normally used only for
booting diskless workstations.  The tftp-server package provides the
server for TFTP, which allows users to transfer files to and from a
remote machine. TFTP provides very little security, and should not be
enabled unless it is expressly needed.  The TFTP server is run from
/etc/xinetd.d/tftp, and is disabled by default.
/etc/xinetd.d/tftp
/usr/lib/systemd/system/tftp.service
/usr/lib/systemd/system/tftp.socket
/usr/sbin/in.tftpd
/usr/share/doc/tftp-server-5.2
/usr/share/doc/tftp-server-5.2/CHANGES
/usr/share/doc/tftp-server-5.2/README
/usr/share/doc/tftp-server-5.2/README.security
/usr/share/man/man8/in.tftpd.8.gz
/usr/share/man/man8/tftpd.8.gz
/var/lib/tftpboot

Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit dem Paket syslinux installiert wurden.

# rpm -qil syslinux
Name        : syslinux
Version     : 4.05
Release     : 8.el7
Architecture: x86_64
Install Date: Tue 16 Dec 2014 02:26:52 PM CET
Group       : Applications/System
Size        : 2423549
License     : GPLv2+
Signature   : RSA/SHA256, Fri 04 Jul 2014 07:07:56 AM CEST, Key ID 24c6a8a7f4a80eb5
Source RPM  : syslinux-4.05-8.el7.src.rpm
Build Date  : Tue 10 Jun 2014 09:43:33 AM CEST
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
Summary     : Simple kernel loader which boots from a FAT filesystem
Description :
SYSLINUX is a suite of bootloaders, currently supporting DOS FAT
filesystems, Linux ext2/ext3 filesystems (EXTLINUX), PXE network boots
(PXELINUX), or ISO 9660 CD-ROMs (ISOLINUX).  It also includes a tool,
MEMDISK, which loads legacy operating systems from these media.
/usr/bin/gethostip
/usr/bin/isohybrid
/usr/bin/memdiskfind
/usr/bin/syslinux
/usr/share/doc/syslinux-4.05
/usr/share/doc/syslinux-4.05/COPYING
/usr/share/doc/syslinux-4.05/CodingStyle.txt
/usr/share/doc/syslinux-4.05/NEWS
/usr/share/doc/syslinux-4.05/README
/usr/share/doc/syslinux-4.05/SubmittingPatches.txt
/usr/share/doc/syslinux-4.05/comboot.txt
/usr/share/doc/syslinux-4.05/distrib.txt
/usr/share/doc/syslinux-4.05/extlinux.txt
/usr/share/doc/syslinux-4.05/gpt.txt
/usr/share/doc/syslinux-4.05/isolinux.txt
/usr/share/doc/syslinux-4.05/keytab-lilo.txt
/usr/share/doc/syslinux-4.05/logo
/usr/share/doc/syslinux-4.05/logo/syslinux-100.png
/usr/share/doc/syslinux-4.05/mboot.txt
/usr/share/doc/syslinux-4.05/memdisk.txt
/usr/share/doc/syslinux-4.05/menu.txt
/usr/share/doc/syslinux-4.05/pxelinux.txt
/usr/share/doc/syslinux-4.05/rfc5071.txt
/usr/share/doc/syslinux-4.05/sample
/usr/share/doc/syslinux-4.05/sample/Makefile
/usr/share/doc/syslinux-4.05/sample/m16-640x640-syslinux.jpg
/usr/share/doc/syslinux-4.05/sample/sample.msg
/usr/share/doc/syslinux-4.05/sample/syslinux_splash.jpg
/usr/share/doc/syslinux-4.05/sample/syslogo.lss
/usr/share/doc/syslinux-4.05/sample/syslogo.ppm.gz
/usr/share/doc/syslinux-4.05/sdi.txt
/usr/share/doc/syslinux-4.05/syslinux.txt
/usr/share/doc/syslinux-4.05/usbkey.txt
/usr/share/man/man1/gethostip.1.gz
/usr/share/man/man1/isohybrid.1.gz
/usr/share/man/man1/memdiskfind.1.gz
/usr/share/man/man1/syslinux.1.gz
/usr/share/man/man1/syslinux2ansi.1.gz
/usr/share/syslinux
/usr/share/syslinux/altmbr.bin
/usr/share/syslinux/altmbr_c.bin
/usr/share/syslinux/altmbr_f.bin
/usr/share/syslinux/cat.c32
/usr/share/syslinux/chain.c32
/usr/share/syslinux/cmd.c32
/usr/share/syslinux/config.c32
/usr/share/syslinux/cpuid.c32
/usr/share/syslinux/cpuidtest.c32
/usr/share/syslinux/diag/geodsp1s.img.xz
/usr/share/syslinux/diag/geodspms.img.xz
/usr/share/syslinux/diag/handoff.bin
/usr/share/syslinux/disk.c32
/usr/share/syslinux/dmitest.c32
/usr/share/syslinux/dosutil
/usr/share/syslinux/dosutil/copybs.com
/usr/share/syslinux/dosutil/eltorito.sys
/usr/share/syslinux/dosutil/mdiskchk.com
/usr/share/syslinux/elf.c32
/usr/share/syslinux/ethersel.c32
/usr/share/syslinux/gfxboot.c32
/usr/share/syslinux/gptmbr.bin
/usr/share/syslinux/gptmbr_c.bin
/usr/share/syslinux/gptmbr_f.bin
/usr/share/syslinux/gpxecmd.c32
/usr/share/syslinux/gpxelinux.0
/usr/share/syslinux/gpxelinuxk.0
/usr/share/syslinux/hdt.c32
/usr/share/syslinux/host.c32
/usr/share/syslinux/ifcpu.c32
/usr/share/syslinux/ifcpu64.c32
/usr/share/syslinux/ifplop.c32
/usr/share/syslinux/int18.com
/usr/share/syslinux/isohdpfx.bin
/usr/share/syslinux/isohdpfx_c.bin
/usr/share/syslinux/isohdpfx_f.bin
/usr/share/syslinux/isohdppx.bin
/usr/share/syslinux/isohdppx_c.bin
/usr/share/syslinux/isohdppx_f.bin
/usr/share/syslinux/isolinux-debug.bin
/usr/share/syslinux/isolinux.bin
/usr/share/syslinux/kbdmap.c32
/usr/share/syslinux/linux.c32
/usr/share/syslinux/ls.c32
/usr/share/syslinux/lua.c32
/usr/share/syslinux/mboot.c32
/usr/share/syslinux/mbr.bin
/usr/share/syslinux/mbr_c.bin
/usr/share/syslinux/mbr_f.bin
/usr/share/syslinux/memdisk
/usr/share/syslinux/memdump.com
/usr/share/syslinux/meminfo.c32
/usr/share/syslinux/menu.c32
/usr/share/syslinux/pcitest.c32
/usr/share/syslinux/pmload.c32
/usr/share/syslinux/poweroff.com
/usr/share/syslinux/pwd.c32
/usr/share/syslinux/pxechain.com
/usr/share/syslinux/pxelinux.0
/usr/share/syslinux/reboot.c32
/usr/share/syslinux/rosh.c32
/usr/share/syslinux/sanboot.c32
/usr/share/syslinux/sdi.c32
/usr/share/syslinux/sysdump.c32
/usr/share/syslinux/syslinux.com
/usr/share/syslinux/syslinux.exe
/usr/share/syslinux/syslinux64.exe
/usr/share/syslinux/ver.com
/usr/share/syslinux/vesainfo.c32
/usr/share/syslinux/vesamenu.c32
/usr/share/syslinux/vpdtest.c32
/usr/share/syslinux/whichsys.c32
/usr/share/syslinux/zzjson.c32

Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit dem Paket nfs-utils installiert wurden.

# rpm -qil nfs-utils
Name        : nfs-utils
Epoch       : 1
Version     : 1.3.0
Release     : 0.el7
Architecture: x86_64
Install Date: Tue 16 Dec 2014 02:26:50 PM CET
Group       : System Environment/Daemons
Size        : 1070234
License     : MIT and GPLv2 and GPLv2+ and BSD
Signature   : RSA/SHA256, Fri 04 Jul 2014 05:57:13 AM CEST, Key ID 24c6a8a7f4a80eb5
Source RPM  : nfs-utils-1.3.0-0.el7.src.rpm
Build Date  : Tue 10 Jun 2014 07:45:11 AM CEST
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://sourceforge.net/projects/nfs
Summary     : NFS utilities and supporting clients and daemons for the kernel NFS server
Description :
The nfs-utils package provides a daemon for the kernel NFS server and
related tools, which provides a much higher level of performance than the
traditional Linux NFS server used by most users.

This package also contains the showmount program.  Showmount queries the
mount daemon on a remote host for information about the NFS (Network File
System) server on the remote host.  For example, showmount can display the
clients which are mounted on that host.

This package also contains the mount.nfs and umount.nfs program.
/etc/exports.d
/etc/nfsmount.conf
/etc/request-key.d/id_resolver.conf
/etc/sysconfig/nfs
/sbin/mount.nfs
/sbin/mount.nfs4
/sbin/osd_login
/sbin/rpc.statd
/sbin/umount.nfs
/sbin/umount.nfs4
/usr/lib/systemd/system/nfs-blkmap.service
/usr/lib/systemd/system/nfs-idmap.service
/usr/lib/systemd/system/nfs-lock.service
/usr/lib/systemd/system/nfs-mountd.service
/usr/lib/systemd/system/nfs-rquotad.service
/usr/lib/systemd/system/nfs-secure-server.service
/usr/lib/systemd/system/nfs-secure.service
/usr/lib/systemd/system/nfs-server.service
/usr/lib/systemd/system/nfs.service
/usr/lib/systemd/system/nfs.target
/usr/lib/systemd/system/nfs.target.wants
/usr/lib/systemd/system/nfslock.service
/usr/lib/systemd/system/proc-fs-nfsd.mount
/usr/lib/systemd/system/rpcgssd.service
/usr/lib/systemd/system/rpcidmapd.service
/usr/lib/systemd/system/rpcsvcgssd.service
/usr/lib/systemd/system/var-lib-nfs-rpc_pipefs.mount
/usr/libexec/nfs-utils
/usr/libexec/nfs-utils/scripts
/usr/libexec/nfs-utils/scripts/nfs-lock.preconfig
/usr/libexec/nfs-utils/scripts/nfs-server.preconfig
/usr/sbin/blkmapd
/usr/sbin/exportfs
/usr/sbin/mountstats
/usr/sbin/nfsdcltrack
/usr/sbin/nfsidmap
/usr/sbin/nfsiostat
/usr/sbin/nfsstat
/usr/sbin/rpc.gssd
/usr/sbin/rpc.idmapd
/usr/sbin/rpc.mountd
/usr/sbin/rpc.nfsd
/usr/sbin/rpc.svcgssd
/usr/sbin/rpcdebug
/usr/sbin/showmount
/usr/sbin/sm-notify
/usr/sbin/start-statd
/usr/share/doc/nfs-utils-1.3.0
/usr/share/doc/nfs-utils-1.3.0/ChangeLog
/usr/share/doc/nfs-utils-1.3.0/KNOWNBUGS
/usr/share/doc/nfs-utils-1.3.0/NEW
/usr/share/doc/nfs-utils-1.3.0/README
/usr/share/doc/nfs-utils-1.3.0/THANKS
/usr/share/doc/nfs-utils-1.3.0/TODO
/usr/share/man/man5/exports.5.gz
/usr/share/man/man5/nfs.5.gz
/usr/share/man/man5/nfsmount.conf.5.gz
/usr/share/man/man7/nfsd.7.gz
/usr/share/man/man8/blkmapd.8.gz
/usr/share/man/man8/exportfs.8.gz
/usr/share/man/man8/gssd.8.gz
/usr/share/man/man8/idmapd.8.gz
/usr/share/man/man8/mount.nfs.8.gz
/usr/share/man/man8/mountd.8.gz
/usr/share/man/man8/mountstats.8.gz
/usr/share/man/man8/nfsd.8.gz
/usr/share/man/man8/nfsdcltrack.8.gz
/usr/share/man/man8/nfsidmap.8.gz
/usr/share/man/man8/nfsiostat.8.gz
/usr/share/man/man8/nfsstat.8.gz
/usr/share/man/man8/rpc.gssd.8.gz
/usr/share/man/man8/rpc.idmapd.8.gz
/usr/share/man/man8/rpc.mountd.8.gz
/usr/share/man/man8/rpc.nfsd.8.gz
/usr/share/man/man8/rpc.sm-notify.8.gz
/usr/share/man/man8/rpc.statd.8.gz
/usr/share/man/man8/rpc.svcgssd.8.gz
/usr/share/man/man8/rpcdebug.8.gz
/usr/share/man/man8/showmount.8.gz
/usr/share/man/man8/sm-notify.8.gz
/usr/share/man/man8/statd.8.gz
/usr/share/man/man8/svcgssd.8.gz
/usr/share/man/man8/umount.nfs.8.gz
/var/lib/nfs
/var/lib/nfs/etab
/var/lib/nfs/rmtab
/var/lib/nfs/rpc_pipefs
/var/lib/nfs/statd
/var/lib/nfs/statd/sm
/var/lib/nfs/statd/sm.bak
/var/lib/nfs/state
/var/lib/nfs/v4recovery
/var/lib/nfs/xtab

Dienst/Deamon-Start einrichten

Um den xinetd/tftp-Server und den nfs-Server, welche als Dienste/Deamon als Hintergrundprozess laufen, auch nach einem Neustart des Servers zur Verfügung zu haben, sollen die Dienste/Daemon mit dem Server mit gestartet werden, was mit nachfolgenden Befehlen realisiert werden kann:

# systemctl enable xinetd.service
ln -s '/usr/lib/systemd/system/xinetd.service' '/etc/systemd/system/multi-user.target.wants/xinetd.service'
# systemctl enable rpcbind.service
ln -s '/usr/lib/systemd/system/rpcbind.service' '/etc/systemd/system/multi-user.target.wants/rpcbind.service'
ln -s '/usr/lib/systemd/system/rpcbind.socket' '/etc/systemd/system/sockets.target.wants/rpcbind.socket'
# systemctl enable nfs-server.service
ln -s '/usr/lib/systemd/system/nfs-server.service' '/etc/systemd/system/nfs.target.wants/nfs-server.service'
# systemctl enable nfs-mountd.service
ln -s '/usr/lib/systemd/system/nfs-mountd.service' '/etc/systemd/system/nfs.target.wants/nfs-mountd.service'
# systemctl enable nfs-idmap.service
ln -s '/usr/lib/systemd/system/nfs-idmap.service' '/etc/systemd/system/nfs.target.wants/nfs-idmap.service'

Eine Überprüfung, ob beim Neustart des Server der xinetd/tftp-Dienst/Deamon wirklich mit gestartet wird, kann mit nachfolgendem Befehl erfolgen und sollte eine Anzeige, wie ebenfalls nachfolgend dargestellt ausgeben:

# systemctl list-unit-files --type=service | grep xinetd.service
xinetd.service                         enabled

bzw.

# systemctl is-enabled xinetd.service
enabled

Eine Überprüfung, ob beim Neustart des Server der nfs-Dienst/Deamon wirklich mit gestartet wird, kann mit nachfolgendem Befehl erfolgen und sollte eine Anzeige, wie ebenfalls nachfolgend dargestellt ausgeben:

# systemctl list-unit-files | grep enabled | grep nfs
nfs-idmap.service                      enabled 
nfs-lock.service                       enabled 
nfs-mountd.service                     enabled 
nfs-server.service                     enabled 
nfs.target                             enabled

iptables Regel

Damit der xinetd/tftp Dienst/Daemon auch erreichbar ist und nicht die Auslieferung der rpm-Pakete vom Paketfilter iptables blockiert werden, muss nachfolgende Regeln zum iptables-Regelwerk hinzugefügt werden.

Um die aktuellen iptables-Regeln erweitern zu können, sollten diese erst einmal aufgelistet werden, was mit nachfolgendem Befehl durchgeführt werden kann:

# iptables -L -nv --line-numbers
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1    3310K 4734M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2        0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
3        0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
4        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
5        0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1        0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination

Nachfolgender Befehl, fügt folgende iptables-Regeln dem iptables-Regelwerk nach der Position 4 hinzu, ohne das der Paketfilter angehalten werden muss:

  • -A INPUT -p udp --dport 69 -j ACCEPT
  • -A INPUT -p tcp --dport 111 -j ACCEPT
  • -A INPUT -p udp --dport 111 -j ACCEPT
  • -A INPUT -p tcp --dport 892 -j ACCEPT
  • -A INPUT -p udp --dport 892 -j ACCEPT
  • -A INPUT -p tcp --dport 2049 -j ACCEPT
  • -A INPUT -p udp --dport 2049 -j ACCEPT

und hier die Befehle:

# iptables -I INPUT 5 -p udp --dport 69 -j ACCEPT
# iptables -I INPUT 6 -p tcp --dport 111 -j ACCEPT
# iptables -I INPUT 7 -p udp --dport 111 -j ACCEPT
# iptables -I INPUT 8 -p tcp --dport 892 -j ACCEPT
# iptables -I INPUT 9 -p udp --dport 892 -j ACCEPT
# iptables -I INPUT 10 -p tcp --dport 2049 -j ACCEPT
# iptables -I INPUT 11 -p udp --dport 2049 -j ACCEPT

Ein erneute Abfrage des iptables-Regelwerts, sollte dann nachfolgend dargestellte Ausgabe ergeben, was mit folgendem Befehl durchgeführt werden kann:

]# iptables -L -nv --line-numbers
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1        0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2        0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
3        0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
4        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
5        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:69
6        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:111
7        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:111
8        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:892
9        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:892    
10       0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:2049 
11       0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:2049 
12       0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1        0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination

Die neuen Zeilen sind an Position 5 (INPUT), Position 6 (INPUT), Position 7 (INPUT), Position 8 (INPUT), Position 9 (INPUT), Position 10 (INPUT) und Position 11 (INPUT) zu sehen, hier nachfolgend zur Verdeutlichung noch einmal dargestellt (nur relevanter Ausschnitt):

...
5        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:69
6        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:111
7        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:111
8        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:892
9        0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:892   
10       0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:2049 
11       0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:2049
...

Um diese iptables-Regel dauerhaft, auch nach einem Neustart des Server, weiterhin im iptables-Regelwerk zu speichern, muss nachfolgend dargestellter Befehl abschließend noch ausgeführt werden:

# /usr/sbin/iptables-save > /etc/sysconfig/iptables 

Konfiguration: DHCP-Server

Damit bei der Ausführung eines PXE-Boot auch der xinetd/tftp Dienst/Daemon/Server im Netzwerk gefunden wird, müssen nachfolgend dargestellte Konfigurationszeilen dem im Netzwerk befindlichen DHCP-Server hinzugefügt werden.

Die Installation und Konfiguration eines DHCP-Servers kann wie hier beschrieben erfolgen:

Nachfolgende Zeilen müssen zur Konfigurationsdatei

  • /etc/dhcp/dhcpd.conf

hinzugefügt werden.

(Nur relevanter Ausschnitt):

...
# ==============================================================================
# PXE-Boot options.
# ==============================================================================
 
# The booting flag is used to tell dhcpd to respond to a client.
allow booting;
 
# The bootp flag is used to tell dhcpd to respond to bootp queries.
allow bootp;
 
# The next-server statement is to specify the address where the boot file are.
next-server 192.168.0.40;
 
# The filename statement can be used to specify the name of the initial boot.
filename "/pxelinux.0";
...
...
...
# ==============================================================================
# Class declarations.
# ==============================================================================
 
class "pxeclients" {
        match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
}
...
...
...
subnet 192.168.0.0 netmask 255.255.255.0 {
...
...
...
        # ----------------------------------------------------------------------
        # Reserved IP-Address range for PXE-Boot.
        # ----------------------------------------------------------------------
 
        pool {
                default-lease-time 900;
                max-lease-time 900;
                min-lease-time 900;
                range 192.168.0.245 192.168.0.249;
                allow members of "pxeclients";
        }
 
        # ----------------------------------------------------------------------
        # Reserved IP-Address range for PXE-Boot installation.
        # ----------------------------------------------------------------------
 
        pool {
                default-lease-time 3600;
                max-lease-time 3600;
                min-lease-time 3600;
                range 192.168.0.250 192.168.0.254;
        }
 
}
...

:!: WICHTIG - Abschließend ist ein Neustart des DCHP-Servers erforderlich !!!

Der Neustart des DHCP-Servers kann durch ausführen des nachfolgenden Befehls durchgeführt werden:

# systemctl restart dhcp.service

Konfiguration

Um über den xinetd/tftp Dienst/Daemon die Auslieferung eines gespiegelten Repositorys via PXE-Boot zu realisieren, muss dem xinetd/tftp Dienst/Daemon die Fähigkeit gegeben werden, dem über PXE-Boot anfragendem System ein minimales Betriebssystem mit einem Auswahlmenü über das Netzwerk zu transferieren und zur Verfügung stellen zu können.

tftp: Benötigte Dateien

Durch das kopieren der nachfolgend genannten Dateien aus dem Verzeichnis

  • /usr/share/syslinux/pxelinux.0
  • /usr/share/syslinux/menu.c32
  • /usr/share/syslinux/vesamenu.c32
  • /usr/share/syslinux/memdisk
  • /usr/share/syslinux/mboot.c32
  • /usr/share/syslinux/chain.c32

in das Verzeichnis

  • /var/lib/tftpboot

kann ein minimales Betriebssystem, mit einem Auswahlmenü über das Netzwerk transferiert werden kann, realisiert werden.

Hier die benötigten Befehle zum kopieren der benötigten Dateien:

# cp -a /usr/share/syslinux/{pxelinux.0,menu.c32,vesamenu.c32,memdisk,mboot.c32,chain.c32} /var/lib/tftpboot

Des weiteren muss noch ein Verzeichnis erstellt werden, welche das Menü oder sogar die Menüs beinhaltet, die beim PXE-Boot angezeigt werden sollen, was mit nachfolgendem Befehl realisiert werden kann:

# mkdir /var/lib/tftpboot/pxelinux.cfg

Abschließend muss noch ein Verzeichnis erstellt werden, in dem die einzelnen Image-Dateien, welche beim Boot-Vorgang benötigt werden, durch nachfolgendem Befehl erstellt werden:

# mkdir /var/lib/tftpboot/images

Als Beispiel sollen hier das Betriebssystem CentOS in der Version 7.0.1406 für die Architekturen 64-bit erstellt werden, was mit nachfolgendem Befehl realisiert werden kann:

# mkdir -p /var/lib/tftpboot/images/centos/7.0.1406/x86_64

Anschließend müssen die benötigten Image-Dateien aus dem Verzeichnis

  • /srv/repository/private/Mirrors/centos/7.0.1406/os/x86_64/images/pxeboot

welches z.B. mit rsync transferiert wurde, in das Verzeichnis

  • /var/lib/tftpboot/images/centos/7.0.1406/x86_64 </code>

kopiert werden, wie es mit nachfolgenden Befehlen durchgeführt wird:

# cp -a /srv/repository/pub/Mirrors/centos/7.0.1406/os/x86_64/images/pxeboot/* /var/lib/tftpboot/images/centos/7.0.1406/x86_64

tftp: Boot-Menü erstellen

Um dem über PXE-Boot anfragendem System ein minimales Betriebssystem mit einem Auswahlmenü über das Netzwerk zu transferieren, sollte mindestens eine Menü-Datei erstellt werden.

Um dies zu realisieren, ist vorab eine Menü-Datei in nachfolgendem Verzeichnis mit nachfolgendem Namen zu erstellen

  • /var/lib/tftpboot/pxelinux.cfg/default

Dies kann mit nachfolgendem Befehl durchgeführt werden:

# touch /var/lib/tftpboot/pxelinux.cfg/default

tftp: Boot Menü: Text

Der Inhalt dieser Konfigurationsdatei, der anzuzeigenden Text-Auswahl, könnte wie nachfolgend dargestellt aussehen:

PROMPT 1
TIMEOUT 600
DISPLAY pxelinux.cfg/menumain.msg
F1 pxelinux.cfg/menumain.msg
 
DEFAULT localdisk
 
LABEL localdisk
	MENU LABEL Boot from local hard drive
	LOCALBOOT 0
 
LABEL ks_centos_7.0.1406_x86_64
	MENU LABEL Install CentOS 7.0 64-bit
	KERNEL images/centos/7.0.1406/x86_64/vmlinuz
	APPEND initrd=images/centos/7.0.1406/x86_64/initrd.img ramdisk_size=128000 ks=nfs:192.168.0.40:/var/lib/tftpboot/kickstart/ks_centos7.0.1406_x86_64.cfg

Die tatsächliche Bildschirmdarstellung, sprich die eigentlich sichtbare Text-Auswahl, ist in nachfolgendem Verzeichnis mit nachfolgendem Namen enthalten

  • /var/lib/tftpboot/pxelinux.cfg/menumain.cfg

Diese kann mit nachfolgendem Befehl erstellt werden:

# touch /var/lib/tftpboot/pxelinux.cfg/menumain.msg

Der Inhalt dieser Konfigurationsdatei, der tatsächlichen Text-Auswahl, könnte z.B. wie nachfolgend dargestellt aussehen:

      PXE-Boot Main Menu
      -------------------------------------------------------------------   
 
        - Type "localdisk"                 | Boot from local hard disk
 
        - Type "ks_centos_7.0.1406_x86_64" | Install CentOS 7.0 64-bit
 
 
 
 
 
 
 
 
 
 
 
 
 
      -------------------------------------------------------------------   
       After a period of 60 seconds, a boot from local hard disk starts!
      -------------------------------------------------------------------
 
      [F1-Main]

tftp: Boot Menü: Menü

Der Inhalt dieser Konfigurationsdatei, des anzuzeigenden Text-Menüs, könnte wie nachfolgend dargestellt aussehen:

TIMEOUT 600
DEFAULT menu.c32
 
MENU TITLE PXE Boot Menu
LABEL 1
	MENU LABEL ^1. Boot from local hard drive
	LOCALBOOT 0
 
MENU SEPARATOR
 
LABEL 2
	MENU LABEL ^2. Install CentOS 7.0 64-bit
	KERNEL images/centos/7.0.1406/x86_64/vmlinuz
	APPEND initrd=images/centos/7.0.1406/x86_64/initrd.img ramdisk_size=128000 ks=nfs:192.168.0.40:/var/lib/tftpboot/kickstart/ks_centos_7.0.1406_x86_64.cfg

Das Aussehen des Text-Menüs, könnte wie nachfolgend dargestellt aussehen:

PXE Boot Menü - Menü

tftp: Boot Menü: grafisches Menü

Der Inhalt dieser Konfigurationsdatei, des anzuzeigenden grafischen Menüs, könnte wie nachfolgend dargestellt aussehen:

TIMEOUT 600
DEFAULT vesamenu.c32
 
MENU TITLE PXE Boot Menu
MENU BACKGROUND pxelinux.cfg/default_640x480.png
 
LABEL 1
        MENU LABEL ^1. Boot from local hard drive
        LOCALBOOT 0
 
MENU SEPARATOR
 
LABEL 2
        MENU LABEL ^2. Install CentOS 7.0 64-bit
        KERNEL images/centos/7.0.1406/x86_64/vmlinuz
        APPEND initrd=images/centos/7.0.1406/x86_64/initrd.img ramdisk_size=128000 ks=nfs:10.7.0.40:/var/lib/tftpboot/kickstart/ks_centos_7.0.1406_x86_64.cfg

:!: WICHTIG - Die angegebene Hintergrundgrafik muss entsprechend erstellt werden!

Das Aussehen des grafischen Menüs, könnte wie nachfolgend dargestellt aussehen:

PXE Boot Menü - grafisches Menü

tftp: Boot-Menü Dateirechte

:!: WICHTIG - Damit der xinetd/tftp-Server auch das Boot-Menü verwenden kann, müssen die Dateirechte angepasst werden !!!

Es müssen die Dateirechte ALLER sich im Verzeichnis

  • /var/lib/tftpboot/pxelinux.cfg

befindlichen Dateien, mit nachfolgendem Befehl wie folgt abgeändert werden:

# chmod 777 /var/lib/tftpboot/pxelinux.cfg/* 

xinetd: /etc/xinet.d/tftp

Um die Auslieferung eines gespiegelten Repositorys via PXE-Boot zu realisieren, muss dessen Komponente xinetd/tftp als Dienst/Deamon als Hintergrundprozess laufen. Dazu ist nachfolgende Konfiguration des xinetd/tftp Dienst/Demon notwendig.

Die Konfigurationsdatei, welche hierfür angepasst werden muss, ist unter folgendem Verzeichnis und mit nachfolgendem Namen zu finden:

  • /etc/xinet.d/tftp

Die durchzuführende Anpassung sieht wie folgt aus:

(Komplette Konfigurationsdatei):

# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /var/lib/tftpboot
        # Tachtler
        # default: disable                      = yes
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

nfs: /etc/sysconfig/nfs

Um die Auslieferung eines gespiegelten Repositorys via NFS-Server zu realisieren, muss dessen Komponente nfs-server als Dienst/Deamon als Hintergrundprozess laufen. Dazu ist nachfolgende Konfiguration des nfs-server Dienst/Demon notwendig.

Die Konfigurationsdatei, welche hierfür angepasst werden muss, ist unter folgendem Verzeichnis und mit nachfolgendem Namen zu finden:

  • /etc/sysconfig/nfs

Die durchzuführende Anpassung sieht wie folgt aus:

:!: BIS CentOS Version –> 7.3 ←- (Komplette Konfigurationsdatei):

#
# Optinal options passed to rquotad
# Tachtler
# default: RPCRQUOTADOPTS=""
RPCRQUOTADOPTS="-p 875"
#
# Optional arguments passed to in-kernel lockd
#LOCKDARG=
# TCP port rpc.lockd should listen on.
# Tachtler
# default: #LOCKD_TCPPORT=32803
LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
# Tachtler
# default: #LOCKD_UDPPORT=32769
LOCKD_UDPPORT=32769
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
# Tachtler - Enable mount NFSv2 (for older clients)
# default: RPCNFSDARGS=""
RPCNFSDARGS="-V 2"
# Number of nfs server processes to be started.
# The default is 8. 
RPCNFSDCOUNT=8
# Set V4 grace period in seconds
#NFSD_V4_GRACE=90
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
# Tachtler
# default: RPCMOUNTDOPTS=""
RPCMOUNTDOPTS="-p 892"
# Port rpc.mountd should listen on.
#MOUNTD_PORT=892
#
# Optional arguments passed to rpc.statd. See rpc.statd(8)
# Tachtler
# default: STATDARG=""
STATDARG="-p 662 -o 2020"
#
# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
RPCIDMAPDARGS=""
#
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
RPCGSSDARGS=""
# Enable usage of gssproxy. See gssproxy-mech(8).
GSS_USE_PROXY="no"
#
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
RPCSVCGSSDARGS=""
#
# Optional arguments passed to blkmapd. See blkmapd(8)
BLKMAPDARGS=""

:!: AB CentOS Version –> 7.4 ←- (Komplette Konfigurationsdatei):

#
# Optinal options passed to rquotad
# Tachtler
# default: RPCRQUOTADOPTS=""
RPCRQUOTADOPTS="-p 875"
#
# Optional arguments passed to in-kernel lockd
#LOCKDARG=
# TCP port rpc.lockd should listen on.
# Tachtler
# default: #LOCKD_TCPPORT=32803
LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
# Tachtler
# default: #LOCKD_UDPPORT=32769
LOCKD_UDPPORT=32769
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
# Tachtler - Enable mount NFSv2 (for older clients)
# default: RPCNFSDARGS=""
RPCNFSDARGS="-V 2"
# Number of nfs server processes to be started.
# The default is 8. 
RPCNFSDCOUNT=8
# Set V4 grace period in seconds
#NFSD_V4_GRACE=90
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
# Tachtler
# default: RPCMOUNTDOPTS=""
# RPCMOUNTDOPTS=""
# Port rpc.mountd should listen on.
# default: #MOUNTD_PORT=892
MOUNTD_PORT=892
# Optional arguments passed to rpc.statd. See rpc.statd(8)
# Tachtler
# default: STATDARG=""
STATDARG="-p 662 -o 2020"
#
# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
RPCIDMAPDARGS=""
#
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
RPCGSSDARGS=""
# Enable usage of gssproxy. See gssproxy-mech(8).
GSS_USE_PROXY="no"
#
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
RPCSVCGSSDARGS=""
#
# Optional arguments passed to blkmapd. See blkmapd(8)
BLKMAPDARGS=""

:!: WICHTIG - Diese Konfiguration dient dazu, die zufällige Zuweisung von Ports für den rpc.mountd Dienst/Daemon zu unterbinden und immer den Port 892 zu verwenden, da sonst Firewall-Freischaltungen zu einem Problem werden würden. Die weiteren Änderungen sind optional, aber vorausschauend für eine erweiterte Nutzung bereits vorkonfiguriert.

:!: HINWEIS - Ein Überprüfung, welche NFS Versionen unterstützt werden, kann mit nachfolgendem Befehl durchgeführt werden:

# cat /proc/fs/nfsd/versions
+2 +3 +4 +4.1 -4.2

bzw.

# rpcinfo -s
   program version(s) netid(s)                         service     owner
    100000  2,3,4     local,udp,tcp                    portmapper  superuser
    100005  3,2,1     tcp,udp                          mountd      superuser
    100024  1         tcp,udp                          status      29
    100003  4,3,2     udp,tcp                          nfs         superuser
    100227  3,2       udp,tcp                          nfs_acl     superuser
    100021  4,3,1     tcp,udp                          nlockmgr    superuser

* Wichtig ist hier die Zeile mit service: nfs

nfs: /etc/nfsmount.conf

Um die Auslieferung eines gespiegelten Repositorys via NFS-Server zu realisieren, muss dessen Komponente nfs-mountd als Dienst/Deamon als Hintergrundprozess laufen. Dazu ist nachfolgende Konfiguration des nfs-mountd Dienst/Demon notwendig.

Die Konfigurationsdatei, welche hierfür angepasst werden muss, ist unter folgendem Verzeichnis und mit nachfolgendem Namen zu finden:

  • /etc/nfsmount.conf

Die durchzuführende Anpassung sieht wie folgt aus:

(Komplette Konfigurationsdatei):

#
# /etc/nfsmount.conf - see nfsmount.conf(5) for details
#
# This is an NFS mount configuration file. This file can be broken
# up into three different sections: Mount, Server and Global
# 
# [ MountPoint "Mount_point" ] 
# This section defines all the mount options that
# should be used on a particular mount point. The '<Mount_Point>'
# string need to be an exact match of the path in the mount 
# command. Example:
#     [ MountPoint "/export/home" ]
#       background=True
# Would cause all mount to /export/home would be done in
# the background
#
# [ Server "Server_Name" ]
# This section defines all the mount options that
# should be used on mounts to a particular NFS server. 
# Example:
#     [ Server "nfsserver.foo.com" ]
#       rsize=32k
#       wsize=32k
# All reads and writes to the 'nfsserver.foo.com' server 
# will be done with 32k (32768 bytes) block sizes.
#
[ NFSMount_Global_Options ]
# This statically named section defines global mount 
# options that can be applied on all NFS mount.
#
# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
# Tachtler
# default: # Defaultvers=4
Defaultvers=4
#
# Setting this option makes it mandatory the server supports the
# given version. The mount will fail if the given version is 
# not support by the server. 
# Tachtler
# default: # Nfsvers=4
Nfsvers=4
#
# Network Protocol [udp,tcp,rdma] (Note: values are case sensitive)
# This defines the default network protocol which will
# be used to start the negotiation with the server.
# Defaultproto=tcp
#
# Setting this option makes it mandatory the server supports the
# given network protocol. The mount will fail if the given network
# protocol is not supported by the server.
# Proto=tcp
#
# The number of times a request will be retired before 
# generating a timeout 
# Retrans=2
#
# The number of minutes that will retry mount
# Retry=2
#
# The minimum time (in seconds) file attributes are cached
# acregmin=30
#
# The Maximum time (in seconds) file attributes are cached
# acregmin=60
#
# The minimum time (in seconds) directory attributes are cached
# acregmin=30
#
# The Maximum time (in seconds) directory attributes are cached
# acregmin=60
#
# Enable Access  Control  Lists
# Acl=False
#
# Enable Attribute Caching
# Ac=True
#
# Do mounts in background (i.e. asynchronously)
# Background=False
#
# Close-To-Open cache coherence
# Cto=True
#
# Do mounts in foreground (i.e. synchronously)
# Foreground=True
#
# How to handle times out from servers (Hard is STRONGLY suggested)
# Hard=True
# Soft=False
#
# Enable File Locking
# Lock=True
#
# Enable READDIRPLUS on NFS version 3 mounts
# Rdirplus=True
#
# Maximum Read Size (in Bytes)
# Rsize=8k
#
# Maximum Write Size (in Bytes)
# Wsize=8k
#
# Maximum Server Block Size (in Bytes)
# Bsize=8k
#
# Ignore unknown mount options
# Sloppy=False
#
# Share Data and Attribute Caches
# Sharecache=True
#
# The amount of time, in tenths of a seconds, the client
# will wait for a response from the server before retransmitting
# the request.
# Timeo=600
#
# Sets all attributes times to the same time (in seconds)
# actimeo=30
#
# Server Mountd port mountport
# mountport=4001
#
# Server Mountd Protocol
# mountproto=tcp
#
# Server Mountd Version
# Tachtler
# default: # mounvers=3
mounvers=4
#
# Server Mountd Host
# mounthost=hostname
#
# Server Port
# Port=2049
#
# RPCGSS security flavors 
# [none, sys, krb5, krb5i, krb5p ]
# Sec=sys

Nachfolgende Änderungen sind durchzuführen:

Einstellen der Protokoll-Version auf die Version 4:

# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
# Tachtler
# default: # Defaultvers=4
Defaultvers=4

Den nfs-server Dienst/Deamon bzw. Server die Version 4 zu unterstützen:

# Setting this option makes it mandatory the server supports the
# given version. The mount will fail if the given version is 
# not support by the server. 
# Tachtler
# default: # Nfsvers=4
Nfsvers=4

Den nfs-mountd Dienst/Deamon bzw. Server die Version 4 zu verwenden:

# Server Mountd Version
# Tachtler
# default: # mounvers=3
mounvers=4

:!: WICHTIG - Diese Konfiguration dient dazu, die NFS-Version für den nfs-mountd Dienst/Daemon auf die Version 4 einszustellen, da sonst nachfolgender Fehler aufreten kann:

... mount.nfs requested NFS version or transport protocol is not supported

nfs: /etc/exports

Um auf die Verzeichnisse im NFS-Server zugreifen zu können ist nachfolgend dargestellte Konfiguration notwendig.

Nachfolgende Ergänzung an der Konfigurationsdatei

  • /etc/exports

die standardmäßig leer ist und wie nachfolgend dargestellt gefüllt werden muss, sind durchzuführen.

Hier die Anpassungen an der Konfigurationsdatei:

/srv/repository/pub/Mirrors        192.168.0.0/255.255.255.0(ro,sync,no_root_squash) 192.168.1.0/255.255.255.0(ro,sync,no_root_squash) 192.168.2.0/255.255.255.0(ro,sync,no_root_squash)
/var/lib/tftpboot/kickstart        192.168.0.0/255.255.255.0(ro,sync,no_root_squash) 192.168.1.0/255.255.255.0(ro,sync,no_root_squash) 192.168.2.0/255.255.255.0(ro,sync,no_root_squash)

nfs: /etc/netconfig

Um die Verwendung von IPv6 in Verbindung mit z.B. nfs-server zu unterbinden, ist nachfolgend dargestellte Konfiguration notwendig.

Nachfolgende Konfiguration an der Konfigurationsdatei

  • /etc/netconfig

muss wie nachfolgend dargestellt angepasst werden:

Hier die Anpassungen an der Konfigurationsdatei:

#
# The network configuration file. This file is currently only used in
# conjunction with the TI-RPC code in the libtirpc library.
#
# Entries consist of:
#
#       <network_id> <semantics> <flags> <protofamily> <protoname> \
#               <device> <nametoaddr_libs>
#
# The <device> and <nametoaddr_libs> fields are always empty in this
# implementation.
#
udp        tpi_clts      v     inet     udp     -       -
tcp        tpi_cots_ord  v     inet     tcp     -       -
# Tachtler
# default: udp6       tpi_clts      v     inet6    udp     -       -
# udp6       tpi_clts      v     inet6    udp     -       -
# Tachtler
# default: tcp6       tpi_cots_ord  v     inet6    tcp     -       -
# tcp6       tpi_cots_ord  v     inet6    tcp     -       -
rawip      tpi_raw       -     inet      -      -       -
local      tpi_cots_ord  -     loopback  -      -       -
unix       tpi_cots_ord  -     loopback  -      -       -

kickstart einrichten

Um ein wenig mehr Komfort in die Installation zu bringen, kann eine sogenannte „Kickstart“-Konfigurationsdatei erstellt werden, in der Angaben enthalten sind, welche sonst während der Installation eingegeben werden müssen, dies können z.B.:

  • Sprache
  • Tastaturlayout
  • Zeitzone
  • uvm.

sein.

Zuerst soll ein Verzeichnis mit nachfolgendem Pfad und unter nachfolgendem Namen erstellt werden, was mit nachfolgendem Befehl durchgeführt werden kann:

# mkdir /var/lib/tftpboot/kickstart

Anschließend soll dann eine „Kickstart“ Datei im vorhergehend erzeugtem Verzeichnis mit nachfolgendem Namen mit nachfolgendem Befehl erstellt werden:

# touch /var/lib/tftpboot/kickstart/ks_centos_7.0.1406_x86_64.cfg

Unter nachfolgendem internen Link können weitere Informationen zur Erstellung einer „Kickstart“-Datei in Erfahrung gebracht werden:

Dienste/Deamon starten

xinetd: Starten

Um die Auslieferung eines gespiegelten Repositorys via PXE-Boot zu realisieren, muss dessen Komponente xinetd/tftp als Dienst/Deamon als Hintergrundprozess laufen. Um starten des xinetd/tftp als Dienst/Deamon kann nachfolgender Befehl verwendet werden:

# systemctl start xinetd.service

Eine einfache Überprüfung, ob der xinetd/tftp Dienst/Daemon auch wirklich gestartet ist, kann unter anderem mit nachfolgendem Befehl durchgeführt werden:

# netstat -tulpen | grep xinetd       
udp        0      0 0.0.0.0:69              0.0.0.0:*                   0          108048     8242/xinetd

nfs: Starten

Um die Auslieferung eines gespiegelten Repositorys via NFS-Server zu realisieren, muss dessen Komponente nfs-server als Dienst/Deamon als Hintergrundprozess laufen. Um starten des nfs-server als Dienst/Deamon kann nachfolgenden Befehlen verwendet werden:

# systemctl start rpcbind.service

und

# systemctl start nfs-server.service

Eine einfache Überprüfung, ob der nfs Dienst/Daemon auch wirklich gestartet ist, kann unter anderem mit nachfolgendem Befehl durchgeführt werden:

# netstat -tulpen | egrep '(rpc|-)'
Proto Recv-Q Send-Q Local Address   Foreign Address    State       User       Inode      PID/Program name    
tcp        0      0 0.0.0.0:892     0.0.0.0:*          LISTEN      0          112807     8567/rpc.mountd     
tcp        0      0 0.0.0.0:2049    0.0.0.0:*          LISTEN      0          113013     -                   
tcp        0      0 0.0.0.0:32803   0.0.0.0:*          LISTEN      0          113018     -                   
tcp        0      0 0.0.0.0:875     0.0.0.0:*          LISTEN      0          113151     8594/rpc.rquotad    
tcp        0      0 0.0.0.0:111     0.0.0.0:*          LISTEN      0          111608     8498/rpcbind        
tcp        0      0 0.0.0.0:662     0.0.0.0:*          LISTEN      29         111798     8508/rpc.statd      
udp        0      0 0.0.0.0:875     0.0.0.0:*                      0          113146     8594/rpc.rquotad    
udp        0      0 0.0.0.0:892     0.0.0.0:*                      0          112804     8567/rpc.mountd     
udp        0      0 0.0.0.0:32769   0.0.0.0:*                      0          113017     -                   
udp        0      0 0.0.0.0:2049    0.0.0.0:*                      0          113016     -                
udp        0      0 0.0.0.0:616     0.0.0.0:*                      0          111607     8498/rpcbind        
udp        0      0 0.0.0.0:111     0.0.0.0:*                      0          111606     8498/rpcbind        
udp        0      0 127.0.0.1:659   0.0.0.0:*                      0          111792     8508/rpc.statd      
udp        0      0 0.0.0.0:662     0.0.0.0:*                      29         111795     8508/rpc.statd

Problemlösungen

Service: rpcbind.socket

:!: HINWEIS - NUR relevant, wenn IPv6 deaktiviert wurde!

Falls nachfolgende Fehlermeldungen in /var/log/messages oder beim Starten des Dienstes/Daemon rpcbind.socket zu sehen sind:

... Binding to IPv6 address not available since kernel does not support IPv6.
... [/usr/lib/systemd/system/rpcbind.socket:6] Failed to parse address value, ignoring: [::]:111

liegt dies daran, dass bei diesem Server IPv6 deaktiviert wurde und dies aktuell von dem Dienstes/Daemon rpcbind.socket nicht honoriert wird.

Nachfolgende Lösung aus nachfolgendem Bug-Report sollte demnach hier angewendet werden (siehe externen Link):

Nachfolgende Schritte sind konkret durchzuführen:

Anlegen eines Verzeichnisses in nachfolgendem Pfad und mit nachfolgendem Namen:

# mkdir /etc/systemd/system/rpcbind.socket.d

Anschließend wird eine Konfigurationsdatei mit nachfolgendem Namen und Inhalt erzeugt:

# vim /etc/systemd/system/rpcbind.socket.d/override.conf

Inhalt:

[Socket]
ListenStream=
ListenStream=/var/run/rpcbind.sock
ListenStream=0.0.0.0:111

Anschließend kann der Dienstes/Daemon rpcbind.socket neu gestartet werden:

# systemctl restart rpcbind.socket

Mit nachfolgendem Befehl kann nun überprüft werden, ob der Dienstes/Daemon rpcbind.socket wie erwartet ordnungsgemäß läuft:

# systemctl status rpcbind.socket
● rpcbind.socket - RPCbind Server Activation Socket
   Loaded: loaded (/usr/lib/systemd/system/rpcbind.socket; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/rpcbind.socket.d
           └─override.conf
   Active: active (running) since Sat 2017-01-14 06:13:55 CET; 11min ago
   Listen: /var/run/rpcbind.sock (Stream)
           0.0.0.0:111 (Stream)

Jan 14 06:13:55 vml70040.idmz.tachtler.net systemd[1]: Listening on RPCbind S...
Jan 14 06:13:55 vml70040.idmz.tachtler.net systemd[1]: Starting RPCbind Serve...
Hint: Some lines were ellipsized, use -l to show in full.
Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
tachtler/repository_ausliefern_centos_7.txt · Zuletzt geändert: 2017/09/16 17:04 von klaus