How to create your own NethServer mirror

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

12 Likes

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"

2 Likes

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

1 Like

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

Many thanks to to @mane! :smiley:

2 Likes

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

@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.

1 Like

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

1 Like

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

1 Like

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

4 Likes

Woah! thanks Pierre for your offer! :smile_cat:

1 Like

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

2 Likes

Just added your name here:

@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

3 Likes

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: ).

2 Likes

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

2 Likes

The mirror is now official, thanks to @davidep!

2 Likes

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

actually 608M

3 Likes

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

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

cheers!

5 Likes

Just added to mirmon: the status of nethserver.org mirrors

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

2 Likes