Search Knowledgebase

How to Install BackupPC on Centos 6.8

Enable Networking:

How to Enable Static IP on Centos 6

Post Installation Configurations:

How to configure Centos 6 after Installation

Install and enable Epel Release:

yum install epel-release -y


Install backuppc:

yum install backuppc mod_perl mod_ssl -y

It will install httpd, rsync and everything else it needs.


It’s installed a web server, but in order that we can browse it we have to at least open up port 80. In this case I will be opening up a few other ports too such as 443 For ssl when we enable it.

vim /etc/sysconfig/iptables


and add these lines (edit BOLD as required)

## Allow systems to Web Browser ##
-A INPUT -s -p tcp -m multiport --dports 80,443 -j ACCEPT

ESC, wq

iptables-restore < /etc/sysconfig/iptables


Now lets turn on httpd service (Webservice known as Apache) and browse to the IP address of the server. We should get a welcome page.


service httpd start

[root@backup01 ~]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for
httpd: Could not reliably determine the server’s fully qualified domain name, using for ServerName
[ OK ]


Don’t worry about the error for now, we will sort that out later. You will get the Apache2 Test Page. 🙂


Becasue this is a Backuppc Server, we will want httpd to run as the backuppc user which is automatically created when we installed backuppc so:

vim /etc/httpd/conf/httpd.conf


Go down a few pages and change


User apache
Group apache


User backuppc
Group apache



ServerAdmin root@localhost




3) Uncomment # ServerName

and type in the FQDN of the server


ESC, wq


Configuring BackupPC.conf file and authentication


When you browse to the BackupPC website then it will ask you for a username and password. Let’s configure this:


Create the Authentication file with the username as “backuppc” | Case sensitive.

htpasswd -c /etc/BackupPC/apache.users backuppc

put in the new password twice

New password:
Re-type new password:
Adding password for user backuppc


Edit the apache configuration file for the website BackupPC:

vim /etc/httpd/conf.d/BackupPC.conf



AuthName "BackupPC"


AuthName "backuppc"


And under the text where it says “# Apache 2.2”

Edit it so it looks like this: | This is to allow httpd to serve files.

<IfModule !mod_authz_core.c>
 # Apache 2.2
 order deny,allow
 allow from all
 require valid-user

ESC, wq


Restart the httpd service to enable the changes:

service httpd restart

Stopping httpd: [ OK ]
Starting httpd: [ OK ]


Edit the BackupPC configuration file:


We have to make sure that the user “backuppc” for the website has Admin access:


vim /etc/BackupPC/


Go down a few pages and find

$Conf{CgiAdminUserGroup} = '';
$Conf{CgiAdminUsers} = '';
# URL of the BackupPC_Admin CGI script. Used for email messages.
$Conf{CgiURL} = "http://localhost/BackupPC";

change it to: | for example:

$Conf{CgiAdminUserGroup} = '';
$Conf{CgiAdminUsers} = 'backuppc';
# URL of the BackupPC_Admin CGI script. Used for email messages.
$Conf{CgiURL} = "";



Next start BackupPC service:

service backuppc start

Starting BackupPC: [ OK ]


Enable httpd and backuppc to start on system bootup:

chkconfig httpd on
chkconfig backuppc on


We also now need to edit the sudoers file so that the user backuppc can access tar and other programmes:



Add at the end of the file :

Defaults !lecture
backuppc ALL=NOPASSWD:/bin/gtar,/bin/tar


Go to your web browser and type in http://<ip>/BackupPC

Enter in backuppc as the username and the password you setup earlier.


You will now see the BackupPC main page 🙂


Well Done!