以webacula-7.0.0为例 建议安装在os6上
http://webacula.sourceforge.net/#downloads
1、Bacula 3.0 或以上版本
2、系统安装有 Mysql,PostgreSQL 或 SQlite 数据库
3、Zend Framework 1.8.3 或更高版本
PHP 5.2.4 或更高版本,并安装 php-gd、php-pdo、php-dom、php-xml、php-mysql 及 php-pgsql 包
# yum install -y httpd php php-gd php-common php-pdo php-pgsql php-mysql php-mbstring php-bcmath php-xml
# cd webacula-7.0.0 # cd install/ # ./check_system_requirements.php
显示:sh: psql: 未找到命令
没有安装postgreSQL
# yum install -y https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-2.noarch.rpm# yum install -y postgresql94 postgresql94-server
# ./check_system_requirements.php Webacula check System Requirements...Current MySQL version = 5.5.56 OKCurrent PostgreSQL version = 9.4.14 OKCurrent Sqlite version = 3.7.17 OKCurrent PHP version = 5.4.16 OK php pdo installed. OK php gd installed. OK php xml installed. OK php dom installed. OK php pdo_mysql installed. OK php pdo_pgsql installed. OK php pdo_sqlite installed. OK php-dom, php-xml installed. OK
下载Zend Framework 1.12.17 Minimal
http://www.zend.com/en/company/community/framework/downloads#Linux
# tar -zxvf ZendFramework-1.12.17-minimal.tar.gz
将ZendFramework/library/Zend 目录拷贝到 webacula/library 目录下
# cp -R /root/ZendFramework-1.12.17-minimal/library/ /root/webacula-7.0.0/
然后将 webacula 目录拷贝到 apache的发布目录,并更名为webacula
# cp -R /root/webacula-7.0.0 /var/www/webacula
mysql> set password for root@localhost = password(‘dr123‘); # 密码需要跟配置里面的数据库密码一致(config.ini db.conf)
需要修改的内容如下
# cd /var/www/webacula/application/# vim config.ini db.adapter = PDO_MYSQL db.config.host = localhost db.config.username = root ;;your database password db.config.password = "dr123" ;; #这个密码是Mysql的root的密码。db.config.dbname = bacula bacula.sudo = "/usr/bin/sudo" #建议使用sudobacula.bconsole = "/opt/bacula/sbin/bconsole" ;;
# groupadd bacula# usermod -aG bacula apache# chown root:bacula /opt/bacula/sbin/bconsole# chown root:bacula /opt/bacula/etc/bconsole.conf# chmod u=rwx,g=rx,o= /opt/bacula/sbin/bconsole# chmod u=rwx,g=rx,o= /opt/bacula/etc/bconsole.conf# visudo #编辑sudo权限 添加apache权限# Defaults requirettyapache ALL=NOPASSWD: /opt/bacula/sbin/bconsole
# cp /root/webacula-7.0.0/install/apache/webacula.conf /etc/httpd/conf.d/ # vim /etc/httpd/conf.d/webacula.conf LoadModule rewrite_module modules/mod_rewrite.so SetEnv APPLICATION_ENV productionAlias /webacula /var/www/webacula/html #需要更改成webacula所在的地址 <Directory /var/www/webacula/html> RewriteEngine On RewriteBase /webacula RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] php_flag magic_quotes_gpc off php_flag register_globals off Options Indexes FollowSymLinks AllowOverride All Order deny,allow Deny from all Allow from 127.0.0.1 Allow from 10.0.0.0/255.255.255.0 #允许登陆webacula的IP网段 Allow from ::1 # # change the settings below # # Allow from <your network> </Directory> <Directory /var/www/webacula/docs> Order deny,allow Deny from all </Directory> <Directory /var/www/webacula/application> Order deny,allow Deny from all </Directory> <Directory /var/www/webacula/languages> Order deny,allow Deny from all </Directory> <Directory /var/www/webacula/library> Order deny,allow Deny from all </Directory> <Directory /var/www/webacula/install> Order deny,allow Deny from all </Directory> <Directory /var/www/webacula/tests> Order deny,allow Deny from all </Directory> <Directory /var/www/webacula/data> Order deny,allow Deny from all </Directory> <Directory /var/www/webacula/html/test_mod_rewrite> RewriteEngine On # for test mod_rewrite RewriteBase /webacula/test_mod_rewrite RewriteRule ^testlink([^/]*).html$ index.php?testlink=$1 [L] php_flag magic_quotes_gpc off php_flag register_globals off Options Indexes FollowSymLinks AllowOverride All Order deny,allow Deny from all Allow from 127.0.0.1 Allow from 10.0.0.0/255.255.255.0 #允许登陆webacula测试地址的IP网段 Allow from ::1 # # change the settings below # # Allow from <your network> </Directory>
vim /etc/php.ini memory_limit = 32M max_execution_time = 3600
# vim /opt/bacula/etc/bacula-dir.confMessages { Name = Standard ... catalog = all, !skipped, !saved }
# cd /var/www/webacula/install/# vim db.conf# See also application/config.ini # bacula settings db_name="bacula" # for Sqlite only db_name_sqlite="/usr/local/bacula/bin/working/bacula.db" db_user="root" #数据库root登陆名 # !!! CHANGE_THIS !!! db_pwd="dr123" #Mysql的root密码 # Webacula web interface settings # # Built-in superuser login is ‘root‘ # # !!! CHANGE_THIS !!!# Use# ./password-to-hash.php <password># and insert the resulting hash below #这个密码要先运行./password-to-hash.php <password> ,如 ./password-to-hash.php dr123,将结果写到这里。 webacula_root_pwd="$P$BWMY1REK18VlkYh7jWqtSfj0uOrB561" #复制生成的密码
chmod 777 /var/www/webacula/data/cachevim /var/www/webacula/html/index.php # 修改/var/www/webacula/html/index.php 中的 define(‘BACULA_VERSION‘, 14); 将14改为15
# cd /var/www/webacula/install/MySql/#./10_make_tables.sh#./20_acl_make_tables.sh
# service mysqld restart# service httpd start# chkconfig httpd on
使用(root:dr123)登录Webacula
http://localhost/webacula/
本文出自 “Ogre之路” 博客,请务必保留此出处http://ogrecn.blog.51cto.com/12502697/1974569
原文地址:http://ogrecn.blog.51cto.com/12502697/1974569