Install the debmirror Utility

Contents
cla140
Contents
The debmirror utility synchronizes a Debian mirror repository from the parent repository. Install the debmirror utility on computers hosting the mirror repository to be able to synchronize the mirrors.
Install debmirror on Ubuntu OS
Execute the following command to install the debmirror utility on Ubuntu OS:
sudo apt-get install debmirror
On successful execution of the command, the debmirror utility is installed.
Install debmirror on RedHat or SUSE
This section describes how you can set up a Debian mirror on RedHat or SUSE computers. As DSM scalability servers are not supported on Debian, you can set up mirrors of the Debian system on RedHat or SUSE computers.
Verify Prerequisites
Verify the following prerequisites before you set up a Debian mirror:
  • Perl 5.14 or later is installed on the target computer.
  • The master server from which the repository is going to be mirrored is already configured. For example, if debmirror uses the HTTP download method, configure the master server to expose a virtual directory of the repository. Similar configurations are required for FTP, if used.
Download Perl Scripts for using Debmirror
Debmirror is a perl script that mirrors Debian repositories on RedHat or SUSE computers. Debmirror requires certain perl modules to be present.
Follow these steps:
  1. Verify that the following perl modules are present:
    • LockFile::Simple;
    • Compress::Zlib;
    • Digest::MD5;
    • Digest::SHA;
    • Net::INET6Glue;
    • LWP::UserAgent
    Few of the perl modules come with default installation. If the modules are not available, install the modules using one of the following approaches:
Approach 1: Using the cpanminus tool
Install cpanminus tool that downloads perl modules. Do one of the following actions to install the cpanminus tool:
Run the cpan App::cpanminus command.
  • Run the RPM package for cpanminus, which can be downloaded from the following location:
    http://rpmfind.net/linux/rpm2html/search.php?query=cpanminus
Run the following command to install the required perl modules:
cpan m <module-name>
Examples:
To install LockFile::Simple module, run the cpanm LockFile::Simple command.
To install Net::INET6Glue module, run the cpanm Net::INET6Glue command.
The command downloads the perl modules from Internet and installs the modules. This command automatically resolves dependencies.
Verify that the Perl modules are installed.
Approach2: Using the src packages
Download the perl module package tar from http://www.cpan.org/modules/index.html.
  1. Extract the tar.
  2. Run the perl MakeFile.PL command. This command generates a makefile.
  3. Run the make command.
  4. Run the make install command.
    Ensure
    that
    you resolve the dependencies manually. For example, Net::INET6Glue depends on the Socket6 module. Verify that you install Socket6 before installing Net::INET6Glue. You can find the dependencies at the following location:
    http://deps.cpantesters.org/
  5. Verify that the Perl modules are installed.
For Approach 1 and Approach 2, verify that gcc is installed on the RedHat or SUSE computers.
Approach3: Using the rpm sources
Search for the following perl modules on the Internet and install the modules using YUM:
perl-Compress-Zlib-1.42-1.fc6
  • perl-Digest-SHA1-2.11-1.2.1.i386.rpm
  • perl-LockFile-Simple-0.206-1.el5.rf.noarch.rpm
  • perl-Digest-MD5-M4p-0.01-1.2.el5.rf.i386.rpm
If you do not find the libnet-inet6glue-perl module on the Internet, download the source files and build the binaries manually using approach 2.
Verify that the Perl modules are installed.
Install debmirror
Install the debmirror utility on computers hosting the mirror repository to be able to create mirrors of the master Debian repository.
Follow these steps:
  1. Get the latest debmirror (currently debmirror_2.14ubuntu1.tar.gz) src from http://archive.ubuntu.com/ubuntu/pool/universe/d/debmirror/.
  2. Extract the tar file and copy the debmirror perl script to "/usr/bin" location on the RHEL/SUSE computer.
  3. Run the debmirror command.