GNU/Linux >> Linux の 問題 >  >> Cent OS

CentOS8にTaigaProjectManagementをインストールする方法

Taigaは、スタートアップの単純なプロジェクトと複雑なプロジェクトの両方を管理するのに役立つオープンソースのプロジェクト管理システムです。これは、アジャイル開発者と設計者がプロジェクトの開発を管理するために特別に設計された、シンプルで強力なカスタマイズ可能なアプリケーションです。 TaigaのバックエンドはPythonとDjangoで記述されており、フロントエンドはCoffeeScriptとAngularJSフレームワークを使用してJavaScriptで記述されています。プロジェクトコラボレーション、かんばんボード、バグトラッキング、レポート、タイムトラッキング、バックログ、wikiなどのいくつかの機能を提供します。

このチュートリアルでは、CentOS8にTaigaプロジェクト管理システムをインストールする方法を紹介します。

前提条件
  • CentOS 8 VPS(SSD 2 VPSプランを使用します)
  • rootユーザーアカウントへのアクセス(またはroot権限を持つ管理者アカウントへのアクセス)

ステップ1:サーバーにログインしてサーバーOSパッケージを更新する

まず、rootユーザーとしてSSH経由でCentOS8サーバーにログインします。

ssh root@IP_Address -p Port_number

「IP_Address」と「Port_number」をサーバーのそれぞれのIPアドレスとSSHポート番号に置き換える必要があります。さらに、必要に応じて「root」を管理者アカウントのユーザー名に置き換えます。

開始する前に、サーバーにインストールされているすべてのCentOSパッケージが最新であることを確認する必要があります。これを行うには、次のコマンドを実行します。

dnf update -y

ステップ2:はじめに

まず、システムの完全修飾ホスト名を設定する必要があります。次のコマンドで設定できます:

hostnamectl set-hostname taiga.example.com

次に、次のコマンドを使用して、他の必要な依存関係をインストールします。

dnf install epel-release redis nginx git unzip curl pwgen @python38 python38-devel virtualenv -y

次に、次のコマンドを使用してvirtualenvwrapperをインストールします。

pip3 install virtualenvwrapper

次に、NginxおよびRedisサービスを開始し、システムの再起動時に開始できるようにします。

systemctl start nginx redis
systemctl enable nginx redis

ステップ3:Node.jsをインストールする

デフォルトでは、最新バージョンのNode.jsはCentOS 8では利用できません。そのため、システムでNode.jsリポジトリを有効にする必要があります。

次のコマンドで有効にできます:

dnf module enable nodejs:12

次に、次のコマンドを使用してNode.jsをインストールします。

dnf install nodejs -y

Node.jsをインストールした後、次のコマンドを使用して、インストールされているNode.jsのバージョンを確認します。

node --version

次の出力が得られるはずです:

v12.18.4

ステップ4:RabbitMQをインストールして構成する

次に、システムにRabbitMQサーバーをインストールする必要があります。デフォルトでは、CentOS8のデフォルトリポジトリでは使用できません。

まず、次のコマンドを使用してRabbitMQリポジトリを追加します。

curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | bash

次に、次のコマンドを使用してRabbitMQサーバーをインストールします。

dnf install rabbitmq-server -y

インストールしたら、RabbitMQサービスを開始し、システムの再起動時に開始できるようにします。

systemctl start rabbitmq-server.service
systemctl enable rabbitmq-server.service

次に、次のコマンドを使用して、Taiga iser、仮想ホストを追加し、権限を設定します。

rabbitmqctl add_user taiga password
rabbitmqctl add_vhost taiga
rabbitmqctl set_permissions -p taiga taiga ".*" ".*" ".*"

ステップ5:PostgreSQLのインストールと構成

次のコマンドを実行して、PostgreSQLサーバーをインストールできます。

dnf install @postgresql -y

インストールが完了したら、次のコマンドを使用してデータベースを初期化します。

/usr/bin/postgresql-setup initdb

次に、PostgreSQLサービスを開始し、次のコマンドを使用してシステムの再起動時に開始できるようにします。

systemctl start postgresql
systemctl enable postgresql

次に、次のコマンドを使用してPostgreSQLのパスワードを設定します。

passwd postgres

以下に示すように、新しいパスワードを設定するように求められます。

New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

次に、ユーザーをpostgresに切り替えて、taigaのユーザーを作成します。

su - postgres
createuser taiga 

次に、次のコマンドを使用してPostgreSQLシェルにログインします。

[postgres@taiga ~]$ psql

ログインすると、次の出力が表示されます。

psql (10.14)
Type "help" for help.

次に、taigaユーザーのパスワードを設定し、次のコマンドでデータベースを作成します。

postgres=# ALTER USER taiga WITH ENCRYPTED password 'password';
postgres=# CREATE DATABASE taiga OWNER taiga;

次に、次のコマンドを使用してPostgreSQLを終了します。

\q
exit

ステップ6:Taigaバックエンドをインストールして構成する

まず、Taigaを実行するためのユーザーを作成する必要があります。次のコマンドで作成できます:

adduser taiga
passwd taiga

次に、taigaユーザーをsudo権限のホイールグループに追加します。

usermod -aG wheel taiga

次に、次のコマンドを使用してユーザーをタイガに切り替えます。

su - taiga

次に、ログディレクトリを作成します:

mkdir -p ~/logs

次に、次のコマンドを使用して、最新バージョンのTaigaバックエンドをダウンロードします。

git clone https://github.com/taigaio/taiga-back.git

ダウンロードしたら、ディレクトリをtaiga-backに変更し、安定したバージョンをチェックアウトします。

cd taiga-back
git checkout stable

次に、次のコマンドを使用して必要な依存関係をインストールします。

sudo pip3 install -r requirements.txt

次に、次のコマンドを使用してデータベースを移行します。

python3 manage.py migrate --noinput
python3 manage.py loaddata initial_user
python3 manage.py loaddata initial_project_templates
python3 manage.py compilemessages
python3 manage.py collectstatic --noinput

次に、local.py構成ファイルを作成します:

nano ~/taiga-back/settings/local.py

次の行を追加します:

from .common import *

MEDIA_URL = "http://taiga.example.com/media/"
STATIC_URL = "http://taiga.example.com/static/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "taiga.example.com"

SECRET_KEY = "your-secret-key"

DEBUG = False
PUBLIC_REGISTER_ENABLED = True

DEFAULT_FROM_EMAIL = "[email protected]"
SERVER_EMAIL = DEFAULT_FROM_EMAIL

#CELERY_ENABLED = True

EVENTS_PUSH_BACKEND = "taiga.events.backends.rabbitmq.EventsPushBackend"
EVENTS_PUSH_BACKEND_OPTIONS = {"url": "amqp://taiga:password@localhost:5672/taiga"}

ファイルを保存して閉じ、サーバーを起動してインストールを確認します。

python3 manage.py runserver

すべてが正常であれば、次の出力が得られるはずです:

Trying import local.py settings…

Trying import local.py settings…

Performing system checks…
System check identified no issues (0 silenced).

November 15, 2020 - 08:50:41

Django version 2.2.17, using settings 'settings'

Starting development server at http://127.0.0.1:8000/

Quit the server with CONTROL-C.


Press CTRL+C to stop the server.

ステップ7:Taigaフロントエンドを構成する

まず、ユーザーをtaigaに切り替え、次のコマンドを使用して最新バージョンのtaigaフロントエンドをダウンロードします。

su - taiga
git clone https://github.com/taigaio/taiga-front-dist.git

ダウンロードしたら、ディレクトリをtaigaフロントエンドに変更し、安定したバージョンをチェックアウトします。

cd taiga-front-dist
git checkout stable

次に、次のコマンドを使用してサンプル構成ファイルをコピーします。

cp ~/taiga-front-dist/dist/conf.example.json ~/taiga-front-dist/dist/conf.json

次に、構成ファイルを編集します:

nano ~/taiga-front-dist/dist/conf.json

以下に示すように、APIとeventsUrlを定義します。

{
    "api": "http://taiga.example.com/api/v1/",
    "eventsUrl": "ws://taiga.example.com/events",
    "eventsMaxMissedHeartbeats": 5,
    "eventsHeartbeatIntervalTime": 60000,
    "eventsReconnectTryInterval": 10000,
    "debug": true,
    "debugInfo": false,
    "defaultLanguage": "en",
    "themes": ["taiga"],
    "defaultTheme": "taiga",
    "defaultLoginEnabled": true,
    "publicRegisterEnabled": true,
    "feedbackEnabled": true,
    "supportUrl": "https://tree.taiga.io/support/",
    "privacyPolicyUrl": null,
    "termsOfServiceUrl": null,
    "GDPRUrl": null,
    "maxUploadFileSize": null,
    "contribPlugins": [],
    "tagManager": { "accountId": null },
    "tribeHost": null,
    "importers": [],
    "gravatar": false,
    "rtlLanguages": ["fa"]
}

終了したら、ファイルを保存して閉じます。

ステップ8:Taigaイベントを構成する

まず、ユーザーをtaigaに切り替えて、最新バージョンのtaigaイベントをダウンロードします。

su - taiga
git clone https://github.com/taigaio/taiga-events.git taiga-events

ダウンロードしたら、ディレクトリをtaiga eventsに変更し、次のコマンドを使用して必要なすべての依存関係をインストールします。

cd taiga-events
npm install

次に、サンプル構成ファイルをコピーします。

cp config.example.json config.json

次に、構成ファイルを編集し、RabbitMQURLと秘密鍵を定義します。

nano config.json

次の行を追加します:

{
    "url": "amqp://taiga:password@localhost:5672/taiga",
    "secret": "your-secret-key",
    "webSocketServer": {
        "port": 8888
    }
}

ファイルを保存して閉じ、次のコマンドでtaigaユーザーを終了します。

exit

ステップ9:Taiga用のSystemdサービスファイルを作成する

次に、Taigaサービスを管理するためのsystemdサービスファイルを作成する必要があります。

まず、次のコマンドを使用して、taigaイベントのsystemdサービスファイルを作成します。

nano /etc/systemd/system/taiga_events.service

次の行を追加します:

[Unit]
Description=taiga_events
After=network.target

[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-events
ExecStart=/bin/bash -c "node_modules/coffeescript/bin/coffee index.coffee"
Restart=always
RestartSec=3

[Install]
WantedBy=default.target

ファイルを保存して閉じてから、次のコマンドを使用してsystemdデーモンをリロードします。

systemctl daemon-reload

次に、taiga_eventsサービスを開始し、システムの再起動時に開始できるようにします。

systemctl start taiga_events
systemctl enable taiga_events

次に、次のコマンドを使用して、taigaのsystemdサービスファイルを作成します。

nano /etc/systemd/system/taiga.service

次の行を追加します:

[Unit]
Description=taiga_back
After=network.target

[Service]
User=taiga
Environment=PYTHONUNBUFFERED=true
WorkingDirectory=/home/taiga/taiga-back
ExecStart=/usr/local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
Restart=always
RestartSec=3

[Install]
WantedBy=default.target

ファイルを保存して閉じてから、次のコマンドを使用してsystemdデーモンをリロードします。

systemctl daemon-reload

次に、Taigaサービスを開始し、次のコマンドを使用してシステムの再起動時に開始できるようにします。

systemctl start taiga
systemctl enable taiga

ステップ10:Taiga用にNginxを構成する

次に、Taigaにサービスを提供するようにNginxを構成する必要があります。まず、次のコマンドを使用してNginx仮想ホスト構成ファイルを作成します。

nano /etc/nginx/conf.d/taiga.conf

次の行を追加します:

server {
    listen 80;
    server_name taiga.example.com

    large_client_header_buffers 4 32k;
    client_max_body_size 50M;
    charset utf-8;

    access_log /home/taiga/logs/nginx.access.log;
    error_log /home/taiga/logs/nginx.error.log;

    # Frontend
    location / {
        root /home/taiga/taiga-front-dist/dist/;
        try_files $uri $uri/ /index.html;
    }

    # Backend
    location /api {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001/api;
        proxy_redirect off;
    }

    # Admin access (/admin/)
    location /admin {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001$request_uri;
        proxy_redirect off;
    }

    # Static files
    location /static {
        alias /home/taiga/taiga-back/static;
    }

    # Media files
    location /media {
        alias /home/taiga/taiga-back/media;
    }

    # Events
    location /events {
        proxy_pass http://127.0.0.1:8888/events;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout 7d;
        proxy_send_timeout 7d;
        proxy_read_timeout 7d;
    }
}

ファイルを保存して閉じてから、Nginxサービスを再起動して変更を適用します。

systemctl restart nginx

次に、次のコマンドを使用して、Taigaに必要な権限を付与します。

chown -R taiga:taiga /home/taiga/
chmod o+x /home/taiga/
chmod o+rx ~taiga/taiga-back/media

ステップ11:TaigaWebInetrfaceにアクセスする

次に、Webブラウザーを開き、URLhttp://taiga.example.comを使用してTaigaWebインターフェースにアクセスします。 Taigaログインページにリダイレクトされます:

デフォルトのユーザー名をadmin、パスワードを123123として指定し、ログインをクリックします。 ボタン。次の画面にTaigaのデフォルトのダッシュボードが表示されます。

もちろん、Linux VPSホスティングサービスの1つを使用している場合は、これを行う必要はありません。

その場合は、専門のLinux管理者にセットアップを依頼するだけです。 24時間年中無休でご利用いただけます。リクエストはすぐに処理されます。

PS。この投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。


Cent OS
  1. CentOS7にApacheCassandraをインストールする方法

  2. CentOS8にRedisサーバーをインストールする方法

  3. CentOS7にXWikiをインストールする方法

  1. CentOS8にMongoDBをインストールする方法

  2. CentOS7にMyCollabプロジェクト管理ソフトウェアをインストールする方法

  3. CentOS7に求人広告をインストールする方法

  1. CentOS7にTaiga.ioプロジェクト管理ソフトウェアをインストールする方法

  2. CentOS7にStreamaをインストールする方法

  3. CentOS7にReportServerをインストールする方法