标签:service reload ssh pat zone 设置权限 ima 好用 conf
Backuppc是一款非常简单好用的开源备份系统,可以用来备份Windows、linux操作系统,也可以用来备份业务数据,数据库;一、 backuppc的安装配置(基于centos7.3)
安装epel-release源
yum install epel-release
安装backuppc和依赖包
yum install backuppc nfs-utils nfs-utils-lib bzip2
systemctl restart backuppc.service
设置权限
cd /usr/share/BackupPC/
chown backuppc:apache sbin/*
cd /usr/share/BackupPC/sbin
chmod u+s BackupPC_Admin
usermod -s /bin/bash backuppc
设置防火墙放行端口
backuppc默认使用80端口,这里需放行:
firewall-cmd –zone=public –add-port=80/tcp –permanent
firewall-cmd –reload
修改backuppc配置文件
vi /etc/BackupPC/config.pl
修改:$Conf{CgiAdminUsers} = ”; 改为:$Conf{CgiAdminUsers} = ‘backuppc’;
修改:$Conf{PingPath} = ”;改为:$Conf{PingPath} = ‘/bin/ping’;
<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 测试是否生效
标签:service reload ssh pat zone 设置权限 ima 好用 conf
原文地址:https://blog.51cto.com/570836653/2394259