bacula安装和问题详解

1.在bacula服务器端安装bacula
首先在http://www.bacula.org下载相应的源码,这里下载的是bacula-5.0.1.tar.gz,接着进行编译安装,安装过程如下:

   1. [root@baculaServer opt]# tar zxvf bacula-5.0.1.tar.gz  
   2. [root@baculaServeropt]# cd bacula-5.0.1  
   3. [root@baculaServer bacula-5.0.1]# ./configure --prefix=/opt/bacula --with-mysql=/opt/mysql  
                                      [问题](编译./configure  --prefix=/opt/bacula --with-mysql)
   4. [root@baculaServer bacula-5.0.1]#make  
   5. [root@baculaServer bacula-5.0.1]#make install


 bacula需要数据库的支持,这里采用Mysql数据库,并假定Mysql已经在bacula服务器端安装好了,且Mysql安装路径为/opt/mysql(bacula在编译时通过“--with-mysql”选项指定了Mysql数据库的安装路径)。
 bacula安装完成后,所有配置文件默认放在/opt/bacula/etc/目录下。

2.在bacula客户端安装bacula
由于bacula客户端只是是需要备份的客户端,因而只需安装相应的客户端组件即可,过程如下:

   1. [root@baculaClient opt]# tar zxvf bacula-5.0.1.tar.gz  
   2. [root@baculaClient opt]# cd bacula-5.0.1  
   3. [root@baculaClient bacula-5.0.1]# ./configure --prefix=/opt/bacula --enable-client-only  
   4. [root@baculaClient bacula-5.0.1]#make  
   5. [root@baculaClient bacula-5.0.1]#make install

三、 初始化Mysql数据库
 在baculaServer上安装完bacula后,还需要创建bacula对应的Mysql数据库以及访问数据库的授权,好在bacula已经为用户准备好了这样的脚本,接下来只要在bacula服务器端上执行如下脚本即可。

   1. [root@localhost bacula-5.0.1]#cd /opt/bacula/etc  
   2. [root@localhost etc]# ./grant_mysql_privileges   
   3. [root@localhost etc]# ./create_mysql_database   
   4. Creation of bacula database succeeded.  
   5. [root@localhost etc]# ./make_mysql_tables   
   6. Creation of Bacula MySQL tables succeeded.


 接下来可以登录Mysql数据库,查看bacula的数据库和数据表是否已经建立。在执行上面三行Mysql初始代码时,默认由空密码的root用户执行,因此要请确保Mysql数据库root密码为空。

[1]问题:CentOS 下mysql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
解决:
登陆mysql,然后执行下面语句:

set password for 'root'@'localhost' =password('');
flush privileges;

然后再重新登陆,就达到你的要求了.

四、配置控制台
# ./bconsole
Connecting to Director localhost:9101

五、守护进程
[root@localhost etc]# ./bacula start
Starting the Bacula Storage daemon  (存储)
Starting the Bacula File daemon     (文件)
Starting the Bacula Director daemon (控制端)


这个文档可以实现安装,有问题大家可以交流。微笑

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章