Changes between Version 1 and Version 2 of RepoCreate

Show
Ignore:
Author:
Jeff (IP: 140.211.167.25)
Timestamp:
11/05/08 16:49:25 (9 years ago)
Comment:

change formating, reword a few things

Legend:

Unmodified
Added
Removed
Modified
  • RepoCreate

    v1 v2  
    1212 
    1313== Steps == 
    14 1. Collect the packages together in one directory. You can make as many 
    15    subdirs as you want, but there needs to be a top level dir where they all 
    16    live. That's where we're going to form our repository. 
     14 1. Collect the packages together in one directory. You can make as many sub-directories as you want, but there needs to be a top level directory where they all live. That's where we're going to form our repository. 
    1715 
    18 1. Yum uses a digest of the information stored in each rpm to do its work.  
    19    This information is created using the 'createrepo' program. If 
    20    you don't have createrepo installed you can install it with: 
     16 2. Yum uses a digest of the information stored in each RPM to do its work. This information is created using the 'createrepo' program. If you don't have createrepo installed you can install it with: 
    2117 
    2218   {{{ yum install createrepo }}} 
    2319 
    24    If you are generating your repository on a machine that doesn't use RPMs, 
    25    you can download createrepo from http://createrepo.baseurl.org/ and build/install it manually. 
     20   If you are generating your repository on a machine that doesn't use RPMs, you can download createrepo from http://createrepo.baseurl.org/ and build/install it manually. 
    2621 
    27    Once you have createrepo installed you need to run it. It only requires one 
    28    argument which is the directory in which you would like to generate the 
    29    repository data. So if the packages dir we made in step 1 is in /srv/my/repo 
    30    then you would run: 
     22   Once you have createrepo installed you need to run it. It only requires one argument which is the directory in which you would like to generate the repository data. So if the packages directory we made in step 1 is in /srv/my/repo then you would run: 
    3123     
    3224   {{{ createrepo /srv/my/repo }}} 
    3325   
    34    You should see a lot of things fly by but it should finish without an error. 
    35    In the end you should have a directory named /srv/my/repo/repodata with at 
    36    least 4 files in it. Maybe more. 
     26   You should see a lot of things fly by but it should finish without an error. In the end you should have a directory named /srv/my/repo/repodata with at least 4 files in it. Maybe more. 
    3727 
    38 3. To make this repository known to yum you need to add a .repo file to your 
    39    yum configuration. On the systems where you want to use this repo you need 
    40    to make a new file in '''/etc/yum.repos.d/'''. The file can be named anything but 
    41    the extension on the file has to be .repo. Let's call this one 'myrepo.repo'. 
     28 3. To make this repository known to yum you need to add a .repo file to your yum configuration. On the systems where you want to use this repo you need to make a new file in '''/etc/yum.repos.d/'''. The file can be named anything but the extension on the file has to be .repo. Let's call this one 'myrepo.repo'. 
    4229 
    4330   In the file you just need to include the following: 
    4835   }}} 
    4936 
    50    That's all you need in that file. The 'baseurl' line is the path that machine 
    51    uses to get to the repository. If the machine has direct access to it or  
    52    mounts it as a filesystem you can use a baseurl line like: 
     37   That's all you need in that file. The 'baseurl' line is the path that machine uses to get to the repository. If the machine has direct access to it or mounts it as a filesystem you can use a baseurl line like: 
    5338    {{{     baseurl = file:///srv/my/repo/  }}} 
    5439 
    5540      '''NB: there are 3 slashes (/) following the file:, not 2. That is correct.''' 
    5641  
    57    If you access the file via an http or https server you would use something 
    58    like:  
     42   If you access the file via an http or https server you would use something like:  
    5943    {{{ 
    6044     baseurl = http://servername/my/repo 
    6145    }}} 
    62    More details about client-side repo configuration can be found in 
    63    the yum.conf man page. 
     46   More details about client-side repo configuration can be found in the yum.conf man page. 
    6447 
    65 4. Now, everytime you modify, remove or add a new rpm package to /srv/my/repo 
    66    you need to recreate the repository metadata. You do that by running 
    67    createrepo the same way you did in step 2. 
     48 4. Now, every time you modify, remove or add a new RPM package to /srv/my/repo you need to recreate the repository metadata. You do that by running createrepo the same way you did in step 2. 
    6849 
    6950 
    7051== More Advanced options == 
    7152    
    72  1. createrepo --update: Sometimes you have a lot of packages in it and  
    73     regenerating all that data for each package when only a few have been 
    74     added or changed is just time consuming. This is where --update comes in 
    75     handy. You run createrepo just like you did before but you pass  
    76     --update to it. Like this: 
     53 1. createrepo --update: Sometimes you have a lot of packages in your repsitory and regenerating the meta data for each package when only a few packages have been added or changed is just too time consuming. This is where --update comes in handy. You run createrepo just like you did before but you pass the --update flag to it. Like this: 
    7754      
    7855     {{{ 
    8057     }}} 
    8158 
    82     Now, createrepo will only update the items which have been changed,  
    83     been added or been removed. 
     59    Now, createrepo will only update the items which have been changed, been added or been removed since the last time the meta data was generated. 
    8460 
    8561  
    86  2. createrepo -x package_file_name: Suppose you have a few packages in your 
    87     repository directory but you really don't want the unsuspecting world to  
    88     see them. You can exclude packages easily with createrepo: 
     62 2. createrepo -x package_file_name: Suppose you have a few packages in your repository directory but you really don't want the unsuspecting world to see them. You can exclude packages easily with createrepo: 
    8963     {{{ 
    9064      createrepo -x filename -x filename2 -x filename* /srv/my/repo 
    9266 
    9367 
    94 If you want to learn more about using createrepo to create and maintain your 
    95 own package repository please see the createrepo man page or the other 
    96 documents in this collection. 
     68If you want to learn more about using createrepo to create and maintain your own package repository please see the createrepo man page or the other documents in this collection. 
    9769 
    9870