How to create your own NethServer mirror


(Davide Principi) #65

Yes you do!

(Rafael Tavares) #66

Pull request created


(Davide Principi) #67

Thank you for donating your mirrors! First, let’s monitor them for a while: we can check their status here Then we’ll merge the PR.

(Rafael Tavares) #68


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:

(Davide Principi) #69

Yes, it’s ok, approved :smile:

I’m going to merge it before 7.6!

(Davide Principi) #70

They have been merged today! Thanks again!

(Rob Bosch) #71

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.

(Markus Neuberger) #72

Actually a mirror needs 3 GB.

(Rob Bosch) #73

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

(Markus Neuberger) #74

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

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

(Rob Bosch) #75

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

DocumentRoot "/var/www/repos"

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


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 (/etc/httpd/conf.d/mirror-nethserver.conf:1)
port 80 namevhost (/etc/httpd/conf.d/mirror-nethserver.conf:1)

port 80 namevhost (/etc/httpd/conf.d/virtualhosts.conf:12)
port 80 namevhost (/etc/httpd/conf.d/zzz_diaspora.conf:3)
*:443 is a NameVirtualHost
default server (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost (/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/”
User: name=“apache” id=xx
Group: name=“apache” id=xx

(Markus Neuberger) #76

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

See How to create your own NethServer mirror

Edit: works!

(Rob Bosch) #77

Cool… so my mirror is up and running… :slight_smile:
@davidep can you add 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?

(Markus Neuberger) #78

Seems to be running now:

Or check the logfile: /var/log/cron

(Rob Bosch) #79

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
0 0,6,12,18 * * *root/usr/local/sbin/sync-nethserver-mirrors

(Markus Neuberger) #80

It’s only shown in cron log if it’s triggered by cron.

Did you restart cron?

systemctl restart crond

(Rob Bosch) #81

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?

(Markus Neuberger) #82

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…

(Rob Bosch) #83

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…

(Filippo Carletti) #84

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.