Changes between Version 20 and Version 21 of WikiStart


Ignore:
Timestamp:
Aug 17, 2014, 1:07:01 AM (10 years ago)
Author:
Lewis Rosenthal
Comment:

Tightened up some language concerning repos; added plugin and fastestmirror sections

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v20 v21  
    3333
    3434== Repositories ==
    35 Netlabs.org is now hosting two repositories, one for experimental stuffs and the other for stable releases. It is recommended to use only the Release package for most users.
     35Netlabs.org is now hosting two repositories, one for experimental stuff and the other for stable releases. For most users, it is recommended to use only the stable (release) packages.
    3636
    3737=== Stable repository ===
    38 Stable repository configuration can be installed using (this is automatically done by bootstrap package)
     38The configuration for the stable repository may be installed using (this is automatically done by bootstrap package)
    3939
    4040 * yum install netlabs-rel
    4141
    42 If you cannot install above package, download this [http://rpm.netlabs.org/bootstrap/netlabs-rel.repo file] and put it into %UNIXROOT%\etc\yum\repos.d directory.
     42If you cannot install the above package, download this [http://rpm.netlabs.org/bootstrap/netlabs-rel.repo file] and put it into your %UNIXROOT%\etc\yum\repos.d directory.
    4343
    4444It is possible to browse the stable repository URL at the following URL:
     
    4747
    4848=== Experimental repository ===
    49 Experimental repository configuration can be installed using
     49The configuration for the experimental repository may be installed using
    5050
    5151 * yum install netlabs-exp
    5252
    53 If you cannot install above package, download this [http://rpm.netlabs.org/bootstrap/netlabs-exp.repo file] and put it into %UNIXROOT%\etc\yum\repos.d directory.
     53If you cannot install the above package, download this [http://rpm.netlabs.org/bootstrap/netlabs-exp.repo file] and put it into your %UNIXROOT%\etc\yum\repos.d directory.
    5454
    5555It is possible to browse the experimental repository URL at the following URL:
     
    5959=== Mirrors ===
    6060
    61 Please note: if you have netlabs-exp-xxx.rpm or netlabs-rel-xxx.rpm installed, the mirrors will be automatically added on your next update. Install below files only to reach US mirror directly without checking for main site.
     61Please note: if you have netlabs-exp-xxx.rpm or netlabs-rel-xxx.rpm installed, the mirrors will be automatically added on your next update. Install below files only to reach US mirror directly without checking for main site. Also, see the section related to fastestmirror before adding the repo files below.
    6262
    6363Rosenthal & Rosenthal maintains mirrors (updated hourly) of both of the Netlabs repositories on the east coast of the US (New York) on a relatively wide bandwidth connection.
     
    6565==== Stable repository mirror ====
    6666
    67 Download this [http://www.2rosenthals.com/rpm.netlabs.org/mirror/netlabs-rel-2rosenthals.repo file] and put it into %UNIXROOT%\etc\yum\repos.d directory.
     67If you do not intend to use the fastestmirror plugin, you may download this [http://www.2rosenthals.com/rpm.netlabs.org/mirror/netlabs-rel-2rosenthals.repo file] and put it into %UNIXROOT%\etc\yum\repos.d directory.
    6868
    6969It is possible to browse the stable repository URL at the following URL:
     
    7373==== Experimental repository mirror ====
    7474
    75 Download this [http://www.2rosenthals.com/rpm.netlabs.org/mirror/netlabs-exp-2rosenthals.repo file] and put it into %UNIXROOT%\etc\yum\repos.d directory.
     75If you do not intend to use the fastestmirror plugin, you may download this [http://www.2rosenthals.com/rpm.netlabs.org/mirror/netlabs-exp-2rosenthals.repo file] and put it into %UNIXROOT%\etc\yum\repos.d directory.
    7676
    7777It is possible to browse the stable repository URL at the following URL:
     
    100100
    101101 * yum repolist
     102
     103== Plugins ==
     104
     105Plugins are python modules which eextend yum's functionality. Plugins are available from a variety of sources. A good place to start looking for plugins is the yum-utils Trac wiki, [http://yum.baseurl.org/wiki/YumUtils here].
     106
     107=== Installing a plugin ===
     108
     109At the very least, a plugin requires a python script (something.py) and a configuration file (something.conf). The script should be placed in %UNIXROOT%\usr\lib\yum-plugins or %UNIXROOT%\usr\share\yum-plugins (create the directory if it does not exist). Alternatively, plugins may be placed in the directory of your choice by adding the following to %UNIXROOT%\etc\yum\yum.conf in the [main] section:
     110
     111  pluginpath=x:/somewhere/somedir
     112
     113(Multiple plugin directories may be specified.)
     114
     115The plugin configuration file should be placed in %UNIXROOT%\etc\yum\pluginconf.d (create the directory if it does not exist). Alternatively, plugin configuration files may be placed in the directory of your choice by adding the following to %UNIXROOT%\etc\yum\yum.conf in the [main] section:
     116
     117  pluginconfpath=x:/somewhere/somedir
     118
     119(Multiple plugin configuration directories may be specified.)
     120
     121The plugin configuration file must at a minimum consist of the following two lines:
     122
     123  [main][[BR]]
     124  enabled=1
     125
     126(Individual plugins may be disabled by toggling the above value to 0 in their respective configuration files.)
     127
     128=== Enabling the use of plugins ===
     129
     130In order for yum to process any plugins, it is necessary to add the following line to %UNIXROOT%\etc\yum\yum.conf in the [main] section:
     131
     132  plugins=1
     133
     134This may be overridden on the commandline with the --noplugins option, or to disable certain plugins only, the --disableplugin=plugin1[,plugin2,plugin3,etc.] option may be specified.
     135
     136=== Miscellaneous plugin issues ===
     137
     138Sometimes, a given plugin will not load. When that happens, you should see a message, such as:
     139
     140  Plugin "xyz" can't be imported
     141
     142This may be because the plugin itself (a python script) has one or more unsatisfied dependencies. To determine what may be the cause requires examining the plugin to see what it might need to import and from what other module. Here's an example:
     143
     144{{{
     145yum repolist[[BR]]
     146Plugin "xyz" can't be imported
     147[remainder of output]
     148}}}
     149
     150Examining %UNIXROOT%/usr/lib/yum-plugins/xyz.py, we see the following just after the opening comments:
     151
     152  from yumutils.i18n import _
     153
     154Checking %UNIXROOT%/usr/lib/pythonX.X/, we find no yumutils module directory, and none under %UNIXROOT%/usr/lib/pythonX.X/site-packages, either.
     155
     156Testing further:
     157
     158{{{
     159python
     160>>> from yumutils.i18n import _
     161Traceback (most recent call last):
     162  File "<stdin>", line 1, in <module>
     163ImportError: No module named yumutils.i18n
     164}}}
     165
     166Upon installing the yumutils module, the above command succeeds:
     167
     168{{{
     169>>> from yumutils.i18n import _
     170>>>
     171}}}
     172
     173as does yum.
     174
     175In the future, as on other platforms, we hope to have some plugins available for installation via yum itself, which will handle these dependencies.
     176
     177=== The fastestmirror plugin ===
     178
     179==== Background ====
     180
     181In short, the fastestmirror plugin allows yum to make a determination as to which repo is more responsive from your location, given available bandwidth, traffic, routing constraints, and of course, server load. From the comments in the script itself:
     182
     183  A plugin for the Yellowdog Updater Modified which sorts each repo's[[BR]]
     184  mirrorlist by connection speed prior to download.
     185
     186==== Installing the plugin ====
     187
     188See [#Installingaplugin Installing a plugin] for more detail, but in general, follow these steps to get fastestmirror up and running quickly:
     189
     1901. Download this [http://www.2rosenthals.com/rpm.netlabs.org/mirror/fastestmirror.py file] and place it in %UNIXROOT%\usr\lib\yum-plugins (create yum-plugins if it does not exist).
     1912. Download this [http://www.2rosenthals.com/rpm.netlabs.org/mirror/fastestmirror.conf file] and place it in %UNIXROOT%\etc\yum\pluginconf.d (create pluginconf.d if it does not exist).
     1923. Open %UNIXROOT%\etc\yum\yum.conf in your favorite text editor. Under the [main] section, add the following line:
     193
     194  plugins=1
     195
     1964. If you have previously downloaded the repo files for the Rosenthal & Rosenthal mirrors (see above sections), you should delete those two files:
     197
     198  netlabs-rel-2rosenthals.repo[[BR]]
     199  netlabs-exp-2rosenthals.repo
     200
     201  and either confirm that the Rosenthal & Rosenthal mirrors are already listed in your netlabs repo files (editing them as necessary) ''or'' you may overwrite your existing (remaining) repo files with these two, which have the Rosenthal & Rosenthal mirrors appended to them:
     202
     203  [http://www.2rosenthals.com/rpm.netlabs.org/mirror/netlabs-rel.repo netlabs-rel.repo][[BR]]
     204  [http://www.2rosenthals.com/rpm.netlabs.org/mirror/netlabs-exp.repo netlabs-exp.repo] - repo disabled by default
     205
     206N.B.: fastestmirror does not optimize between different repo files, so mirrors for the same repository must be listed in a single repo file, e.g., both the rpm.netlabs.org and the www.2rosenthals.com URIs should be listed in the corresponding repo file, as in:
     207
     208{{{
     209baseurl=http://rpm.netlabs.org/release/$releasever/$basearch/
     210        http://www.2rosenthals.com/rpm.netlabs.org/release/$releasever/$basearch/
     211}}} 
     212
     213If you want to enable the experimental repository, follow the directions under [#Managingrepositories Managing repositories], above.
     214
     215==== Tuning ====
     216
     217You may want to adjust the behavior of fastestrepo to better suit your conditions. This is done through  %UNIXROOT%\etc\yum\pluginconf.d\fastestmirror.conf. Hints are provided there as well as in the beginning comments in the plugin itself. As provided, the configuration should be adequate for most users.
     218
     219==== Example session ====
     220
     221Here's an example of the output when using fastestmirror:
     222
     223{{{
     224yum check-update
     225Loaded plugins: fastestmirror
     226Loading mirror speeds from cached hostfile
     227 * www.2rosenthals.com : 0.067000 secs
     228 * www.2rosenthals.com : 0.063000 secs
     229 * rpm.netlabs.org : 0.149000 secs
     230 * rpm.netlabs.org : 0.174000 secs
     231rpm.netlabs.org already timed: 0.174000024796
     232 * rpm.netlabs.org : 0.174000 secs
     233www.2rosenthals.com already timed: 0.0629999637604
     234 * www.2rosenthals.com : 0.063000 secs
     235 * netlabs-exp: www.2rosenthals.com
     236rpm.netlabs.org already timed: 0.174000024796
     237 * rpm.netlabs.org : 0.174000 secs
     238www.2rosenthals.com already timed: 0.0629999637604
     239 * www.2rosenthals.com : 0.063000 secs
     240 * netlabs-rel: www.2rosenthals.com
     241netlabs-exp               100% |=========================| 1.3 kB    00:00
     242netlabs-rel               100% |=========================| 1.3 kB    00:00
     243}}}
    102244
    103245== Reporting bugs ==