LCFG some use cases by wanghonghx


									                             Installation of a LCFG server

                                       Enrico Ferro

E. Ferro, CNAF, april 2002                                   1
                             What is a LCFG server?

       Currently it is a:
         – DHCP server: provides the basic network configuration during
            the automatic installation
         – NFS server: provides the RPMs required to install the clients
            and the RPM lists via NFS
         – HTTP server: the configuration of the nodes is distributed with
            a web server.
       All these functionalities can be splitted (e.g. using an existing
        DHCP server)

E. Ferro, CNAF, april 2002                                                   2
                                      How LCFG works in 1 slide

                                                                                     Config files

                                                             telnet login ftp
                      LCFG Config Files                             +inet.allow             XML profiles
                                                                        Read telnet login ftp sshd
                                                           HTTP +inet.allow_telnet ALLOWED_NETWORKS
                                                                         rdxprof        Profile
                                                                    +inet.allow_login    ALLOWED_NETWORKS
                                                               <inet>                    ALLOWED_NETWORKS
                         /etc/group                                  +inet.allow_sshd    ALL
                             Make XML                                                         Object
                                                                    <allow cfg:template="allow_$ tag_$ daemon_$">
                     /etc/hosts.allow                                +inet.daemon_sshd   yes
                                                                    <allow_RECORD cfg:name="telnet">
                              Profile              Web Server       .....
                     in.telnetd : 192.168., 192.135.30.               <allow>192.168., 192.135.30.</allow>
                                                                             Local cache
                     in.rlogind : 192.168., 192.135.30.               </allow_RECORD> inet myckey
                     in.ftpd : 192.168., 192.135.30.              +auth.userhome_mickey
                                                               .....                          LCFG Objects

                      sshd : ALL                                  +auth.usershell_mickey
                                                               </auth>                        /bin/tcsh

                               Server                                                Client nodes
                                                                     <user_RECORD cfg:name="mickey">
                 Abstract configuration                                        A collection
                                                                     </user_RECORD>        of agents read
                 parameters for all nodes                                     configuration parameters and
                 stored in a central                                          either generate traditional config
                 repository                                                   files or directly manipulate various
E. Ferro, CNAF, april 2002                                                                                           3

       Get the server installation guide from:
       Get the WP6 testbed installation guide with LCFG from
       Get installation software is present in:

E. Ferro, CNAF, april 2002                                                 4
                             1. Packages to install in the server

       Your LCFG server should be installed with RedHat 6.2 with NFS
        server support. Install all the updates you want but not the rpm-
       Get the packages listed in the Server Installation Guide at 2.2 and
        install them in your LCFG server. Use always the latest version

E. Ferro, CNAF, april 2002                                                    5
                             2. Solve RPM compatibility

       LCFG uses a feature that was present in the first versions: this
        feature is no more supported.
       It is necessary to install a patched rpm package:
          – rpm -F --force rpm-3.0.5-9.6x.1.edg.i386.rpm
          – rpm -F --force rpm-devel-3.0.5-9.6x.1.edg.i386.rpm
          – rpm -F --force rpm-build-3.0.5-9.6x.1.edg.i386.rpm
       Rebuild the RPM database:
          – rpm --rebuilddb

E. Ferro, CNAF, april 2002                                                 6
                                 3. DHCP server

       Install the dhcp server provided with RedHat:
                – rpm -ivh dhcp-2.0-5.rpm
       Create an empty leases file:
         – touch /var/state/dhcp/dhcpd.leases
       Create /etc/dhcpd.conf as described in section 3.1 of the "Server
        Installation Guide"
       Start the DHCP server
         – /etc/rc.d/init.d/dhcpd start

E. Ferro, CNAF, april 2002                                                  7
                             4. HTTP server

       The directory /var/obj/conf/profile/web is used by LCFG tools to
        publish the configuration of the nodes
         – ln -s /var/obj/conf/profile/web /home/httpd/html
       Apache server should start at boot time:
         – /sbin/chkconfig --add htttpd
       To start it now:
         – /etc/rc.d/init.d/httpd start

E. Ferro, CNAF, april 2002                                                 8
                             5. /etc/services

       These ports are used by LCFG to send notifications and to get
        ack from the clients. Add these lines /etc/services:
         – lcfg      732/udp
         – lcfgack 733/udp

E. Ferro, CNAF, april 2002                                              9
                             6. RPM repositories

       All the repositories used by LCFG are located in
       Create the directories as described in
       Fill the repositories with the RPM from
       A tool was done by Steve Traylen to simplify the download

E. Ferro, CNAF, april 2002                                           10
                             7. Create the installroot

       The installroot is a reduced Linux filesystem mounted via NFS
        during the first installation.
       To create the installroot:
         – cd /opt/local/linux/installrootmake create

E. Ferro, CNAF, april 2002                                              11
                             8. Export directories via NFS

       You have to export via NFS the RPM repositories, the RPM lists
        and the installroot.
       Add this line to /etc/exports
         – /opt/local/linux/ *(ro,no_root_squash)
       Start the NFS server
         – /etc/rc.d/init.d/nfs start

E. Ferro, CNAF, april 2002                                               12
                             9. Download latest RPM lists
       From:
       Download latest LCFG RPM lists and put them into:
         – /opt/local/linux/6.2/rpmcfg

E. Ferro, CNAF, april 2002                                                   13
                             10. Download latest LCFG resources

     From:
     Download latest LCFG resource files and put them into:
       – /var/obj/conf/profile/source

E. Ferro, CNAF, april 2002                                                 14
                             11. Customize your resources

                In theory only site-cfg.h. These resources are for a site with
                  – 1 CE
                  – 1 SE
                  – 1 WN
                  – 1 UI

E. Ferro, CNAF, april 2002                                                        15
                             12. Get the boot disk

       Download the disk image
       Write the disk image into a diskette
       Boot from the diskette to start the installation

E. Ferro, CNAF, april 2002                                      16

To top