DBackup环境部署linux,linux_BackupPC 安装部署

yum install

perl-Compress-Zlib perl-Archive-Zip perl-File-RsyncP perl-XML-RSS

httpd

yum

-y install perl-suidperl mod_perl

rpm -ivh

backuppc_community-3.2.0beta0-1.rhel5.noarch.rpm

1- 上面安装会创建backuppc,apache用户。

vi

/etc/httpd/conf/httpd.conf

修改‘User apache‘ 为 ‘User backuppc

User apache

Group apache

2- 编辑

/etc/httpd/conf.d/backuppc.conf

# vi

/etc/httpd/conf.d/backuppc.conf --允许连接的地址

修改‘Allow from 127.0.0.1‘ 为 ‘Allow

from all‘

#

# DESCRIPTION

#

# This file controls access and

configuration for the BackupPC CGI

# interface.

#

# Distributed with BackupPC version 3.1.1, released 22 Dec

2008.

#

# This section tells apache which machines can access the

interface.

# You can change the allow line to allow access from your

local

# network, or comment out this region to allow access from

all

# machines.

#

order allow,deny

#deny from all

allow from all

#

# You can change the authorization method to LDAP or another

method

# besides htaccess here if you are so inclined. Comment out the lines

# below or create an htpasswd file called BackupPC.users in the

same

# directory as this file.

#

AuthType Basic

AuthUserFile /etc/httpd/conf.d/BackupPC.usersAuthName

"BackupPC Community Edition Administrative Interface"

require valid-user

order deny,allow

deny from none

allow from all

Alias /BackupPC/images /usr/lib/backuppc/www/images

ScriptAlias /BackupPC_Admin /usr/lib/backuppc/www/html/BackupPC_Admin

ScriptAlias /backuppc /usr/lib/backuppc/www/html/BackupPC_Admin

3- Create password for cgi-bin backuppc

user

# htpasswd -c /etc/httpd/conf.d/BackupPC.users

backuppc

--生成登陆密码文件。

4- Edit backuppc config file

# vi /etc/BackupPC/config.pl

Find and change accordingly

$Conf{ServerHost} = 'localhost';

$Conf{SplitPath} = '/usr/bin/split';

$Conf{CatPath} = '/bin/cat';

$Conf{GzipPath} = '/bin/gzip';

$Conf{Bzip2Path} = '/usr/bin/bzip2';

$Conf{BackupPCUser} = 'backuppc';

$Conf{TopDir} = '/var/lib/backuppc';

$Conf{ConfDir} = '/etc/BackupPC';

$Conf{LogDir} = '/var/log/BackupPC';

$Conf{InstallDir} = '/usr';

$Conf{CgiDir} = '/usr/share/backuppc/cgi-bin';

$Conf{ServerInitdPath} =

'/etc/init.d/backuppc';

$Conf{ServerInitdStartCmd} = '$sshPath -q -x -l

root $serverHost$serverInitdPath start';

$Conf{SshPath} = '/usr/bin/ssh';

$Conf{NmbLookupPath} = '/usr/bin/nmblookup';

$Conf{PingPath} = '/bin/ping';

$Conf{CgiAdminUsers} = 'backuppc';

Save

5- Grant passwordless sudo for user backuppc to

run /bin/gtar and /bin/tar

# visudo

--让backup用户,可以执行一些命令

Add these entries :

Defaults !lecture # to disable lecture

backuppc ALL=NOPASSWD:/bin/gtar,/bin/tar #

enable user backuppc to run /bin/tar and /bin/gtar without

authentication.

Comment this entry

#Defaults requiretty

Save and exit

重启服务使生效。

# /etc/init.d/http restart

# /etc/init.d/backuppc restart

Open your browser and point it to

'http://IP/backuppc' and you should see the backuppc web

interface

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值