Support #636
Updated by Daniel Curtis over 9 years ago
This is a guide for installing BackupPC on FreeBSD 9.3. h2. Setting up the Environment * Start by making sure everything is up to date: <pre> pkg update && pkg upgrade portsnap fetch extract </pre> * Install portmaster: <pre> pkg install portmaster </pre> h2. Install BackupPC * Install BackupPC from ports: <pre> portmaster sysutils/backuppc </pre> *NOTE*: I decided to enable @[X]NMBLOOKUP@, @[X]SMBCLIENT@ and @[X]FILE_RSYNCP@ during the port configuration. * Create a config file for backuppc: <pre> /usr/local/etc/backuppc/update.sh </pre> * Change the ownership of the backuppc config: <pre> chown backuppc:backuppc /usr/local/etc/backuppc/config.pl </pre> * And then enable the service to start at boot: <pre> echo 'backuppc_enable="YES"' >> /etc/rc.conf </pre> * Start backuppc: <pre> service backuppc start </pre> h2 . Install Apache * Install apache24 and mod_perl2: <pre> portmaster www/apache24 www/perl2 </pre> * Edit the main apache config: <pre> vi /usr/local/etc/apache24/httpd.conf </pre> #* And change the *User* and *Group* to backuppc: <pre> User backuppc Group backuppc </pre> * Create a backuppc apache config: <pre> vi /usr/local/etc/apache24/Includes/backuppc.conf </pre> #* And add the following: <pre> LoadModule cgi_module libexec/apache24/mod_cgi.so LoadModule perl_module libexec/apache24/mod_perl.so <Directory /usr/local/www/cgi-bin> Options ExecCGI # This section tells apache which machines can access the interface. # You can change the allow line to allow access from your local # network, or comment out this region to allow access from all # machines. # Require all granted ip 127.0.0.1 # You can change the authorization method to LDAP or another method # besides htaccess here if you are so inclined. # AuthType Basic # AuthUserFile /etc/backuppc/backuppc.users # AuthName "BackupPC Community Edition Administrative Interface" # require valid-user </Directory> <Directory /usr/local/www/backuppc> DirectoryIndex BackupPC.html #<Directory /usr/share/backuppc/html> # Require all granted host example.org </Directory> #</Directory> Alias /backuppc /usr/local/www/backuppc ScriptAlias /BackupPC_Admin /usr/local/www/cgi-bin/BackupPC_Admin </pre> * And then enable the service to start at boot: <pre> echo 'apache24_enable="YES"' >> /etc/rc.conf </pre> * Remove the SUID bit from the backuppc perl script: <pre> chmod u-s /usr/local/www/cgi-bin/BackupPC_Admin </pre> * Start apache24: <pre> service apache24 start </pre> * Now open http://backuppc.example.com/BackupPC_Admin in a web browser h2. Resources * https://wiki.archlinux.org/index.php/BackupPC