2,665 bytes added
, 01:04, 3 November 2013
The purpose of this HowTo is to make your own repository to share RPM that your are developing for our marvellous project. I used a CentOS server to host my repository mirror.de-labrusse.fr
===Web Folder===
In a first time you have to set a web area where you can upload packages, you can do it by many ways "rsync, scp, ftp..." you have to find your manner, it is not the purpose of this howTo. 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.
Options +Indexes
===Repository Architecture===
A repository is made with a special architecture which becomes from CENTOS/REDHAT that we need to make.
For example this is the path of my web area, you need to adapt it to your configuration.
mkdir -p /var/www/vhosts/myrepo.xxx/mirror/smeserver/5/{SRPMS,noarch,i386,x86_64}
mkdir -p /var/www/vhosts/myrepo.xxx/mirror/smeserver/6/{SRPMS,noarch,i386,x86_64}
SME Server 8 = Centos5<br />
SME Server 9 = Centos6
===Create repository metadata===
you need to install a package named createrepo
yum install createrepo
each time you upload a package you have to launch the createrepo command, you can do it in a cron or else do it manually.
createrepo -d /var/www/vhosts/myrepo.xxx/mirror/smeserver/5
createrepo -d /var/www/vhosts/myrepo.xxx/mirror/smeserver/6
you can do something like that in your crontab
crontab -e
*/30 * * * * createrepo -d /var/www/vhosts/myrepo.xxx/mirror/smeserver/5
*/30 * * * * createrepo -d /var/www/vhosts/myrepo.xxx/mirror/smeserver/6
===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===
This is how you need to allow your repository on the client side.
{{Warning box|msg=Copy the configuration setting to your server as is, do not modify anything as that might harm your installation. To use it to install package enable it using the option '''--enablerepo=stephdl''' at the SME Server shell.}}
Below you find the installation command for the {{PAGENAME}} repository which can be entered on the SME Server shell.
</noinclude>
db yum_repositories set '''FOO''' repository \
BaseURL http://myrepo.xxx/smeserver/\$releasever \
EnableGroups no GPGCheck yes \
Name "Mirror FOO" \
GPGKey http://myrepo.xxx/RPM-GPG-KEY \
Visible yes status disabled
<noinclude>
After adding it to the database updating the configuration file is required:
signal-event yum-modify