• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install BareOS in CentOS

{{postValue.id}}

To install Bareos in CentOS

BareOS is a free-ware, multi platform application for taking backups with the graphical front end. It creates backup and restores it. This tool can be configured and can be used to add the backups in any centralized medium. Installation of Bareos is explained in this article.

To install Bareos

Utilize the following command to download and add the Bareos repositories from it’ s official website.

[[email protected] ~]# wget -O /etc/yum.repos.d/bareos.repo  
http://download.bareos.org/bareos/release/latest/CentOS_7/bareos.repo
--2016-09-22 00:12:53--  http://download.bareos.org/bareos/release/latest/CentOS_7/bareos.repo
Resolving download.bareos.org (download.bareos.org)... 81.173.212.161
Connecting to download.bareos.org (download.bareos.org)|81.173.212.161|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 266 [text/plain]
Saving to: ‘ /etc/yum.repos.d/bareos.repo’ 

100%[===================================================================================================================================================> ] 266         --.-K/s   in 0s      

2016-09-22 00:12:54 (4.93 MB/s) - ‘ /etc/yum.repos.d/bareos.repo’  saved [266/266]


After adding the repositories, start installing Bareos.

[[email protected] ~]# yum install bareos bareos-database-mysql -y 
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: mirror.fibergrid.in
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
bareos_bareos-15.2                                                                                                                                                                     41/41
Resolving Dependencies
-->  Running transaction check
--->  Package bareos.x86_64 0:15.2.2-37.1.el7 will be installed
-->  Processing Dependency: bareos-storage = 15.2.2 for package: bareos-15.2.2-37.1.el7.x86_64
-->  Processing Dependency: bareos-client = 15.2.2 for package: bareos-15.2.2-37.1.el7.x86_64
-->  Processing Dependency: bareos-director = 15.2.2 for package: bareos-15.2.2-37.1.el7.x86_64
--->  Package bareos-database-mysql.x86_64 0:15.2.2-37.1.el7 will be installed
.
.
.
Installed:
  bareos.x86_64 0:15.2.2-37.1.el7                                                       bareos-database-mysql.x86_64 0:15.2.2-37.1.el7                                                      
Dependency Installed:
  bareos-bconsole.x86_64 0:15.2.2-37.1.el7         bareos-client.x86_64 0:15.2.2-37.1.el7     bareos-common.x86_64 0:15.2.2-37.1.el7       bareos-database-common.x86_64 0:15.2.2-37.1.el7  
  bareos-database-tools.x86_64 0:15.2.2-37.1.el7   bareos-director.x86_64 0:15.2.2-37.1.el7   bareos-filedaemon.x86_64 0:15.2.2-37.1.el7   bareos-storage.x86_64 0:15.2.2-37.1.el7          
  libfastlz.x86_64 0:0.1-7.1.el7                  
Complete!


Setup the database for Bareos. Lets start with the installation of MariaDB and configure it.

[[email protected] ~]# yum install mariadb-server -y 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.fibergrid.in
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Resolving Dependencies
-->  Running transaction check
--->  Package mariadb-server.x86_64 1:5.5.50-1.el7_2 will be installed
-->  Processing Dependency: mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-server-5.5.50-1.el7_2.x86_64
-->  Processing Dependency: mariadb(x86-64) = 1:5.5.50-1.el7_2 for package: 1:mariadb-server-5.5.50-1.el7_2.x86_64
-->  Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.50-1.el7_2.x86_64
-->  Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.50-1.el7_2.x86_64
.
.
.
Dependency Installed:
  mariadb.x86_64 1:5.5.50-1.el7_2          perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7        perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7        perl-DBD-MySQL.x86_64 0:4.023-5.el7       
  perl-DBI.x86_64 0:1.627-4.el7            perl-Data-Dumper.x86_64 0:2.145-3.el7               perl-IO-Compress.noarch 0:2.061-2.el7              perl-Net-Daemon.noarch 0:0.48-5.el7       
  perl-PlRPC.noarch 0:0.2020-14.el7       

Dependency Updated:
  mariadb-libs.x86_64 1:5.5.50-1.el7_2                                                                                                                                                       
Complete!


Start and enable the MariaDB services.

[[email protected] ~]# systemctl start mariadb
[[email protected] ~]# systemctl enable mariadb 
ln -s ' /usr/lib/systemd/system/mariadb.service'  ' /etc/systemd/system/multi-user.target.wants/mariadb.service' 
[[email protected] ~]# mysql_secure_installation 
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we' ll need the current
password for the root user.  If you' ve just installed MariaDB, and
you haven' t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from ' localhost' .  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named ' test'  that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you' ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!


Edit the my.cnf file and append the following lines to it. This settings allows you to access the local Mysql server.

[[email protected] ~]# vim /etc/my.cnf 
[client]
host=localhost
user=root
password=root


Setup the Bareos database and tables by running the following commands.

[[email protected] ~]# /usr/lib/bareos/scripts/create_bareos_database 
Creating mysql database
Creating of bareos database succeeded.
[[email protected] ~]# /usr/lib/bareos/scripts/make_bareos_tables 
Making mysql tables
Creation of Bareos MySQL tables succeeded.
[[email protected] ~]# /usr/lib/bareos/scripts/grant_bareos_privileges 
Granting mysql tables
Privileges for user bareos granted ON database bareos.


Start the services for BareOS daemons by running the following command.

[[email protected] ~]# systemctl start bareos-dir
[[email protected] ~]# systemctl start bareos-sd
[[email protected] ~]# systemctl start bareos-fd 


Utilize the following command to enable the ports in firewall.

[[email protected] ~]# firewall-cmd --permanent --add-port=9101-9103/tcp 
success
[[email protected] ~]# firewall-cmd --reload  
success


Run the following commands to test Bareos director access.

[[email protected] ~]# bconsole  
Connecting to Director linuxhelp:9101


Install apache and php package by using the following command.

[[email protected] ~]# yum install httpd php php-cli php-common -y 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.fibergrid.in
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Resolving Dependencies
-->  Running transaction check
--->  Package httpd.x86_64 0:2.4.6-40.el7.centos.4 will be installed
-->  Processing Dependency: httpd-tools = 2.4.6-40.el7.centos.4 for package: httpd-2.4.6-40.el7.centos.4.x86_64
-->  Processing Dependency: /etc/mime.types for package: httpd-2.4.6-40.el7.centos.4.x86_64
-->  Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-40.el7.centos.4.x86_64
-->  Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-40.el7.centos.4.x86_64
--->  Package php.x86_64 0:5.4.16-36.3.el7_2 will be installed
--->  Package php-cli.x86_64 0:5.4.16-36.3.el7_2 will be installed
--->  Package php-common.x86_64 0:5.4.16-36.3.el7_2 will be installed
.
.
.


Run the following command to install the epel repository as shown below.

[[email protected] ~]# yum install epel-release -y 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.fibergrid.in
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Resolving Dependencies
-->  Running transaction check
--->  Package epel-release.noarch 0:7-6 will be installed
-->  Finished Dependency Resolution
.
.
.
Running transaction
  Installing : epel-release-7-6.noarch                                                                                                                                                   1/1 
  Verifying  : epel-release-7-6.noarch                                                                                                                                                   1/1 

Installed:
  epel-release.noarch 0:7-6                                                                                                                                                                  

Complete


Then start installing the BareOS webui by running the following command.

[[email protected] ~]# yum install bareos-webui -y 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.fibergrid.in
 * epel: mirror01.idc.hinet.net
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Resolving Dependencies
-->  Running transaction check
--->  Package bareos-webui.noarch 0:15.2.2-41.1.el7 will be installed
-->  Processing Dependency: php-ZendFramework2 > = 2.2.0 for package: bareos-webui-15.2.2-41.1.el7.noarch
-->  Running transaction check
--->  Package php-ZendFramework2.noarch 0:2.4.10-1.el7 will be installed
-->  Processing Dependency: php-composer(zendframework/zend-xmlrpc) = 2.4.10 for package: php-ZendFramework2-2.4.10-1.el7.noarch
-->  Processing Dependency: php-composer(zendframework/zend-view) = 2.4.10 for package: php-ZendFramework2-2.4.10-1.el7.noarch
-->  Processing Dependency: php-composer(zendframework/zend-version) = 2.4.10 for package: php-ZendFramework2-2.4.10-1.el7.noarch
.
.
.
php-phpunit-PHP-Timer.noarch 0:1.0.6-1.el7                    php-phpunit-PHP-TokenStream.noarch 0:1.4.8-1.el7               php-phpunit-PHPUnit.noarch 0:4.8.27-1.el7                   
  php-phpunit-PHPUnit-MockObject.noarch 0:2.3.8-1.el7           php-phpunit-Text-Template.noarch 0:1.2.0-5.el7                 php-phpunit-Version.noarch 0:1.0.5-1.el7                    
  php-phpunit-comparator.noarch 0:1.2.0-1.el7                   php-phpunit-diff.noarch 0:1.4.1-1.el7                          php-phpunit-environment.noarch 0:1.3.2-1.el7                
  php-phpunit-exporter.noarch 0:1.2.2-1.el7                     php-process.x86_64 0:5.4.16-36.3.el7_2                         php-sebastian-global-state.noarch 0:1.1.1-1.el7             
  php-sebastian-recursion-context.noarch 0:1.0.2-1.el7          php-soap.x86_64 0:5.4.16-36.3.el7_2                            php-symfony-class-loader.noarch 0:2.8.9-1.el7               
  php-symfony-common.noarch 0:2.8.9-1.el7                       php-symfony-yaml.noarch 0:2.8.9-1.el7                          php-tidy.x86_64 0:5.4.16-4.el7                              
  php-xml.x86_64 0:5.4.16-36.3.el7_2                            php-zendframework-zendxml.noarch 0:1.0.2-2.el7                 t1lib.x86_64 0:5.1.2-14.el7                                 

Complete!


Open the Bareos-webui configuration file and add the following lines into it.

[[email protected] ~]# vim /etc/bareos/bareos-dir.conf 
@/etc/bareos/bareos-dir.d/webui-consoles.conf
@/etc/bareos/bareos-dir.d/webui-profiles.conf


Also open and check the “ webui-consoles.conf” and “ webui-profiles.conf” files.

vim /etc/bareos/bareos-dir.d/webui-consoles.conf
vim /etc/bareos/bareos-dir.d/webui-profiles.conf 


Configure the Bareos login by changing the username and password in the file “ webui-consoles.conf”

Now view the configuration file “ directories.ini” , it should look similar as shown below.

  Section localhost-dir
 
[localhost-dir]

  Enable or disable section. Possible values are “ yes”  or “ no” , the default is “ yes” .
enabled = “ yes” 
  Fill in the IP-Address or FQDN of you director.
diraddress = “ localhost” 
  Default value is 9101
dirport = 9101
  Section another-host-dir
 
[another-host-dir]
enabled = “ no” 
diraddress = “ ” 
dirport = 9101


Run the following command to restart the services.

[[email protected] ~]# systemctl restart httpd
[[email protected] ~]# systemctl restart bareos-dir 


Set selinux Boolean value as shown below.

[[email protected] ~]# setsebool -P httpd_can_network_connect on 

Open the browser and point to the URL http://< IP address> /bareos-webui/

bareOS
dashboard

Tags:
jackson
Author: 

Comments ( 1 )

mguevara
Hi, thanks for your great contribution. I have a question, i'm stopped in these steps: [[email protected] ~]# vim /etc/bareos/bareos-dir.conf vim /etc/bareos/bareos-dir.d/webui-consoles.conf vim /etc/bareos/bareos-dir.d/webui-profiles.conf because those files don't exist in my system after execute the installation of bareos-gui [[email protected] bareos]# uname -a Linux sv-bkp01-srv.cdsoftca.net 3.10.0-862.3.3.el7.x86_64 #1 SMP Fri Jun 15 04:15:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [[email protected] bareos]# more /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [[email protected] bareos]# [[email protected] etc]# rpm -qa | grep bareos bareos-common-17.2.4-9.1.el7.x86_64 bareos-database-common-17.2.4-9.1.el7.x86_64 bareos-tools-17.2.4-9.1.el7.x86_64 bareos-filedaemon-17.2.4-9.1.el7.x86_64 bareos-client-17.2.4-9.1.el7.x86_64 bareos-director-17.2.4-9.1.el7.x86_64 bareos-webui-17.2.4-15.1.el7.noarch bareos-database-mysql-17.2.4-9.1.el7.x86_64 bareos-database-tools-17.2.4-9.1.el7.x86_64 bareos-storage-17.2.4-9.1.el7.x86_64 bareos-bconsole-17.2.4-9.1.el7.x86_64 bareos-17.2.4-9.1.el7.x86_64
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How can I downgrade from Bareos back to Bacula?

A

It is technically not impossible but we haven't tried nor do we intend to write a downgrade script.

Q

How can I export all tapes involved in a particular backup job?

A

Run this command for the following
RunScript {
Console = "export storage=my_storage_name volume=%V"
RunsWhen = After
RunsOnClient = no
}

Q

Why does it require Mariadb in bareos?

A

Yes, It saves the backup in the form of DB in bareos.

Q

Shall I allow remote login in Bareos?

A

Yes, you can allow that iss based on your preference and security

Q

What does the Bareos VMware Backup Plugin do?

A

The Bareos VMware Backup Plugin triggers a snapshot of a running or suspended virtual machine and makes a backup of this snapshot.

Back To Top!
Rank
User
Points

Top Contributers

1
userNameLinuxHelp
25470

Top Contributers

2
userNamejackson
8070

Top Contributers

3
userNamegabriel
3370

Top Contributers

4
userNamemason
3175

Top Contributers

5
userNamegrayson
3170
Can you help bbb ?
How to change a function of a key

I got a new laptop recently and am just learning linux. It runs great and im learning a lot, but I have one problem with the hardware. Im used to the backspace being the most upper right key. Whenever I try to hit the backspace, I end up hitting home and returning the cursor to the begining of the line. I was wondering if there was someway to change the home key to become backspace as well. I never use the home function and would rather have an extra backspace or even a key that does nothing, than a key that moves my cursor away from the mistake and doesnt erase it. Is there anyway to either make the home button also backspace, or just do nothing?

Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2021 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.