Support #636
Install BackupPC on FreeBSD
Description
This is a guide for installing BackupPC on FreeBSD 9.3.
Setting up the Environment¶
- Start by making sure everything is up to date:
pkg update && pkg upgrade portsnap fetch extract
- Install portmaster:
pkg install portmaster
Install BackupPC¶
- Install BackupPC from ports:
portmaster sysutils/backuppc
NOTE: I decided to enable[X]NMBLOOKUP
,[X]SMBCLIENT
and[X]FILE_RSYNCP
during the port configuration.
- Create a config file for backuppc:
/usr/local/etc/backuppc/update.sh
- Change the ownership of the backuppc config:
chown backuppc:backuppc /usr/local/etc/backuppc/config.pl
- And then enable the service to start at boot:
echo 'backuppc_enable="YES"' >> /etc/rc.conf
- Start backuppc:
service backuppc start
h2 . Install Apache
- Install apache24 and mod_perl2:
portmaster www/apache24 www/perl2
- Edit the main apache config:
vi /usr/local/etc/apache24/httpd.conf
- And change the User and Group to backuppc:
User backuppc Group backuppc
- And change the User and Group to backuppc:
- Create a backuppc apache config:
vi /usr/local/etc/apache24/Includes/backuppc.conf
- And add the following:
LoadModule cgi_module libexec/apache24/mod_cgi.so LoadModule perl_module libexec/apache24/mod_perl.so <Directory /usr/local/www/cgi-bin> Options ExecCGI Require all granted # 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 Require all granted </Directory> Alias /backuppc /usr/local/www/backuppc ScriptAlias /BackupPC_Admin /usr/local/www/cgi-bin/BackupPC_Admin
- And add the following:
- And then enable the service to start at boot:
echo 'apache24_enable="YES"' >> /etc/rc.conf
- Remove the SUID bit from the backuppc perl script:
chmod u-s /usr/local/www/cgi-bin/BackupPC_Admin
- Start apache24:
service apache24 start
- Now open http://backuppc.example.com/BackupPC_Admin in a web browser