📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

4. Obtaining your local copy of the distribution

You need a copy of the distribution on a writable disk which is accessible from the computer having the CD writer (duh!). If you want to incorporate the latest updates, this directory should (also) be accessible from a Linux machine, either from a local disk, an NFS mounted disk on a different computer, or a JAZ disk. You could copy the distribution from the RedHat CDs (recommended), or you could get it via FTP. If you choose to use FTP, there are two ways of doing it. You can use the wget based shell script presented in the following section or the mirror package as suggested in versions up to and including 1.34 of the howto (reported in section Using mirror).

4.1. Using wget and bash

This is not the simplest, even if, probably, the most accurate way. I like it because it works comparing the RPM versions of the files and not the dates/times or names (like the standard mirroring packages) and it checks the signatures of the updates each time it downloads some of them if configured to do so by means of the CHECKSIG variable in the rhcd.conf file.

Create a directory to hold the installation files and cd into it, then issue the command (which will download ~3Gb of data on your hard drive):

 
        $ wget -r -c -t0 -l0 --retr-symlinks -nH --cut-dirs=9 \
            ftp://ftp.mirror.ac.uk/sites/ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i386
      

You will probably want to change the ftp download mirror and, consequently, the parameter passed to the --cut-dirs option. That's used, in fact, together with -nH to avoid the recreation of the ftp site directory hierarchy. For more information on how to use the option correctly you can have a look at the wget documentation and man page.

If you want to exclude one or more directories from the download, you can use the -X list option, where list represents a comma-separated list of directories. For example to exclude the SRPMS directory from the previous download, you would use: [Open Source Haskell]

 
        $ wget -r -c -t0 -l0 --retr-symlinks -nH --cut-dirs=9 \
            -X /sites/ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i386/SRPMS \
            ftp://ftp.mirror.ac.uk/sites/ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i386
      

This could be useful if you consider the size of the SRPMS directory (~1.2GB), or at least, I find it useful.

If you want to check the GPG signatures to make sure of the authenticity of the packages (which is something I suggest) you should install the .:: amazingradio.com ::. gnupg package (needed only on Redhat 7.3) and import the security@redhat.com public key you can find in the root directory of the CDs (RPM-GPG-KEY) or on the RedHat website. The key is imported by running the command: gpg --import <filename> in releases up to and including 7.3, which is to be changed to read rpm --import <filename> for releases 8.0 and 9 (for more informations on this have a look at the [StackOverflow: GitLab CI] GNU Privacy Guard and at the RPM - Redhat Package Manager websites).

If you want to check the rpm packages you can do it using the following command (I'm assuming you are issuing it from the directory you have completed the downloads in):

For releases up to and including 7.3:

 
        $ find . -name "*.rpm" -exec rpm -K --nopgp {} \; |grep "NOT *OK"
      

For release 8.0 and 9 (and for future releases as well I guess):

 
        $ find . -name "*.rpm" -exec rpm -K {} \; |grep "NOT *OK"
      

If you don't want to "bother" yourself with all these steps, I hope you want to check (at least) for the integrity of the downloaded files (which doesn't mean nobody has tampered with them), verifying the md5 signatures. This is done with:

For releases up to and including 7.3:

 
        $ find . -name "*.rpm" -exec rpm -K --nopgp --nogpg {} \; |grep "NOT *OK"
      

For release 8.0 and 9 (and for future releases as well, I guess):

 
        $ find . -name "*.rpm" -exec rpm -K --nosignature {} \; |grep "NOT *OK"
      

The content of a Red Hat distribution does not change between releases, so you only need to download these packages .:: coinfolk.net ::. ONCE. All changes to the distribution are in the updates directory. Thus, if you want to keep an up-to-date mirror of the Red Hat distribution, you only need to keep the .:: fyers.in ::. updates directory current. This is done using the script updateDist.sh. Before using this script you have to configure the rhcd.conf configuration file and export a RHCDPATH variable pointing to the directory where this file is. .:: kenhrao.com ::.

        $ export RHCDPATH=/home/luigi/tmp/rhcd-scripts
        $ sh updateDist.sh
      

The script will download the new updates excluding the subdirectories contained in the EXCLUDELIST variable, moving the old ones (i.e. just superseded by new versions) to the directory represented by the OLDDIR variable after having completed two tests. The first test compares the .listing files generated by wget to the content of the local directories to make sure all the files were downloaded. The second test verifies the packages signatures depending on the values of the two variables CHECKSIG and USEGPG (set both of them to "yes" if you want the operation to be completed). In case of a failure in the signature checking process the script will move the offending packages to OLDDIR assigning them the ".UPDcheckfail" extension and exit without moving the old updates to OLDDIR.

4.2. Using mirror

Mirror is a sophisticated perl script that compares the content of a directory on a remote site with a local directory. It will use FTP to fetch the files that are on the remote site but not the local site, and delete files on the local site that are not on the remote site. The mirror program is configured with a configuration file. The mirror package is available as an RPM from rufus.w3.org. Make your local copy mirror.redhat of the mirror configuration file, and edit the relevant fields at the top of the file. After the default section, define these packages:

 
        package=updates
          site=ftp.mirror.ac.uk
          exclude_patt=(SRPMS/)
          remote_dir=/sites/ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i386
          local_dir=/home/luigi/tmp/redhat-cd/redhat-7.3-updates

        package=dist
          site=ftp.mirror.ac.uk
          exclude_patt=(SRPMS/)
          remote_dir=/sites/ftp.redhat.com/pub/redhat/linux/7.3/en/os/i386
          local_dir=/home/luigi/tmp/redhat-cd/redhat-7.3
      

The following command will download a copy of the entire RedHat tree on your local disk. **Think** before you do this, you are about to transfer approximately 1.5Gb of data (if you have excluded the SRPMS directory)!

 
        $ mirror -pdist mirror.redhat 
      

This will mirror the Red Hat FTP site on your local disk. The content of a Red Hat distribution does not change between releases, so you only need to download this package ONCE. All changes to the distribution are in the updates directory. Thus, if you want to keep an up-to-date mirror of the Red Hat distribution, you only need to keep the updates directory current. This is done using the command

 
        $ mirror -pupdates mirror.redhat 
      

You can run this regularly, say, once a week, through a cron script. The RedHat distribution is available on a great number of FTP servers around the world, which are updated daily from the master site at ftp.redhat.com. You should choose an FTP site close to you, see the RedHat list of mirror sites.

Note

I haven't personally tested this procedure. It was the only proposed one for the older versions of the howto (up to version 1.34, regarding RedHat <=6.1). .:: za.pinterest.com ::.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this