Changes between Initial Version and Version 1 of AddingAMondoRescueMirror


Ignore:
Timestamp:
Mar 14, 2012, 2:27:33 AM (5 years ago)
Author:
bruno
Comment:

First version of the mirror instructions

Legend:

Unmodified
Added
Removed
Modified
  • AddingAMondoRescueMirror

    v1 v1  
     1First we suppose that you dedicate a directory to your !MondoRescue mirror. Adapt to your taste/needs:
     2
     3{{{
     4# mkdir -p /prj/ftp /prj/www
     5}}}
     6
     7Then populate the content from the master !MondoRescue server:
     8
     9{{{
     10# cat > /usr/local/bin/mirror-mondo << EOF
     11rsync -av rsync.mondorescue.org::mondorescue-ftp /prj/ftp
     12rsync -av rsync.mondorescue.org::mondorescue-www /prj/www
     13EOF
     14# chmod 755 /usr/local/bin/mirror-mondo
     15# /usr/local/bin/mirror-mondo
     16}}}
     17
     18Do that regularly (daily basis is preferred) with the appropriate crontab setup:
     19
     20{{{
     21# cat >> /var/spool/cron/root << EOF
     220 12 * * * /usr/local/bin/mirror-mondo
     23EOF
     24}}}
     25
     26Once you get the content, setup your ftp and http servers to serve !MondoRescue content (in my case vsftpd and apache):
     27{{{
     28# cat >> /etc/passwd << EOF
     29ftp:x:497:497:system user for vsftpd:/prj/ftp:/bin/false
     30ftpnobody:x:502:502::/var/empty:/sbin/nologin
     31EOF
     32# perl -pi -e 's/nopriv_user=.*/nopriv_user=ftpnobody/' /etc/vsftpd/vsftpd.conf
     33# perl -pi -e 's/ftp_username=.*/ftp_username=ftp/' /etc/vsftpd/vsftpd.conf
     34# /etc/init.d/vsftpd restart
     35# lftp localhost
     36lftp localhost:~> dir
     37drwxr-xr-x    4 ftp      ftp          4096 Mar 05  2009 asianux
     38drwxr-xr-x    2 ftp      ftp          4096 Mar 06  2007 audio
     39drwxr-xr-x    8 ftp      ftp          4096 Feb 16  2011 debian
     40[...]
     41drwxr-xr-x   14 ftp      ftp          4096 Nov 11 15:02 ubuntu
     42drwxr-xr-x    2 ftp      ftp          4096 Mar 05 16:44 video
     43# cat > /etc/httpd/conf.d/mondorescue.conf << EOF
     44NameVirtualHost x.y.z.t
     45
     46<VirtualHost x.y.z.t>
     47    ServerName mondo.mirror.xx
     48    ServerAdmin webmaster@mondo.mirror.xx
     49    DocumentRoot /prj/www/html/mondorescue
     50    CustomLog /var/log/httpd/www.mondorescue.org/access_log combined
     51    Errorlog /var/log/httpd/www.mondorescue.org/error_log
     52    RewriteEngine On
     53    RewriteRule         ^/index\.html$  /index.shtml
     54    RewriteRule         ^/$  /index.shtml
     55
     56    <Directory "/prj/www/html/mondorescue">
     57        DirectoryIndex index.shtml
     58        Options -Indexes MultiViews FollowSymLinks +Includes
     59        AllowOverride None
     60        Order allow,deny
     61        Allow from all
     62    </Directory>
     63
     64    <Directory "/prj/www/html/mondorescue/ftp">
     65        Options Indexes MultiViews FollowSymLinks
     66        AllowOverride None
     67        Order allow,deny
     68        Allow from all
     69    </Directory>
     70
     71    <Directory "/var/www/cgi-bin">
     72        AllowOverride All
     73        Options ExecCGI FollowSymLinks
     74        Order allow,deny
     75        Allow from all
     76    </Directory>
     77
     78</VirtualHost>
     79EOF
     80# /etc/init.d/httpd restart
     81# firefox http://x.y.z.t
     82}}}