コンテンツにスキップ

「Bareos」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
Kgx (トーク | 投稿記録)
Kgx (トーク | 投稿記録)
29行目: 29行目:
* {{AUR|bareos-webui}}
* {{AUR|bareos-webui}}


== Configuration ==
== 設定 ==


=== Pre-Configuration ===
=== 設定の準備 ===

Minimal configuration for [[Apache HTTP Server]] and [[PHP]]:
[[Apache HTTP Server]] および [[PHP]] の最小構成:
* [https://wiki.archlinux.org/title/Apache_HTTP_Server#Using_libphp Usinglibphp] で説明されている手順に従います
* Follow the steps described in [[Apache HTTP Server#Using libphp]]
* You will also need to enable the {{ic|rewrite}} module, to do this, modify {{ic|/etc/httpd/conf/httpd.conf}} and uncomment:
* {{ic|rewrite}} モジュールも有効にする必要があります。これを行うには、{{ic|/etc/httpd/conf/httpd.conf}} を変更して、コメントを解除します:
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule rewrite_module modules/mod_rewrite.so


PHP7 を使用するには、次の修正も行う必要があります。:
To use PHP7, you also need to make the following fixes:
# PHP7
# PHP7
#LoadModule mpm_event_module modules/mod_mpm_event.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
49行目: 49行目:
Include conf/extra/bareos-webui.conf
Include conf/extra/bareos-webui.conf


*次に、[[PHP#PostgreSQL]] にリストされているように、PHP で {{ic|postgresql}} 拡張機能を有効にします。
* Then enable the {{ic|postgresql}} extension in PHP as listed in [[PHP#PostgreSQL]]
* And enable the {{ic|gettext}} extension in PHP
*そしてPHPで {{ic|gettext}} 拡張機能を有効にします


Fixes in /etc/php7/php.ini:
/etc/php7/php.ini の修正:
open_basedir = /usr/share/bareos-webui/:/etc/bareos-webui/
open_basedir = /usr/share/bareos-webui/:/etc/bareos-webui/
extension=gettext
extension=gettext
extension=pgsql
extension=pgsql


Minimal configuration for [[PostgreSQL]]
[[PostgreSQL]] の最小構成
* Initialize the database by following [[PostgreSQL#Initial configuration]]
* [[PostgreSQL#Initial configuration]] に従って、データベースを初期化します。


Make sure both {{ic|httpd.service}} and {{ic|postgresql.service}} are [[enable]]d and [[start]]ed
{{ic|httpd.service}} {{ic|postgresql.service}} の両方が [[有効化]] および [[起動]] してることを確認してください


=== Initial setup ===
=== 初期設定 ===


These steps mostly follow the [https://docs.bareos.org/IntroductionAndTutorial/InstallingBareos.html Instructions] from docs.bareos.org, and include some Arch-specifics.
これらの手順は、主に docs.bareos.org [https://docs.bareos.org/IntroductionAndTutorial/InstallingBareos.html Instructions] に従い、いくつかの Arch 固有のものが含まれています。


* Bareos データベースをセットアップする
* Setup the Bareos database


$ /usr/lib/bareos/scripts/create_bareos_database
$ /usr/lib/bareos/scripts/create_bareos_database
72行目: 73行目:
$ /usr/lib/bareos/scripts/grant_bareos_privileges
$ /usr/lib/bareos/scripts/grant_bareos_privileges


* Copy default configuration files to the {{ic|/etc/bareos/}} directory
* デフォルトの設定ファイルを {{ic|/etc/bareos/}} ディレクトリにコピーします


# cp -r /usr/share/bareos/config/* /etc/bareos/
# cp -r /usr/share/bareos/config/* /etc/bareos/
# chown -R bareos:bareos /etc/bareos
# chown -R bareos:bareos /etc/bareos


* カタログ構成ファイルに正しい DB ドライバーを設定します
* Set the correct DB driver in the catalog configuration file


{{hc|/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf|2=dbdriver = "postgresql"}}
{{hc|/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf|2=dbdriver = "postgresql"}}


* Now [[enable/start]] {{ic|bareos-dir.service}}, {{ic|bareos-sd.service}} and {{ic|bareos-fd.service}}
* これらを [[有効化]]/[[起動]] します {{ic|bareos-dir.service}}, {{ic|bareos-sd.service}} {{ic|bareos-fd.service}}


=== Configure Web-UI ===
=== Web-UI の設定 ===


==== Add a user for the webui ====
==== webui のユーザーを追加します ====


* *インタラクティブ管理シェルを開始するには、次を実行します:
* to start the interactive management shell, run:


$ bconsole
$ bconsole


* シェル内で、プロンプトとして {{ic|*}} が表示され、次のコマンドを入力できます({{ic|''secret''}} を実際のパスワードに置き換えます。)
* inside the shell, you get a {{ic|*}} as prompt, where you can enter the following commands (replace {{ic|''secret''}} with an actual password):


*reload
*reload
97行目: 98行目:
*quit
*quit


==== Setup Apache ====
==== Apache をセットアップする ====


* パスを2行修正する必要があります。:
* we need to fix a path in two lines:
{{hc|/etc/httpd/conf.d/extra/bareos-webui.conf|
{{hc|/etc/httpd/conf.d/extra/bareos-webui.conf|
Alias /bareos-webui /usr/share/'''webapps/'''bareos-webui/'''public'''
Alias /bareos-webui /usr/share/'''webapps/'''bareos-webui/'''public'''
106行目: 107行目:
}}
}}


* in the file {{ic|/etc/httpd/conf/httpd.conf}} add the line:
* {{ic|/etc/httpd/conf/httpd.conf}} ファイルに次の行を追加します:


Include conf.d/extra/bareos-webui.conf
Include conf.d/extra/bareos-webui.conf


* [[restart]] Apache {{ic|httpd.service}}
* Apache {{ic|httpd.service}} を [[再起動]] します。


Now you can now login to Bareos Webui at {{ic|<nowiki>http://localhost/bareos-webui/</nowiki>}} and login using the account you just created with {{ic|bconsole}}.
これで、{{ic|nowikihttp://localhost/bareos-webui//nowiki}} BareosWebui にログインし、{{ic|bconsole}} で作成したアカウントを使用してログインできます。

2022年5月26日 (木) 20:20時点における版

Bareos (Backup Archiving Recovery Open Sourced) は、元々 Bacula プロジェクトからフォークされたバックアップソフトウェアです。これはネットワークベースのマルチクライアントであり、スケーラビリティを重視したアーキテクチャを備えた非常に柔軟性があります。したがって、学習曲線はやや急勾配と見なされる可能性があります。このプロジェクトは、ドイツに拠点を置く商業会社 Bareos GmbH&Co.KG によって支援されています。

オープンソースプロジェクトサイトは https://www.bareos.com/ にあり、ソースコードは Github https://github.com/bareos/ でホストされています。

インストール

インストールするためのパッケージは AUR のパッケージ群 がありますが、動作させるためには若干の手作業が必要です。MariaDB/MySQL はバージョン 19.0 で非推奨となったため、Bareos は PostgreSQL と共に使用することが推奨されています。

インストール 最初の要件:

Arch User Repository からパッケージをインストール:

設定

設定の準備

Apache HTTP Server および PHP の最小構成:

  • Usinglibphp で説明されている手順に従います
  • rewrite モジュールも有効にする必要があります。これを行うには、/etc/httpd/conf/httpd.conf を変更して、コメントを解除します:
LoadModule rewrite_module modules/mod_rewrite.so

PHP7 を使用するには、次の修正も行う必要があります。:

# PHP7
#LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

LoadModule php7_module modules/libphp7.so
Include conf/extra/php7_module.conf

# bareos-webui
Include conf/extra/bareos-webui.conf
  • 次に、PHP#PostgreSQL にリストされているように、PHP で postgresql 拡張機能を有効にします。
  • そしてPHPで gettext 拡張機能を有効にします

/etc/php7/php.ini の修正:

open_basedir = /usr/share/bareos-webui/:/etc/bareos-webui/ 
extension=gettext
extension=pgsql


PostgreSQL の最小構成

httpd.servicepostgresql.service の両方が 有効化 および 起動 してることを確認してください

初期設定

これらの手順は、主に docs.bareos.org の Instructions に従い、いくつかの Arch 固有のものが含まれています。

  • Bareos データベースをセットアップする
$ /usr/lib/bareos/scripts/create_bareos_database 
$ /usr/lib/bareos/scripts/make_bareos_tables
$ /usr/lib/bareos/scripts/grant_bareos_privileges
  • デフォルトの設定ファイルを /etc/bareos/ ディレクトリにコピーします
# cp -r /usr/share/bareos/config/* /etc/bareos/
# chown -R bareos:bareos /etc/bareos
  • カタログ構成ファイルに正しい DB ドライバーを設定します
/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
dbdriver = "postgresql"
  • これらを 有効化/起動 します bareos-dir.service, bareos-sd.service bareos-fd.service

Web-UI の設定

webui のユーザーを追加します

  • *インタラクティブ管理シェルを開始するには、次を実行します:
$ bconsole
  • シェル内で、プロンプトとして * が表示され、次のコマンドを入力できます(secret を実際のパスワードに置き換えます。)
*reload
*configure add console name=admin password=secret profile=webui-admin tlsenable=false
*quit

Apache をセットアップする

  • パスを2行修正する必要があります。:
/etc/httpd/conf.d/extra/bareos-webui.conf
Alias /bareos-webui  /usr/share/webapps/bareos-webui/public
# ...
<Directory /usr/share/webapps/bareos-webui/public>
  • /etc/httpd/conf/httpd.conf ファイルに次の行を追加します:
Include conf.d/extra/bareos-webui.conf
  • Apache httpd.service再起動 します。

これで、nowikihttp://localhost/bareos-webui//nowiki で BareosWebui にログインし、bconsole で作成したアカウントを使用してログインできます。