| 48 | == Local RPM repository == |
| 49 | |
| 50 | Sometimes you may want to maintain a local repository of RPM packages (for example, if you want to organize your specific software or private data using RPM which you don't want to put to public RPM repositories) . This is fairly easy: |
| 51 | |
| 52 | 1. Install the createrepo package. |
| 53 | 2. Add a file local.repo to /etc/yum/repos.d/ that contains: |
| 54 | {{{ |
| 55 | [local] |
| 56 | name=My local repo |
| 57 | baseurl=file://<path_to_repo> |
| 58 | enabled=1 |
| 59 | }}} |
| 60 | 3. Put your .rpm files to <path_to_repo>. |
| 61 | 4. Execute |
| 62 | {{{ |
| 63 | sh createrepo <path_to_repo> |
| 64 | }}} |
| 65 | |
| 66 | Note that RPM tools do not understand <path_to_repo> if it contains the drive specification. In this case you will have to add a kLIBC path rewriter entry that maps e.g. {{{/drives/p}}} to your {{{P:}}} drive and then {{{baseurl}}} will become {{{"file:///drives/p/temp/build/RPMS"}}} and for {{{createrepo}}} you will give {{{"/drives/p/temp/build/RPMS"}}}. |