Rocky安装配置BackupPC

sudo dnf update -y
sudo dnf install epel-release -y
sudo dnf install backuppc bzip2 -y
sed -i s/local/all\ granted/ /etc/httpd/conf.d/BackupPC.conf
htpasswd -c /etc/BackupPC/apache.users backuppc

编辑文件 /etc/BackupPC/config.pl

$Conf{CgiAdminUserGroup} = 'backuppc';
$Conf{CgiAdminUsers}     = 'backuppc';
firewall-cmd --add-service=http
firewall-cmd --add-service=http --permanent
systemctl restart backuppc httpd
systemctl --now enable backuppc httpd
# 切换到用户backuppc配置密钥登录,以使用rsync拷贝文件
[root@rocky9 conf.d]# su - backuppc -s /bin/bash
[backuppc@rocky9 ~]$ ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/BackupPC/.ssh/id_rsa): 
Created directory '/var/lib/BackupPC/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /var/lib/BackupPC/.ssh/id_rsa
Your public key has been saved in /var/lib/BackupPC/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:UdXrlGn9U6B6KS9SNO2H2ODc6sPSoGSiNiDaaliclQU backuppc@rocky9.4
The key's randomart image is:
+---[RSA 3072]----+
|    E.    ....   |
|      .  .    o  |
|     o  .  . . * |
|    o    .+ o * o|
| . o    S+ O *  o|
|o + . o . B B o..|
|++ . + . = = .  .|
|o.=   . o * .    |
|oo .     +.o     |
+----[SHA256]-----+
[backuppc@rocky9 ~]$ ssh-copy-id <用户>@<目标主机>
posted @ 2024-11-27 17:19  Huihcuanf  阅读(5)  评论(0编辑  收藏  举报