Project

General

Profile

Support #636

Install BackupPC on FreeBSD

Added by Daniel Curtis over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Backup Server
Target version:
Start date:
07/21/2015
Due date:
% Done:

100%

Estimated time:
5.00 h
Spent time:

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

Resources

#1

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
#2

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 20
#3

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
#4

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
  • % Done changed from 20 to 40
#5

Updated by Daniel Curtis over 8 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 40 to 100
#6

Updated by Daniel Curtis over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF