How to create your own NethServer mirror

deployment
devcorner
intermediate
community
mirror

(Giacomo Sanchietti) #1

I just installed and configured mirmon.
You can check mirrors status here: http://www.nethserver.org/mirmon/.
The link will be published somewhere inside the official site.

If anyone wants to create its own mirror, let us know.
Here you are simple few steps to create a mirror host on a CentOS 6.6.

Setup a mirror

Make sure the machine has all security updates:

yum update

Install Apache and rsync:

yum install httpd rsync

Create a virtual host:

cat << EOF > /etc/httpd/conf.d/mirror-nethserver.conf
<VirtualHost *:80>
ServerName mirror1.nethserver.org

DocumentRoot "/var/www/repos"

<Directory /var/www/repos>
    Options +Indexes
    Options +FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

</VirtualHost>
EOF

Change mirror1.nethserver.org with the desired host name.

Configure cron:

cat <<EOF > /etc/cron.d/sync-nethserver-mirrors
RANDOM_DELAY=10
CRON_TZ=UTC

0 0,6,12,18 * * *	root	/usr/local/sbin/sync-nethserver-mirrors
EOF

Create the sync script:

cat <<EOF > /usr/local/sbin/sync-nethserver-mirrors
#!/bin/bash    
/usr/bin/rsync -aq --delete-after \
    rsync://mirror.nethserver.org/nethserver \
    /var/www/repos/nethserver/
EOF

Make the script executable:

chmod a+x /usr/local/sbin/sync-nethserver-mirrors

Create repos dir:

mkdir -p /var/www/repos

Start apache and enable it on boot:

service httpd start && chkconfig httpd on

Make sure port 80 is open:

lokkit  -s http

Start first sync:

/usr/local/sbin/sync-nethserver-mirrors

Done


Nethserver.de-labrusse.fr
Set up a local repository for NethServer
How can I contribute to the NethServer project?
NS-Arm general discussion: direction / user cases / what comes to the table
Nethserver.de-labrusse.fr
(Alessio Fattorini) #2

This could be a nice Howto, what do you think? I can move it in a new topic, we can call it
"How to create your own NethServer mirror"


(Giacomo Sanchietti) #3

I think it’s a good idea. :smile:


(Giacomo Sanchietti) #4

A new mirror is up running:
http://nethserver.antani.co/nethserver/

Many thanks to to @mane! :smiley:


(Alessio Fattorini) #6

Amazing! Thanks man :smiley: which type of bandwidth it serves? I love that name :smiley:


(mane) #7

@alefattorini I’m glad you like the domain name.

I’ve currently assigned 100Mb to that mirror but I’m planning to increase it up to 1Gb if it reaches the limit any time soon.


(Alessio Fattorini) #8

That’s great! Thanks for your contribution, whole community is grateful to you.


Community Digest 5 - September 2015
(Giacomo Sanchietti) #9

A new mirror is up and running: http://mirror2.nethserver.org/nethserver/


(Pierre Bourdin) #10

A new mirror is up and running : http://mirror.imao-fr.com/nethserver/ :wink:


(Alessio Fattorini) #11

Woah! thanks Pierre for your offer! :smile_cat:


(Giacomo Sanchietti) #12

The new mirror is up and running! Thank you @pierre_bourdin! :smiley:


(Alessio Fattorini) #13

Just added your name here:


#14

@giacomo
can we test a new mirror? i have some doubt about stability (really economic vps, located in Canada)…
it’s up and running (on ns7rc2)

http://infinitedreams.framassa.org/nethserver/

tnx


(Giacomo Sanchietti) #15

I just added it to mirmon: http://www.nethserver.org/mirmon/

Keep an eye on it, when/if you think it’s stable enough, I will add it to official mirror list (remember to ping me :wink: ).


#16

ok giacomo, it seems stable, but only activating it we will discover real bandwidth :grin:
please add it to mirrorlist


(Giacomo Sanchietti) #17

The mirror is now official, thanks to @davidep!


(James Nesbitt) #18

Just out of interest, how much space does the NethServer mirror take up?


(Stéphane de Labrusse) #19

actually 608M


(Lorenzo Faleschini) #20

as promised to @alefattorini since I have not much time to help, at least I’ll share bandwidth

http://mirror.nordest.systems/nethserver/

cheers!


(Giacomo Sanchietti) #21

Just added to mirmon: http://www.nethserver.org/mirmon/

I will check for few days, if everything is ok I will add it to the official mirror list.