Systemd(systemctl) ファイルを CentO から Ubuntu に変換

Systemd(systemctl) ファイルを CentO から Ubuntu に変換

Ubuntu 16.04にairflowをインストールしました。次のファイルがあります。

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[Unit]
Description=Airflow celery flower
After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service
Wants=postgresql.service mysql.service redis.service rabbitmq-server.service

[Service]
EnvironmentFile=/etc/sysconfig/airflow
User=airflow
Group=airflow
Type=simple
ExecStart=/bin/airflow flower
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

私は文書の下に次の説明を読んだ。

このファイルはCentOS用に構成されていることに注意してください。 Debianにインストールする場合は、EnvironmentFile変数を置き換えてExecStartでBashへのパスを変更します。

私はLinuxシステムの経験がありません。

上記のファイルを使用しましたが、動作しません。何をすべきか教えてくれる人はいますか?

Airflowは「~/airflow」にあります。

ベストアンサー1

最初に気づいたのは、ファイルパスが間違っていたことでした。

あなたの設定ファイルにはその内容がありますが、あなたExecStart=/bin/airflow flowerの意見では、次のように言いました。

空気の流れが位置しています。~/airflow

~//home/$user現在ログインしているユーザーのディレクトリです。

おすすめ記事