linux_wiki:repos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:repos [2016/03/18 22:22]
billdozor created
linux_wiki:repos [2019/05/25 23:50] (current)
Line 64: Line 64:
 rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
 </code> </code>
 +
 +----
 +
 +====== Software Collections ======
 +
 +Software Collections is a project to package newer versions of software that will not conflict with system packages.
 +
 +Official Site: https://www.softwarecollections.org/en/
 +
 +===== Software Collections: Add Repo =====
 +
 +To add the software collections repo (available via "extras" repo)
 +  * CentOS 6/7<code bash>yum install centos-release-scl</code>
 +
 +===== Software Collections: Install Software =====
 +
 +  * Browse the software collections library: https://www.softwarecollections.org/en/scls/
 +    * Each collection will have instructions for how to install.
 +
 +Example: Python 3.3
 +  * Install<code bash>yum install python33</code>
 +  * System version<code bash>[root@server1 ~]# python --version
 +Python 2.7.5</code>
 +  * SCL Version<code bash>[root@server1 ~]# scl enable python33 bash
 +[root@server1 ~]# python --version
 +Python 3.3.2</code>
  
 ---- ----
Line 76: Line 102:
  
 If you are supporting Oracle Linux, the official repos are here: [[http://public-yum.oracle.com/]] If you are supporting Oracle Linux, the official repos are here: [[http://public-yum.oracle.com/]]
 +
 +----
 +
 +====== Custom Repo ======
 +
 +You can create a custom repository to serve up your own RPMs or a mirrored copy of a repo.
 +
 +===== Custom Repo: Server =====
 +
 +  - Install Apache Web Server and Create Repo packages<code bash>yum install httpd createrepo</code>
 +  - Start and enable the web server
 +    - EL 6<code bash>service httpd start
 +chkconfig httpd on</code>
 +    - EL 7<code bash>systemctl start httpd
 +systemctl enable httpd</code>
 +  - Create the directory structure<code bash>mkdir -p /var/www/html/repos/mycustom</code>
 +  - Copy your RPMs to the directory<code bash>rsync -avhP *.rpm /var/www/html/repos/mycustom/</code>
 +  - Create the repo data<code bash>createrepo -v /var/www/html/repos/mycustom</code>
 +    - For future package updates/additions, run the createrepo command with the "--update" option in order to only update metadata for packages that have changed<code bash>createrepo -v --update /var/www/html/repos/mycustom</code>
 +
 +===== Custom Repo: Clients =====
 +
 +On clients that will use the repo:
 +  - Create a repo file<code bash>vim /etc/yum.repos.d/mycustomrepo.repo
 +
 +[mycustomrepo]
 +name=My Custom Repo
 +baseurl=http://server2.example.com/repos/mycustom
 +gpgcheck=0
 +enabled=1</code>
 +  - Cleanup yum<code bash>yum clean all</code>
 +  - List repos<code bash>yum repolist</code>
 +  - Install a package from the repo to test<code bash>yum install <package-name></code>
  
 ---- ----
  
  • linux_wiki/repos.1458354162.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)