This page will contain all the information pertaining to the configuration/use of the EPEL and ELRepo repositories managed by ChemIT 

See also

Contents

At time of writing, the repository contains content from the epel and elrepo repositories for CentOS 6 and 7 (across i386 and x86_64 architectures).

Configuration

  • The extra packages used outside of a minimum centos install were httpd (apache), createrepo, tmux(terminal multiplexer) and rsync(tool used for the incremental updating of the repo).
  • The repository currently resides at http://as-chm-asrv-03.ad.cornell.edu ( CNAME of http://repo.chem.cornell.edu ) and is automatically updated daily.
  • The updating of the the repository files is done through a cron job (the commands can be viewed using crontab -e on the machine) the commands are in the following form:
    • <time(standard cron format)> /usr/bin/rsync -avz --exclude='<files to be excluded> rsync://<rsync address for mirror> <local repo file path>
    • <time(standard cron format)> /usr/bin/createrepo --update <local repo file path>
    • The current crontab file has the following text
      • 15 1 * * * /usr/bin/rsync -avz --exclude='repo*' --exclude='debug' --exclude='ppc64' rsync://mirror.cs.princeton.edu/fedora-epel/6/ /repodata/centos/6/epel/ #epel 6 repo pull
      • 30 2 * * * /usr/bin/rsync -avz --exclude='repo*' --exclude='debug' --exclude='aarch64' --exclude='ppc64' --exclude='ppc64le' rsync://mirror.cs.princeton.edu/fedora-epel/7/ /repodata/centos/7/epel/ #epel 7 repo pull
      • 45 3 * * * /usr/bin/rsync -avz --exclude='repo*' rsync://repos.dfw.lax-noc.com/elrepo/elrepo/el6/ /repodata/centos/6/elrepo/ #elrepo pull centos 6
      • 00 5 * * * /usr/bin/rsync -avz --exclude='repo*' rsync://repos.dfw.lax-noc.com/elrepo/elrepo/el7/ /repodata/centos/7/elrepo/ #elrepo pull centos 7
      • 15 5 * * * /usr/bin/createrepo --update /repodata/centos/6/epel/SRPMS #update epel6 repo
      • 30 5 * * * /usr/bin/createrepo --update /repodata/centos/6/epel/i386 #update epel6 repo
      • 45 5 * * * /usr/bin/createrepo --update /repodata/centos/6/epel/x86_64 #update epel6 repo
      • 00 6 * * * /usr/bin/createrepo --update /repodata/centos/7/epel/SRPMS #update epel7 repo
      • 15 6 * * * /usr/bin/createrepo --update /repodata/centos/7/epel/x86_64 #update epel7 repo
      • 30 6 * * * /usr/bin/createrepo --update /repodata/centos/6/elrepo/SRPMS #update elrepo6 repo
      • 45 6 * * * /usr/bin/createrepo --update /repodata/centos/6/elrepo/i386 #update elrepo6 repo
      • 00 7 * * * /usr/bin/createrepo --update /repodata/centos/6/elrepo/x86_64 #update elrepo6 repo
      • 15 7 * * * /usr/bin/createrepo --update /repodata/centos/7/elrepo/SRPMS #update elrepo7 repo
      • 30 7 * * * /usr/bin/createrepo --update /repodata/centos/7/elrepo/i386 #update elrepo7 repo
      • 45 7 * * * /usr/bin/createrepo --update /repodata/centos/7/elrepo/x86_64 #update elrepo7 repo
    • The first command pulls in an incremental update from the internet and the second command updates the repo. For some reason it takes MUCH longer to mass update the sqlite DBs so the second command has been seperated out for each architecture under each version of the OS.
    • The repo is currently set to update at roughly 1-6 AM every morning.
    • The rsync mirrors can be changed if the current mirrors are no longer active (error logs will show up under /var/cron/)
    • SRPMS are "Source RPMS" which give access to source code for the packages in case access to source code is needed.
  • Apache is currently used for the http hosting with default settings (except for an edit commenting out everything in the welcome.conf file in order to avoid the apache welcome page). The service apache uses for the hosting is called httpd and can be restarted/stopped using systemctl.  The root directory that the apache server points to (currently /var/www/html) has a symlink that points to /repodata/centos (where the repository is stored)
  • If ftp hosting is required at any point, VSFTP can be used with default settings as an easy to set up ftp host.
  • Tmux can be used for testing or running some updates that require a long time to complete (in order to let the process continue after the ssh session has been disconnected).

Client Configuration:

  • You can add the repo server to the list of repos used by yum in the same way that you would add any other repository.
  • A new .repo file with the repo name should be created in /etc/yum.repos.d and should follow the following format:
    1.  [reponame]
    2. name= [description]
    3. baseurl=http://repo.chem.cornell.edu/centos/7/epel/x86_64  #This is an example for the epel repo on a 64 bit machine. You can open the site in a web browser to view the available architectures and get the exact url for this part
    4. enabled=1
    5. gpgcheck=0 #This will disable checking for gpg keys (functionality can be added later if required and the config file must be changed accordingly).
  • run "yum update" and "yum clean all"
  • packages from the additional repos can now be normally installed using yum.
  • Note: In case you need the repos for individual files and do not want to add it to yum, you can download the required rpm file from the repo website using a browser and install the rpm (using rpm -i) to get the package onto the system.
  • No labels