This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
create_your_repository [2015/05/03 20:21] stephdl created |
create_your_repository [2019/06/05 19:48] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==Create your repository== | + | ======Create your repository====== |
The purpose of this HowTo is to make your own repository to share RPM that your are developing for our marvellous project. I use a CentOS server to host my repository mirror.de-labrusse.fr< | The purpose of this HowTo is to make your own repository to share RPM that your are developing for our marvellous project. I use a CentOS server to host my repository mirror.de-labrusse.fr< | ||
In a first time you have to parameter a web area where you can upload packages, you can do it by many ways, it is not the purpose of this howTo. | In a first time you have to parameter a web area where you can upload packages, you can do it by many ways, it is not the purpose of this howTo. | ||
- | ===Repository Architecture=== | + | =====Repository Architecture===== |
A repository is made with a special architecture which becomes from CENTOS/ | A repository is made with a special architecture which becomes from CENTOS/ | ||
Line 16: | Line 16: | ||
SME Server 9 = Centos6 | SME Server 9 = Centos6 | ||
- | ===Upload RPM to Web Folder=== | + | =====Upload RPM to Web Folder===== |
The manner to upload packages to your repository could be done by many ways, " | The manner to upload packages to your repository could be done by many ways, " | ||
After that you could see packages in browsing your web area, if it is not the case, you may see if the parameter below is included in your httpd VirtualHost. | After that you could see packages in browsing your web area, if it is not the case, you may see if the parameter below is included in your httpd VirtualHost. | ||
Line 24: | Line 24: | ||
Of course you must respect the architecture of the rpm you have builded, you need to upload noarch.rpm to noarch, src.rpm to SRPMS, i386 to i386 and x86_64.rpm to x86_64 | Of course you must respect the architecture of the rpm you have builded, you need to upload noarch.rpm to noarch, src.rpm to SRPMS, i386 to i386 and x86_64.rpm to x86_64 | ||
- | ===Create repository metadata=== | + | =====Create repository metadata===== |
you need to install a package named createrepo. See [http:// | you need to install a package named createrepo. See [http:// | ||
Line 41: | Line 41: | ||
| | ||
- | ===Create Repoview=== | + | =====Create Repoview===== |
Additionally you can make a nice view for you repository, it is not a mandatory | Additionally you can make a nice view for you repository, it is not a mandatory | ||
Line 53: | Line 53: | ||
*/36 * | */36 * | ||
+ | =====Clean Your repository===== | ||
- | ===Sign your RPM=== | + | first we need to install yum-utils, take a look to the [[http:// |
+ | yum install yum-utils | ||
+ | |||
+ | Now we will use repomanage, this command is only made to list either old or new package, matter of choice. | ||
+ | |||
+ | repomanage --keep=2 --old / | ||
+ | or | ||
+ | repomanage --keep=1 --new / | ||
+ | |||
+ | here I want to list and keep only two versions of each rpm. Put this command in a cron job | ||
+ | |||
+ | rm $(repomanage --keep=2 --old / | ||
+ | |||
+ | =====Sign your RPM===== | ||
Now we can sign package before to upload them, it is an additional way to increase security for people who will download your rpm. You can see this wiki page [[Sign_your_RPM]] | Now we can sign package before to upload them, it is an additional way to increase security for people who will download your rpm. You can see this wiki page [[Sign_your_RPM]] | ||
- | ===Declare your repository on the client side=== | + | =====Declare your repository on the client side===== |
This is how you need to allow your repository on the client side, on each SME Server which wants to reach your repository. | This is how you need to allow your repository on the client side, on each SME Server which wants to reach your repository. |