「Funkwhale」の版間の差分
(→Initialization: 翻訳) |
(→Version upgrade: 翻訳) |
||
| 185行目: | 185行目: | ||
}} |
}} |
||
| + | == バージョンアップ == |
||
| − | == Version upgrade == |
||
| + | === 自動 === |
||
| − | {{note|Starting with version 0.21, an alias is provided for {{ic|/usr/share/webapps/funkwhale/api/manage.py}} in {{ic|/usr/bin/funkwhale_manage}}, so you can use: |
||
| + | AUR から {{AUR|funkwhale-venv}} をインストールした場合は、特別なことは何もありません。エラーが発生した場合は、{{ic|/usr/bin/funkwhale_manage}} スクリプトを使用して、{{ic|/usr/share/webapps/funkwhale/api/manage.py}} コマンドを実行します sudo を使用して (実行する必要があります)) |
||
| − | [funkwhale]$ funkwhale_manage [commands...] |
||
| − | |||
| − | instead of |
||
| − | |||
| − | [funkwhale]$ python /usr/share/webapps/funkwhale/api/manage.py [commands...] |
||
| + | {{Warning| |
||
| + | * サービスを再起動する前に、Apache または nginx の設定ファイルが変更されていないことを確認してください。互換性のない変更については、公式ドキュメントを参照してください。 |
||
}} |
}} |
||
| + | === マニュアル === |
||
| − | All commands should be entered as {{ic|funkwhale}} [[#Funkwhale user|user]]. |
||
| − | [[Stop]] the {{ic|funkwhale.service}} before upgrading. |
||
| + | {{note|バージョン 1.3.0 より前では、AUR パッケージはアップストリームと同様に {{ic|funkwhale.target}} を使用した後、{{ic|funkwhale.service}} を使用していました。}} |
||
| − | The static files have to be collected again: |
||
| + | AUR から {{AUR|funkwhale}} をインストールした場合は、次の手順に従ってください。 |
||
| − | [funkwhale]$ funkwhale_manage collectstatic --no-input |
||
| + | アップグレードする前に、{{ic|funkwhale.target}} を [[停止]] してください。 |
||
| − | Apply database migrations: |
||
| + | すべてのコマンドは、{{ic|funkwhale}} [[Funkwhale# Funkwhale ユーザー|ユーザー]] として入力する必要があります。 |
||
| − | [funkwhale]$ funkwhale_manage migrate |
||
| + | 静的ファイルを再度収集する必要があります: |
||
| − | To upgrade to version 1.0, the thumbnails quality has been increased from 70 to 95, so all the thumbnails should be regenerated (or set THUMBNAIL_JPEG_RESIZE_QUALITY=70 in the .env file so nothing changes). |
||
| − | First delete the {{ic|__sized__ directory}} in your {{ic|MEDIA_ROOT}} directory, then regenerate the thumbnails, |
||
| + | [funkwhale]$ funkwhale_manage collectstatic --no-input |
||
| − | [funkwhale]$ rm -rf /srv/funkwhale/data/media/__sized__ |
||
| − | [funkwhale]$ funkwhale_manage fw media generate-thumbnails |
||
| + | データベース移行を適用します: |
||
| − | Starting from version 0.20.1, there is a new {{ic|MUSIC_USE_DENORMALIZATION}} parameter in the {{ic|env}} file set to {{ic|True}} (you can set it to {{ic|False}} so nothing changes). It is a performance enhancement and to make it work you need to run the following command, |
||
| + | [funkwhale]$ funkwhale_manage migrate |
||
| − | [funkwhale]$ python /usr/share/webapps/funkwhale/api/manage.py rebuild_music_permissions |
||
| − | |||
| − | {{warning|Check that the apache or nginx configuration file did not change before restarting the service. Consult the official documentation for incompatible changes.}} |
||
| − | |||
| − | {{warning|From version 0.20, {{AUR|python-daphne}} was replaced by {{Pkg|uvicorn}}/{{Pkg|gunicorn}}. The service file was updated not to use {{AUR|python-daphne}} anymore. This can be changed by editing the {{ic|funkwhale-server.service}} file. |
||
| − | Also, the {{ic|citext}} extension for postgresql is now needed. It can be loaded with issueing the following command before calling the {{ic|migrate}} command: |
||
| − | |||
| − | {{bc|$ sudo -u postgres psql funkwhale -c 'CREATE EXTENSION "citext";'}} |
||
| + | {{Warning| |
||
| + | * サービスを再起動する前に、Apache または nginx の設定ファイルが変更されていないことを確認してください。互換性のない変更については、公式ドキュメントを参照してください。 |
||
}} |
}} |
||
| + | これらの手順をすべて完了すると、{{ic|funkwhale.target}} は再び [[ヘルプ:読み方#systemd ユニットのコントロール|起動状態]] になります。 |
||
| − | After completing all these steps, the {{ic|funkwhale.service}} can be [[started]] again. |
||
| − | {{Note| |
+ | {{Note|アップグレードの手順はすべて、公式ドキュメント [https://docs.funkwhale.audio/upgrading/index.html] に記載されています。}} |
== Usage == |
== Usage == |
||
2024年1月17日 (水) 04:58時点における版
メインドキュメントページ: から引用
- Funkwhale is a self-hosted, modern, free and open-source music server, heavily inspired by Grooveshark.
インスタンスは ActivityPub プロトコルで連携できます。
目次
インストール
Funkwhale にはリバースプロキシ ([1]) が必要です。 したがって、nginx または Apache HTTP Server をインストールする必要があります。
また、設定された PostgreSQL データベースと Redis キャッシュサーバーも必要です。 詳細については、Funkwhale#設定 およびそれぞれのページを参照してください。
AUR からのインストール
funkwhaleAUR パッケージを インストール して下さい。
手動インストール
[2] にある Arch のインストール手順に従ってください。
これにより、すべてのコンポーネントが /srv/funkwhale にインストールされます。
Docker のインストール
[3] にある Docker のインストール手順に従ってください。
設定
以下のセクションでは、Funkwhale が AUR からインストールされたことを前提としています。 手動インストールの場合は、フォルダーを適切に変更する必要があります。
また、ローカルネットワーク上で Funkwhale を使用していることも前提としています。 外部からアクセスできるようにする方法については、公式 ドキュメント を参照してください。 特に Certbot を使用する証明書の場合。
ホスト設定
/etc/hosts ファイルが正しく設定されていることを確認してください。
Funkwhale サーバーは、127.0.0.1 でエイリアス funkwhale.local で実行されていますが、これは変更できます。
/etc/hosts ファイルは次のようになります。
#<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 localhost ::1 localhost 127.0.0.1 funkwhale.local
nginx の設定
Nginx 構成ファイルのアップストリーム テンプレートは、/etc/webapps/funkwhale/nginx.template で提供されます。
ただし、このファイルには、env ファイルの値で置き換える必要がある変数が含まれています
(このファイルの作成方法についてはセクション 初期化 を参照してください):
$ set -a && source /srv/funkwhale/config/env && set +a
$ envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \
< /etc/webapps/funkwhale/nginx.conf \
> /etc/nginx/sites-available/funkwhale.conf
証明書へのパスもそれに応じて変更する必要があります。
次に、サイトを有効にします:
$ ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/
そして、nginx.service を 起動 します。
Apache の設定
テンプレートの Apache 設定ファイルは、/etc/webapps/funkwhale/apache-funkwhale.conf で提供されます。Funkwhale インスタンスが https://funkwhale.local でアクセスできるように設定されます。
フォルダー名は、インストールに合わせて変更する必要があります。どの行を変更する必要があるかについての詳細は、[4] で説明されています。
テンプレートを Apache 設定フォルダーにコピーし、
$ cp /etc/webapps/funkwhale/apache-funkwhale.conf /etc/httpd/conf/extra/funkwhale.conf
次に、Apache HTTP Server 設定ファイルを編集し、以下を追加します。
# /etc/httpd/conf/httpd.conf
Include conf/extra/funkwhale.conf
変更を適用するには、systemd を使用して httpd.service (Apache) を再起動する必要があります。
PostgreSQL の設定
ここでは、公式ドキュメントに従います: [5]
postgres ユーザーを使用して PostgreSQL コマンドラインに接続し、funkwhale ユーザーとデータベースを作成します。
$ sudo -u postgres psql
CREATE DATABASE "funkwhale" WITH ENCODING 'utf8'; CREATE USER funkwhale; GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale; \c funkwhale; CREATE EXTENSION "unaccent"; CREATE EXTENSION "citext";
最後の 3 行は、unaccent および citext 拡張機能をロードします。
これらは funkwhale が動作するために必要です (citext バージョン 0.20 以降)
初期化
Funkwhale ユーザー
Funkwhale は、funkwhale ユーザーとして実行する必要があります。これは、AUR パッケージによって自動的に作成されます。
手動インストールに従った場合は、次のように作成します。
# useradd -r -d /srv/funkwhale -m funkwhale -c "Funkwhale music server -s /sbin/nologin"
Funkwhale のデータフォルダーを /srv/funkwhale に作成します。
funkwhale ユーザーが所有:
# mkdir /srv/funkwhale # chown funkwhale:funkwhale /srv/funkwhale
funkwhale ユーザーとして次のコマンドを実行します。
API ファイルとストレージ用のサブフォルダーを作成します:
[funkwhale]$ cd /srv/funkwhale [funkwhale]$ mkdir -p api data/static data/media data/music config
Funkwhale が動作するには、いくつかの環境変数が必要です。これらは環境ファイル /srv/funkwhale/config/env で定義されている必要があります。
/etc/webapps/funkwhale/env.template にテンプレートがあります。これをコピーして、インストールに合わせて変更します。
[funkwhale]$ cp /etc/webapps/funkwhale/env.template /srv/funkwhale/config/env
FUNKWHALE_HOSTNAME 変数は、/etc/hosts のホスト名に対応する必要があります。
DJANGO_ALLOWED_HOSTS も、funkwhale インスタンスに到達するアドレスと一致する必要があります。
一意の DJANGO_SECRET_KEY を生成し、インストールに応じてパスを変更する必要があります。
データベースのセットアップ
AUR から funkwhale-venvAUR をインストールした場合は、/usr/bin/funkwhale_manage を使用して /usr/share/webapps/funkwhale/api/manage.py を実行しますfunkwhale ユーザーとしてコマンドを実行します。
アプリケーションを起動する前にデータベースを初期化します:
[funkwhale]$ funkwhale_manage migrate
Funkwhale インスタンスのスーパーユーザーを作成します:
[funkwhale]$ funkwhale_manage createsuperuser
Web アプリの静的ファイルを収集します:
[funkwhale]$ funkwhale_manage collectstatic
バージョンアップ
自動
AUR から funkwhale-venvAUR をインストールした場合は、特別なことは何もありません。エラーが発生した場合は、/usr/bin/funkwhale_manage スクリプトを使用して、/usr/share/webapps/funkwhale/api/manage.py コマンドを実行します sudo を使用して (実行する必要があります))
マニュアル
AUR から funkwhaleAUR をインストールした場合は、次の手順に従ってください。
アップグレードする前に、funkwhale.target を 停止 してください。
すべてのコマンドは、funkwhale ユーザー として入力する必要があります。
静的ファイルを再度収集する必要があります:
[funkwhale]$ funkwhale_manage collectstatic --no-input
データベース移行を適用します:
[funkwhale]$ funkwhale_manage migrate
これらの手順をすべて完了すると、funkwhale.target は再び 起動状態 になります。
Usage
Upstream provides systemd services that are already installed with the AUR package.
To start the instance, just start funkwhale.service.
This starts three services, you can check their status with:
$ systemctl status funkwhale-\*
Troubleshooting
See https://docs.funkwhale.audio/admin/troubleshooting.html
Proxy logs
Apache logs for funkwhale:
$ tail -f /var/log/httpd/funkwhale/error.log