Skip to content
This repository
Newer
Older
100644 125 lines (78 sloc) 3.326 kb
b13ed519 »
2006-12-04 Changing Depo into mrepo.
1 Quickstart for the impatient
2 ============================
3
4 Requisites:
5
6 Depending on what repositories you want to generate, you can install
7 a combination of these packages:
8
9 tool package provides
10 """" """"""" """"""""
11 genbasedir apt provides apt support
12 yum-arch yum provides yum support
13 createrepo createrepo provides repomd support (new yum, new apt)
14
15 Depending on what kind of sources you want to mirror, you can install
16 a combination of these packages:
17
18 tool provides
19 """" """"""""
20 rsync provides rsync:// access
21 mirrordir provides ftp:// and mc:// access
22 lftp provides ftp://, http://, sftp:// fish://
23 up2date provides rhn:// and rhns:// access
24
25 If you want to hardlink duplicate (downloaded) packages to save on
26 diskspace, you need to install:
27
28 hardlink++ (separate 'hardlink++' package)
29 hardlink (part of the kernel-utils package)
30
31
32 Do the following steps to get started (real) fast.
33
34 1. Start with collecting the existing ISO files you have of the
35 different distributions you want to put into a repository.
61777b33 »
2006-12-04 Finalize rename to mrepo
36 Put these into your $srcdir (normally /var/mrepo), eg:
b13ed519 »
2006-12-04 Changing Depo into mrepo.
37
61777b33 »
2006-12-04 Finalize rename to mrepo
38 /var/mrepo/fc3-i386/
b13ed519 »
2006-12-04 Changing Depo into mrepo.
39
40
61777b33 »
2006-12-04 Finalize rename to mrepo
41 2. Edit /etc/mrepo.conf and add for each distribution a new section
42 like the examples given in the default mrepo.conf, mrepo-complex.conf
43 or mrepo-example.conf
b13ed519 »
2006-12-04 Changing Depo into mrepo.
44
61777b33 »
2006-12-04 Finalize rename to mrepo
45 You can add a distribution section to a new file in /etc/mrepo.conf.d/
b13ed519 »
2006-12-04 Changing Depo into mrepo.
46
61777b33 »
2006-12-04 Finalize rename to mrepo
47 eg. /etc/mrepo.conf.d/fc3-i386.conf
b13ed519 »
2006-12-04 Changing Depo into mrepo.
48
49 See the examples in the documentation as a reference.
50
51
52 3. If you want to add your own custom packages to one or all of
53 the repositories, you have 2 options.
54
61777b33 »
2006-12-04 Finalize rename to mrepo
55 a. Add them to /var/mrepo/<distro>-<arch>/local/
b13ed519 »
2006-12-04 Changing Depo into mrepo.
56
61777b33 »
2006-12-04 Finalize rename to mrepo
57 eg. /var/mrepo/fc3-i386/local/
b13ed519 »
2006-12-04 Changing Depo into mrepo.
58
61777b33 »
2006-12-04 Finalize rename to mrepo
59 or add them to /var/mrepo/all/local/ to add them to all.
b13ed519 »
2006-12-04 Changing Depo into mrepo.
60
61 b. Specify the directory of your choice in a new repository,
62 eg. called 'myrepo'
63
64 [fc3-i386]
65 name = Fedora Core $release ($arch)
66 release = 3
67 .
68 .
69 myrepo = file:///var/ftp/pub/my-rpms/fc3/i386/
70
71 eg. you can rewrite this as:
72
73 myrepo = file:///var/ftp/pub/my-rpms/$dist/$arch/
74
75 This way you can specify an unlimited number of custom
76 repositories.
77
78
61777b33 »
2006-12-04 Finalize rename to mrepo
79 4. Now run mrepo with no actions to see if the ISO files are mounted
b13ed519 »
2006-12-04 Changing Depo into mrepo.
80 and all your configuration options have been used:
81
61777b33 »
2006-12-04 Finalize rename to mrepo
82 mrepo -vv
b13ed519 »
2006-12-04 Changing Depo into mrepo.
83
61777b33 »
2006-12-04 Finalize rename to mrepo
84 Then run mrepo to update the repositories:
b13ed519 »
2006-12-04 Changing Depo into mrepo.
85
61777b33 »
2006-12-04 Finalize rename to mrepo
86 mrepo -uvv
b13ed519 »
2006-12-04 Changing Depo into mrepo.
87
61777b33 »
2006-12-04 Finalize rename to mrepo
88 Then generate the mrepo repositories by doing:
b13ed519 »
2006-12-04 Changing Depo into mrepo.
89
61777b33 »
2006-12-04 Finalize rename to mrepo
90 mrepo -gvv
b13ed519 »
2006-12-04 Changing Depo into mrepo.
91
61777b33 »
2006-12-04 Finalize rename to mrepo
92 Now look in $wwwdir (normally /var/www/mrepo) or surf to
93 http://localhost/mrepo/ to see if everything is the way you wanted.
b13ed519 »
2006-12-04 Changing Depo into mrepo.
94
95
96 5. Next time you can do directly
97
61777b33 »
2006-12-04 Finalize rename to mrepo
98 mrepo -ug
b13ed519 »
2006-12-04 Changing Depo into mrepo.
99 or
61777b33 »
2006-12-04 Finalize rename to mrepo
100 mrepo -ugv
b13ed519 »
2006-12-04 Changing Depo into mrepo.
101
102 and all steps will be performed in one phase.
103
104
61777b33 »
2006-12-04 Finalize rename to mrepo
105 6. If you're removing distributions from the mrepo.conf file and
b13ed519 »
2006-12-04 Changing Depo into mrepo.
106 you want to remove the ISOs to gain diskspace. Remember that
107 Linux will not release diskspace for files that are still
108 accessed (like a loop-mounted ISO file). You're best bet is
109 to first unmount the ISOs:
110
61777b33 »
2006-12-04 Finalize rename to mrepo
111 mrepo -vv --umount
b13ed519 »
2006-12-04 Changing Depo into mrepo.
112
113 then remove or comment the distributions and mount again:
114
61777b33 »
2006-12-04 Finalize rename to mrepo
115 mrepo -vv
b13ed519 »
2006-12-04 Changing Depo into mrepo.
116
117 7. When you're adding new distributions, it's sufficient to just
61777b33 »
2006-12-04 Finalize rename to mrepo
118 run mrepo again. It will automatically mount everything that is
b13ed519 »
2006-12-04 Changing Depo into mrepo.
119 not already mounted. You can always remount/reset by doing:
120
61777b33 »
2006-12-04 Finalize rename to mrepo
121 mrepo -vv --remount
b13ed519 »
2006-12-04 Changing Depo into mrepo.
122
123 ---
124 Please send me improvements to this document.
Something went wrong with that request. Please try again.