How to create your own NethServer mirror

Yes you do!

Pull request created

:wink:

5 Likes

Thank you for donating your mirrors! First, letā€™s monitor them for a while: we can check their status here http://mirror-status.nethserver.org/. Then weā€™ll merge the PR.

Hi,

If possible, and the mirror is approved, add the official list before upgrades to nethserver 7.6. This makes it easier for Brazilians to update their facilities.

thank you :wink:

3 Likes

Yes, itā€™s ok, approved :smile:

Iā€™m going to merge it before 7.6!

1 Like

They have been merged today! Thanks again!

1 Like

Just a question. How much diskspace will a mirror need? I am thinking of adding one, but my VPS has limited diskspace and I donā€™t want to run out of diskspace.

Actually a mirror needs 3 GB.

2 Likes

Thnx for the info. Then it should be possible to add one more mirror. My VPS has 300GB diskspaceā€¦

First sync is running. In a few minutes nethserver.interlin.nl/nethserver will be available as mirror.
The server is located in Germany (Contabo VPS with 100Mb up/down link.)

(maybe itā€™s DNS that is not propagated yet, I thinkn the virtual host rule does not work as expected because I am ending up at default NS page and not the mirror page when I go to that url)

1 Like

This is my /etc/httpd/conf.d/mirror-nethserver.conf but I donā€™t use a subdomain:

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

You may use httpd -S to check the used vhosts.

Hi @mrmarkuz
I followed the instructions from the first post by @giacomo
My conf file is using a subdomain:
<VirtualHost *:80>
ServerName nethserver.interlin.nl

DocumentRoot "/var/www/repos"

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

</VirtualHost>

When I do an httpd -S I get:
httpd -S
[Tue Dec 04 21:05:11.967889 2018] [so:warn] [pid 22008] AH01574: module php5_module is already loaded, skipping
VirtualHost configuration:
*:80 is a NameVirtualHost
default server nethserver.interlin.nl (/etc/httpd/conf.d/mirror-nethserver.conf:1)
port 80 namevhost nethserver.interlin.nl (/etc/httpd/conf.d/mirror-nethserver.conf:1)

port 80 namevhost ns7.interlin.nl (/etc/httpd/conf.d/virtualhosts.conf:12)
port 80 namevhost pod.interlin.nl (/etc/httpd/conf.d/zzz_diaspora.conf:3)
*:443 is a NameVirtualHost
default server ns7.interlin.nl (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost ns7.interlin.nl (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost pod.interlin.nl (/etc/httpd/conf.d/zzz_diaspora.conf:9)
ServerRoot: ā€œ/etc/httpdā€
Main DocumentRoot: ā€œ/var/www/htmlā€
Main ErrorLog: ā€œ/etc/httpd/logs/error_logā€
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
PidFile: ā€œ/run/httpd/httpd.pidā€
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=ā€œapacheā€ id=xx
Group: name=ā€œapacheā€ id=xx

You may try to remove the virtualhost lines and/or add alias / /var/www/repos.

See How to create your own NethServer mirror

Edit:

http://nethserver.interlin.nl/nethserver works!

Coolā€¦ so my mirror is up and runningā€¦ :slight_smile:
@davidep can you add http://nethserver.interlin.nl/nethserver/ as mirror to the list?
The server is located in Germany (hosted by Contabo) with 100Mb up/down connection.

/edit: created PR to add the mirror

/edit2: how long does it take for a new server to show up in mirmon?

I received a message from @davidep that the cronjob might not be running, since the timestamp is not updated. How can I check if it is running?

3 Likes

Seems to be running now:

http://mirror-status.nethserver.org

Or check the logfile: /var/log/cron

I ran a manual update by issueing a /usr/local/sbin/sync-nethserver-mirrors
I donā€™t see any entries in cron.log about updating the mirror dirā€¦

content of sync-nethserver-mirror in /etc/cron.d/

cat sync-nethserver-mirrors
RANDOM_DELAY=10
CRON_TZ=UTC
0 0,6,12,18 * * *root/usr/local/sbin/sync-nethserver-mirrors

Itā€™s only shown in cron log if itā€™s triggered by cron.

Did you restart cron?

systemctl restart crond

I just did and now this line shows in cron.log:

(CRON) bad command (/etc/cron.d/sync-nethserver-mirrors)

syntax error in that file?

Donā€™t know if discourse eats some chars but there has to be a space between the third asterisk and root and before the pathā€¦

3 Likes

It was those 2 spaces between * and root and between root and /usr

I restarted cron again and now I donā€™t get the error message
Looks like the spaces were discarded when the file was createdā€¦

2 Likes

BTW, thereā€™s no need to restart crond, it re-reads its files automatically. Keep an eye on /var/log/cron to spot errors. Usually it needs a few seconds (max 60) to print something.

2 Likes