{"id":504,"date":"2014-06-29T14:32:38","date_gmt":"2014-06-29T02:32:38","guid":{"rendered":"http:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=504"},"modified":"2014-06-29T14:32:38","modified_gmt":"2014-06-29T02:32:38","slug":"installing-webacula-on-fedora-core-20","status":"publish","type":"post","link":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=504","title":{"rendered":"Installing webacula on Fedora core 20"},"content":{"rendered":"<p>This guide is for Fedora core 20 only.<\/p>\n<p>The start of course is the &#8220;yum -y install webacula&#8221;. Do that first.<\/p>\n<p>That will amongst other things place an install guide \/usr\/share\/doc\/webacula\/docs\/INSTALL, I skimmed it to find the minimum steps needed to get this working. Not all the changes required were in the INSTALL file anyway.<\/p>\n<p>This post is the steps I needed to take to get it installed on my bacula server.<\/p>\n<h2>(1) Create the databases<\/h2>\n<p>The database tables needed to be manually created. Thats perfectly normal for any package and that step worked well.<\/p>\n<p>Edit the supplied scripts to create the database and tables and run them, no problems there.<\/p>\n<pre>\r\n\/usr\/share\/webacula\/install\/webacula_mysql_create_database.sh\r\n\/usr\/share\/webacula\/install\/webacula_mysql_make_tables.sh\r\n<\/pre>\n<p>Also while fiddling around in there this is a good time to update the bacula database-name\/user\/password to whatever is used by your bacula databse; thats in the file below<\/p>\n<pre>\r\n\/usr\/share\/webacula\/application\/config.ini\r\n<\/pre>\n<p>After the tables were created and the config file updated it should all just work right.<br \/>\nWrong. I had to go through the additional steps below <\/p>\n<h2>(2) update apache config to allow access<\/h2>\n<p>The first issue was I could not browse to the application URL.<\/p>\n<p>In the installed \/etc\/httpd\/conf.d\/webacula.conf file the following lines were commented. So the global apache settings did not permit access to the application.<\/p>\n<pre>\r\n#   AuthType Basic\r\n#   AuthName \"Webacula\"\r\n#   AuthUserFile       \/etc\/httpd\/conf\/webacula.users\r\n#   Require valid-user\r\n<\/pre>\n<p>I added below those four lines<\/p>\n<pre>\r\n    Require all granted\r\n<\/pre>\n<p>On a production site you might want to instead uncomment the lines and create a htpasswd file for the AuthUserFile to use.<br \/>\nHowever for a home network you will also notice in that file it denies access from all servers except localhost. I just added my two desktop servers to the allow list which is enough to control local access.<\/p>\n<h2>(3) Install mysql Zend driver<\/h2>\n<p>The next issue was the PDO driver for mysql was not installed. As determined by the fortunately verbose error message in the apache error_log file<\/p>\n<pre>\r\n[Sun Jun 29 11:17:32.852494 2014] [:error] [pid 11092] [client 192.168.1.187:1905] PHP Fatal error:  Uncaught exception 'Zend_Exception' with message 'File \"Zend\/Db\/Adapter\/Pdo\/Mysql.php\" does not exist or class \"Zend_Db_Adapter_Pdo_Mysql\" was not found in the file' in \/usr\/share\/php\/Zend\/Loader.php:87\\nStack trace:\\n#0 \/usr\/share\/php\/Zend\/Db.php(263): Zend_Loader::loadClass('Zend_Db_Adapter...')\\n#1 \/usr\/share\/webacula\/html\/index.php(103): Zend_Db::factory('PDO_MYSQL', Array)\\n#2 {main}\\n  thrown in \/usr\/share\/php\/Zend\/Loader.php on line 87\r\n<\/pre>\n<p>That had to be manually installed.<\/p>\n<pre>\r\nyum -y install php-ZendFramework-Db-Adapter-Pdo-Mysql\r\n<\/pre>\n<h2>(4) The repo version of webacula is out of date<\/h2>\n<p>The next issue was the repo version of webacula was for a much earlier version of bacula, the repo files are not compatible with each other. A very clear error message in the apache error_log file.<\/p>\n<pre>\r\n[Sun Jun 29 11:31:14.940417 2014] [:error] [pid 11092] [client 192.168.1.187:1942] PHP Fatal error:  Uncaught exception 'Zend_Exception' with message 'Version error for Catalog database (wanted 12, got 14) ' in \/usr\/share\/webacula\/html\/index.php:183\\nStack trace:\\n#0 {main}\\n  thrown in \/usr\/share\/webacula\/html\/index.php on line 183\r\n<\/pre>\n<p>Both bacula and webacula were installed from the Fedora repositories. An update showed I have the latest webacula; so the repository versions are out of step.<br \/>\n[root@vmhost1 application]# yum update webacula<br \/>\nLoaded plugins: langpacks, refresh-packagekit<br \/>\nNo packages marked for update<\/p>\n<p>Definately a risk as obviously the underlying bacula tables are a much later version, but I manually changed the hard coded version the script expected to the version number in the bacula database.<br \/>\nIn file \/usr\/share\/webacula\/html\/index.php I changed the below to get past that error.<\/p>\n<pre>\r\ndefine('BACULA_VERSION', 14); \/\/ Bacula Catalog version *MID CHANGE FROM 12 TO 14\r\n<\/pre>\n<h2>(5) Setup SUDO access for bconsole<\/h2>\n<p>The final change needed is that by default when installed webacula wants to use sudo to access bconsole; so &#8220;visudo&#8221; and add at the end of the file<\/p>\n<pre>\r\n# for webacula\r\nDefaults:apache !requiretty\r\n%apache localhost=NOPASSWD: \/sbin\/bconsole\r\n%apache realhostname=NOPASSWD: \/sbin\/bconsole\r\n<\/pre>\n<p>An important note on the above; on my server the localhost entry did not work even though the http server is listening on all interfaces, which is why I added the second %apache entry, change realhostname to the real host name of the server you are installing webacula on.<\/p>\n<h2>(6) Try it, it should work now<\/h2>\n<p>Restart the https server to pick up the changes you have been making. Then point your browser at the \/webacula URL you configured. All done.<\/p>\n<h2>Summary<\/h2>\n<p>For me the bad news is I have been trying to remember what web interface I used to use to manage my bacula server; and installing various packages to find the functionality I want. This was not it unfortunately. <\/p>\n<p>The restore functionality of webacula is pretty impressive so I won&#8217;t be un-installing it just yet, as I&#8217;ve made a few typos on command line restores before. But I doubt I will use it for anything else.<\/p>\n<p>So back to the bconsole command line for me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide is for Fedora core 20 only. The start of course is the &#8220;yum -y install webacula&#8221;. Do that first. That will amongst other things place an install guide \/usr\/share\/doc\/webacula\/docs\/INSTALL, I skimmed it to find the minimum steps needed &hellip; <a href=\"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=504\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-504","post","type-post","status-publish","format-standard","hentry","category-my-nux-thoughts-and-notes"],"_links":{"self":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=504"}],"version-history":[{"count":2,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/504\/revisions"}],"predecessor-version":[{"id":506,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/504\/revisions\/506"}],"wp:attachment":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}