当前位置: 首页 > 工具软件 > BackupPC > 使用案例 >

backuppc安装部署(基于Centos7)

郭阳泽
2023-12-01

Backuppc是一款非常简单好用的开源备份系统,可以用来备份Windows、linux操作系统,也可以用来备份业务数据,数据库;
今天给大家介绍下我的安装过程:

一、 backuppc的安装配置(基于centos7.3)

  1. 安装epel-release源
    yum install epel-release

  2. 安装backuppc和依赖包
    yum install backuppc nfs-utils nfs-utils-lib bzip2
    systemctl restart backuppc.service

  3. 设置权限
    cd /usr/share/BackupPC/
    chown backuppc:apache sbin/*

        cd /usr/share/BackupPC/sbin
        chmod u+s BackupPC_Admin
        usermod -s /bin/bash backuppc
  4. 设置防火墙放行端口
    backuppc默认使用80端口,这里需放行:
    firewall-cmd –zone=public –add-port=80/tcp –permanent
    firewall-cmd –reload

  5. 修改backuppc配置文件
    vi /etc/BackupPC/config.pl
    修改:$Conf{CgiAdminUsers} = ”; 改为:$Conf{CgiAdminUsers} = ‘backuppc’;
    修改:$Conf{PingPath} = ”;改为:$Conf{PingPath} = ‘/bin/ping’;

  6. 修改apache配置文件
    vi /etc/httpd/conf.d/BackupPC.conf
    结果如下:
    <VirtualHost *:80>
    ServerName backuppc.local.Dev
    DocumentRoot /usr/share/BackupPC

<Directory /usr/share/BackupPC/>
AuthType Basic
AuthUserFile /etc/BackupPC/apache.users
AuthName “BackupPC”

<IfModule mod_authz_core.c>
<RequireAll>
Require valid-user
<RequireAny>
Require valid-user
</RequireAny>
</RequireAll>
</IfModule>
<IfModule !mod_authz_core.c>
order deny,allow
allow from all
</IfModule>
</Directory>

Alias /BackupPC/images /usr/share/BackupPC/html/
ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin
ScriptAlias /backuppc /usr/share/BackupPC/sbin/BackupPC_Admin

</VirtualHost>

7. 设置backuppc登陆账号和密码
  htpasswd -c /etc/BackupPC/apache.users backuppc 
    New password:
    Re-type new password:
    Adding password for user backuppc
    重启apache和backuppc:
    systemctl restart backuppc.service
    systemctl restart httpd.service
8. 生成ssh密钥,并拷贝到客户端root用户下
    su - backuppc  切换到backuppc用户
        ssh-keygen -t rsa  生成密钥
        ssh-copy-id root@client_ip_address  拷贝到客户端root用户下
  ssh root@client_ip_address 测试是否生效
  1. 登陆backuppc页面,http://x.x.x.x/backuppc ,使用之前设置的密码登陆

转载于:https://blog.51cto.com/570836653/2394259

 类似资料: