{"id":229,"date":"2011-04-21T13:40:07","date_gmt":"2011-04-21T05:40:07","guid":{"rendered":"http:\/\/www.lonelyword.com\/?p=229"},"modified":"2011-04-25T22:57:09","modified_gmt":"2011-04-25T14:57:09","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a4%87%e4%bb%bd%e5%b7%a5%e5%85%b7%e2%80%93bacula%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%ae%ef%bc%88%e5%9b%9b%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.lonelyword.com\/?p=229","title":{"rendered":"\u670d\u52a1\u5668\u5907\u4efd\u5de5\u5177\u2013Bacula\u5b89\u88c5\u4e0e\u914d\u7f6e\uff08\u56db\uff09"},"content":{"rendered":"<p>\u5982\u679c\u8981\u770bbacula\u5907\u4efd\u72b6\u6001\u7684\u8bdd\uff0c\u6bcf\u6b21\u8fdblinux\u7136\u540e\u8fd0\u884cbconsole\u67e5\u770bstatus\u6bd4\u8f83\u9ebb\u70e6\uff0c\u53ef\u4ee5\u8003\u8651\u7528Bacula-web\u8fd9\u4e2a\u63d2\u4ef6\uff0c\u53ef\u4ee5\u901a\u8fc7web\u67e5\u770bbacula\u8fd0\u884c\u72b6\u51b5\uff0c\u5341\u5206\u65b9\u4fbf\uff0c\u8fd9\u4e2a\u9700\u8981\u4ee5\u4e0b\u7a0b\u5e8f\u652f\u6301\uff0c\u5b89\u88c5\u5373\u53ef<\/p>\n<p>yum install php-pear php-gd php-mysql<\/p>\n<p><a href=\"http:\/\/sourceforge.net\/projects\/bacula\/files\/bacula\/5.0.3\/bacula-gui-5.0.3.tar.gz\/download\" >\u5b98\u7f51\u4e0b\u8f7d<\/a>\uff0c\u4e5f\u53ef\u4ee5\u4ece<a href=\"http:\/\/www.lonelyword.com\/wp-content\/uploads\/B\/bacula-gui-5.0.3.tar.gz\" >\u6211\u7684\u7f51\u7ad9\u4e0b\u8f7d<\/a><\/p>\n<p>\u4e0b\u8f7d\u540e\u89e3\u538b\uff0c\u7136\u540e\u628a\u6587\u4ef6\u90fd\u62f7\u8d1d\u5230\/var\/www\/\u76ee\u5f55\u4e0b\uff0c\u8fd0\u884ccp -R .\/bacula-web \/var\/www\/<\/p>\n<p>\u4fee\u6539\/var\/www\/bacula-web\/configs\/\u4e0b\u7684bacula.conf\u6587\u4ef6\uff0c\u4f7f\u8fd9\u4e2aweb\u5e94\u7528\u53ef\u4ee5\u8bfb\u53d6bacula\u7684\u6570\u636e\u5e93\uff0c\u5728[.DATABASE]\u4e0b\u9762\u4fee\u6539\u4ee5\u4e0b\u8fd9\u4e9b\u5730\u65b9\u5c31\u884c\u4e86\uff0c<br \/>\n# Your database host or IP<br \/>\nhost = localhost<br \/>\n# Your database login<br \/>\nlogin = root<br \/>\n# Your database password.<br \/>\n# For empty passwords use this:<br \/>\n# pass =<br \/>\npass = 123<br \/>\n# Your database name<br \/>\ndb_name = bacula<br \/>\n# Your database type: mysql,sqlite,pgsql<br \/>\ndb_type = mysql<\/p>\n<p>\u4fee\u6539\/etc\/httpd\/conf\/httpd.conf\u6587\u4ef6\uff0c\u52a0\u5165<\/p>\n<p>Alias \/bacula-web\/ &#8220;\/var\/www\/bacula-web\/&#8221;<br \/>\n&lt;Directory &#8220;\/var\/www\/bacula-web&#8221;&gt;<br \/>\nOptions Indexes MultiViews<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n&lt;\/Directory&gt;<\/p>\n<p>\u6539\u5b8c\u540e\u9700\u8981\u91cd\u65b0\u542f\u52a8httpd\u670d\u52a1\u8ba9\u6539\u52a8\u751f\u6548\uff0cservice httpd restart<\/p>\n<p>\u8fd9\u662f\u53ef\u4ee5\u53bb\u6d4f\u89c8\u5668\uff0c\u8f93\u5165http:\/\/bacula\u670d\u52a1\u5668ip\/bacula-web\/test.php\u770b\u770b\u68c0\u6d4b\u7684\u4e09\u9879\uff08gettext\uff0cPear\uff08DB)\uff0cGD\uff09\u662f\u4e0d\u662f\u90fdOK\uff0c\u5982\u679c\u524d\u9762\u90fd\u6ca1\u95ee\u9898\u7684\u8bdd\uff0c\u8fd9\u8fb9\u5e94\u8be5\u662f\u4e09\u4e2aOK\uff0c\u7136\u540e\u53ef\u4ee5\u53bb\u770bindex.php\u4e86\uff0c\u5982\u679c\u663e\u793a\u7684\u662f\u7a7a\u767d\u9875\u9762\uff0c\u53ef\u80fd\u8981\u770b\u4e00\u4e0blog\u6587\u4ef6\u662f\u4e0d\u662fSELinux\u963b\u6b62\u6587\u4ef6\u8bbf\u95ee\uff0c\u9519\u8bef\u65e5\u5fd7\u5dee\u4e0d\u591a\u662f\u8fd9\u6837\u7684SELinux is preventing the httpd from using potentially mislabeled files<\/p>\n<p>\u4fee\u6539\/etc\/selinux\/config\u6587\u4ef6\u4e2d\u7684SELINUX=enforcing\u4e3aSELINUX=disabled\uff0c\u9700\u8981\u91cd\u542f\u673a\u5668\u751f\u6548<br \/>\n# This file controls the state of SELinux on the system.<br \/>\n# SELINUX= can take one of these three values:<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enforcing &#8211; SELinux security policy is enforced.<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 permissive &#8211; SELinux prints warnings instead of enforcing.<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 disabled &#8211; SELinux is fully disabled.<br \/>\nSELINUX=disabled<\/p>\n<p>\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7web\u754c\u9762\u67e5\u770bbacula\u5907\u4efd\u7684\u7ed3\u679c\u4e86<\/p>\n<p>\u5982\u679c\u8fd8\u662f\u7a7a\u767d\u9875\u9762\u7684\u8bdd\uff0c\u53bb\/var\/log\/httpd\/error_log\u770b\u770b\u662f\u4e0d\u662f\u56e0\u4e3a\u6743\u9650\u7684\u95ee\u9898\uff0c\u5982\u679c\u770b\u5230\u7c7b\u4f3c\u9519\u8bef\u7684\u8bdd<\/p>\n<p>[Mon Apr 25 22:39:59 2011] [error] [client 182.23.147.2] PHP Fatal error:\u00a0 Smarty error: unable to write to $compile_dir &#8216;\/var\/www\/bacula-web\/templates_c&#8217;. B<br \/>\ne sure $compile_dir is writable by the web server user. in \/var\/www\/bacula-web\/external_packages\/smarty\/Smarty.class.php on line 1088<\/p>\n<p>\u7528chown -R apache:apache \/var\/www\/bacula-web\/ \u547d\u4ee4\u5373\u53ef<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u8981\u770bbacula\u5907\u4efd\u72b6\u6001\u7684\u8bdd\uff0c\u6bcf\u6b21\u8fdblinux\u7136\u540e\u8fd0\u884cbconsole\u67e5\u770bstatus\u6bd4\u8f83\u9ebb\u70e6\uff0c\u53ef\u4ee5\u8003\u8651\u7528Bacula-web\u8fd9\u4e2a\u63d2\u4ef6\uff0c\u53ef\u4ee5\u901a\u8fc7web\u67e5\u770bb&#8230;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/www.lonelyword.com\/?p=229\" > Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[202],"tags":[226,219],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=\/wp\/v2\/posts\/229"}],"collection":[{"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=229"}],"version-history":[{"count":0,"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=\/wp\/v2\/posts\/229\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.lonelyword.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}