NBU 是一款企业级安全加密备份产品。
在国产操作系统上 UOS 1050a 版本(基于阿里 Anolis OS 8,可理解为 CentOS 8)Veritas NetBackup。
部署
安装包准备
在官网下载安装包 NetBackup_8.1_LinuxR_x86_64.tar.gz
并上传到服务器。
服务器策略修改
关闭服务器防火墙(或者自行添加规则)
sudo systemctl stop firewalld
sudo systemctl disable firewalld
关闭 SELinux
sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
执行后重启机器,检查状态是否为 disabled
sudo sestatus | grep disabled
SELinux status: disabled
配置内核参数
sudo cat /proc/sys/kernel/sem
echo 300 307200 32 1024 | sudo tee /proc/sys/kernel/sem
sudo sysctl -a | grep kernel.sem
echo "kernel.sem = 300 307200 32 1024" | sudo tee -a /etc/sysctl.conf
sudo cat /etc/sysctl.conf | grep kernel.sem
sudo sysctl -p
配置主机名,根据需要选择,本文以 nbu
为例
sudo hostnamectl set-hostname nbu
部署前置条件
创建用户和组
sudo mkdir /usr/openv -p
sudo groupadd nbwebgrp
sudo useradd -g nbwebgrp -c 'NetBackup Web Services account' -d /usr/openv/wmc nbwebsvc
配置环境变量
cat<<EOF>>~/.bashrc
export NBU_HOME=/usr/openv/netbackup
export PATH=\$NBU_HOME/bin:\$NBU_HOME/bin/goodies:\$NBU_HOME/bin/goodies/support:\$NBU_HOME/bin/admincmd:/usr/openv/db/bin:/usr/openv/volmgr/bin:\$PATH
EOF
如果习惯在普通用户下操作,那么这个配置环境变量的命令需要在 root 用户和普通用户下分别操作一次。
安装产品依赖
sudo dnf install ncurses-compat-libs libnsl
修改 root 用户密码
echo root:Uos@2022 | sudo chpasswd
配置主机名
在 /etc/hosts
里添加一行本机主机名映射,比如
192.168.1.5 nbu
正式部署
解压安装包
tar xf NetBackup_8.1_LinuxR_x86_64.tar.gz
切换至 root 用户
sudo su - root
配置文件打开数(临时)
ulimit -f unlimited
ulimit -n 8000
解压后文件夹内应该有如下结构
[root@localhost NetBackup_8.1_LinuxR_x86_64]# ll
total 104
drwxr-xr-x 2 root bin 41 Sep 11 2017 Doc
-r-xr-xr-x 1 root bin 73951 Sep 11 2017 install
-r--r--r-- 1 root bin 25499 Sep 11 2017 LICENSE
dr-xr-xr-x 4 root bin 32 Sep 11 2017 linuxR_x86
执行安装脚本
Veritas Installation Script
Copyright (c) 2017 Veritas Technologies LLC. All rights reserved.
Installing NetBackup Server Software
Please review the VERITAS SOFTWARE LICENSE AGREEMENT located on
the installation media before proceeding. The agreement includes
details on the NetBackup Product Improvement Program.
For NetBackup installation and upgrade information specific to your
platform and to find out if your installed EEBs or hot fixes are
contained in this release, check the Installation and Upgrade checklists
and the Hot Fix and EEB Release Auditor, both available on the Veritas
Services and Operations Readiness Tools (SORT) page:
https://sort.veritas.com/netbackup.
ATTENTION! To help ensure a successful upgrade to NetBackup 8.1,
please visit the NetBackup 8.x Upgrade Portal:
https://www.veritas.com/docs/000115678.
不出意外情况下会出现以下询问
# 是否希望继续安装?【是】
Do you wish to continue? [y,n] (y)
# 当前机器是主服务器吗?【是】
Is this host the master server? [y,n] (y) y
# 当前是否正在执行主服务器的灾难恢复?【否】
Are you currently performing a disaster recovery of a master server? [y,n] (n) n
# 是否继续安装 NetBackup 和 媒体管理 文件?【是】
Do you want to install NetBackup and Media Manager files? [y,n] (y) y
# 输入许可证序列号
Enter license key:
# 是否希望添加额外的许可证序列号?【否】
Do you want to add additional license keys now? [y,n] (y) n
# NBU 服务器名是否是本机名?【是】
NetBackup server name of this machine? [y,n] (y) y
# 是否需要添加媒体服务器?(是否将备份服务和主服务部署在一台机器中)【否】
Do you want to add any media servers now? [y,n] (n) n
# 是否要启动与作业相关的 NetBackup 守护程序,以便启动备份和还原?【是】
Do you want to start the job-related NetBackup daemons so backups and restores can be initiated? [y,n] (y) y
# 输入 OpsCenter 服务器(默认值:NONE)?【回车】
Enter the OpsCenter server (default: NONE):
使用
获取 CA 证书(需要指定 hostname)
nbcertcmd -displayCACertDetail -server nbu
CA Certificate received successfully from server localhost.
Subject Name : /CN=nbatd/OU=root@localhost.localdomain/O=vx
Start Date : 7月 26 04:59:53 2022 GMT
Expiry Date : 7月 21 06:14:53 2042 GMT
SHA1 Fingerprint : 31:99:96:69:E2:8F:D1:C8:B7:EC:9F:4E:10:DB:6F:FC:84:1C:7D:AE
CA Certificate State : Trusted
如果不清楚安装服务时制定的主机名,可以使用下面的命令进行查询
grep -E 'NB_HOSTNAME=' /usr/openv/wmc/bin/setenv
初始化配置
如果证书显示正常,就可以进行服务端配置工作了。在服务器的终端里(需要服务器安装图形界面)输入命令,输入服务端的主机名、root用户名、root用户的密码
/usr/openv/netbackup/bin/jnbSA
登入控制台后选择左侧 「Security Management」安全管理 - 「Certificate Management」证书管理 - 「Token Management」令牌管理中选择工具栏中的「Create Token」
创建成功后会看到一个令牌 Value 值,需要记录或者截图留存,后续配置客户端时需要用到。
然后另开一个终端,创建备份存放目录(可根据需求自行更换路径)
sudo mkdir -p /backup/
选择左侧 「NetBackup Management」NetBackup 管理 - 「Storage」存储 - 「Storage Unit」存储单元中选择工具栏中的「New Storage Unit」新建存储单元,按图配置存储路径
至此服务端配置完毕
常见故障解决
报错1
输入序列号时出现
Enter license key: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
: /usr/openv/netbackup/bin/admincmd/bpminlicense: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory (127)
解决
sudo dnf install ncurses-compat-libs
报错2
输入序列号时出现
: /usr/openv/netbackup/bin/admincmd/bpminlicense: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory (127)
解决
sudo dnf install libnsl
报错3
配置客户端时报错
nbcertcmd: The -getCertificate operation failed for server master_server_name. EXIT STATUS 5954
解决
在服务端执行命令 bpclntcmd -hn hostname
(hostname 替换为配置的客户端主机名)查看结果是否正常,检查服务端和客户端的 hosts 配置是否正确。
附录
参考链接
- NetBackup install fails: Error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory (127) - Veritas Support
- Web server user/group setup steps for a NetBackup master server - Veritas Support
- Recommended NetBackup UNIX / Linux semaphore tuning values (Linux/Solaris/HP-UX/AIX) - Veritas Support
- Minimum O/S ulimit settings on master and media server UNIX platforms - Veritas Support
- How to add additional search paths for NetBackup binaries and scripts - Veritas Support
- How to restart NetBackup and PBX services on Linux - Veritas Support
- nbcertcmd: The -getCertificate operation failed for server master_server_name. EXIT STATUS 5954 - Veritas Support
- 虚拟机玩转 Veritas NetBackup(NBU)之服务端安装部署 - CSDN
本文由 柒 创作,采用 知识共享署名4.0
国际许可协议进行许可。
转载本站文章前请注明出处,文章作者保留所有权限。
最后编辑时间: 2023-07-14 14:33 PM