zoukankan      html  css  js  c++  java
  • 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
    
  • 相关阅读:
    最全的 Twitter Bootstrap 开发资源清单
    jQuery布局插件UI Layout简介及使用方法
    SQLcode错误代码汇总和sqlstate=37000的解决方案
    JQUERY插件学习之jQuery UI
    如何判断/检查一个集合(List<string>)中是否有重复的元素
    反射原理及简介
    C# 获取文件夹下的所有文件的文件名
    委托编程指南
    模块封装与程序集
    Redis Lock
  • 原文地址:https://www.cnblogs.com/ogrecn/p/7693360.html
Copyright © 2011-2022 走看看