bacula安裝部署篇(一)


以bacula-7.4.4安裝為例

CentOS-7

安裝mariadb

yum install -y mariadb-server mariadb-devel
systemctl start mariadb
systemctl enable mariadb

源代碼安裝

yum install -y gcc gcc-c++
#需安裝C++編譯環境

tar zxvf bacula-7.4.4.tar.gz
cd bacula-7.4.4
./configure --prefix=/opt/bacula --with-mysql
make && make install
make install-autostart

CentOS-6

安裝mysql

yum install -y mysql mysql-server mysql-devel
/etc/init.d/mysqld start

#設置mysql開機自啟動
chkconfig mysqld on        #設置開機自啟動
chkconfig --list mysqld    #檢查開機自啟動

源代碼安裝

yum install -y gcc gcc-c++
#需安裝C++編譯環境

tar zxvf bacula-7.4.4.tar.gz
cd bacula-7.4.4
./configure --prefix=/opt/bacula --with-mysql
make && make install
make install-autostart

#執行命令后查看自啟動
ls /etc/rc.d/init.d/ |grep bacula
bacula-dir
bacula-fd
bacula-sd

在需要備份的服務器上安裝客戶端(linux)

yum install -y gcc gcc-c++
#需安裝C++編譯環境

tar zxvf bacula-7.4.4.tar.gz
cd bacula-7.4.4
./configure --prefix=/opt/bacula --enable-client-only
make && make install
make install-autostart

初始化Bacula的數據庫

cd /opt/bacula/etc
./create_mysql_database 
./grant_mysql_privileges 
./make_mysql_tables

登錄Mysql數據庫 查看bacula的庫表是否已經建立

[root@bacula1 etc]# mysql -uroot
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 5.5.56-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| bacula             |
| mysql              |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.00 sec)

MariaDB [(none)]> quit
Bye


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM