如何在 Ubuntu 上安装 Taiga 22.04 LTS

Linux命令 Edge插件网 12个月前 (01-04) 207次浏览 已收录 0个评论

安装非常简单,假设您在 root 帐户中运行,如果不是,您可能需要在命令中添加 ” 才能获得 root 权限。我将向您展示在 Ubuntu 22.04 上逐步安装 Taiga 项目管理。您可以按照 Ubuntu 22.04 和任何其他基于 Debian 的发行版(如 Linux Mint、Elementary OS、Pop!_OS 等)的相同说明进行操作。sudo如何在 Ubuntu 上安装 Taiga 22.04 LTS

在 Ubuntu 上安装 Taiga 22.04 LTS Jammy Jellyfish

步骤 1。在进入安装过程之前,确保您的系统是最新的至关重要。打开终端并输入以下命令以更新和升级系统软件包:

<span class="pln">sudo apt update
sudo apt upgrade</span>

接下来,安装必要的依赖项。Taiga 需要 Git、PIP 和 virtualenv。使用以下命令安装这些依赖项:

<span class="pln">sudo apt install git
sudo apt install python3</span><span class="pun">-</span><span class="pln">pip
pip install virtualenv</span>

第2步。安装 Nginx。

Taiga 使用 Nginx Web 服务器运行。如果尚未在系统上安装 Nginx,请使用以下命令:

<span class="pln">sudo apt install nginx</span>

安装完成后,使用以下命令启动 Nginx 服务:

<span class="pln">sudo systemctl start nginx</span>

第 3 步。安装 Node.js。

Taiga 的前端需要 Node.js。要安装 Node.js,请使用以下命令:

<span class="pln">sudo apt install nodejs
sudo apt install npm</span>

通过检查 Node.js 的版本来验证安装:

<span class="pln">nodejs </span><span class="pun">-</span><span class="pln">v</span>

第 4 步。安装 PostgreSQL

Taiga 使用 PostgreSQL 作为其数据库。使用以下命令安装 PostgreSQL:

<span class="pln">sudo apt install postgresql postgresql</span><span class="pun">-</span><span class="pln">contrib</span>

安装后,为 Taiga 创建新的 PostgreSQL 用户和数据库:

<span class="pln">sudo </span><span class="pun">-</span><span class="pln">u postgres createuser taiga
sudo </span><span class="pun">-</span><span class="pln">u postgres createdb taiga </span><span class="pun">-</span><span class="pln">O taiga</span>

第 5 步。在 Ubuntu 上安装 Taiga 22.04.

现在先决条件已经到位,是时候安装 Taiga 了。首先,从 GitHub 克隆 Taiga 存储库:

<span class="pln">git clone https</span><span class="pun">:</span><span class="com">//github.com/kaleidos-ventures/taiga-back</span>

导航到 taiga 目录并创建新的 Python 虚拟环境:

<span class="pln">cd taiga</span><span class="pun">-</span><span class="pln">back
virtualenv </span><span class="pun">-</span><span class="pln">p python3</span><span class="pun">.</span><span class="lit">8</span> <span class="pun">.</span><span class="pln">env</span>

激活虚拟环境并安装所需的 Python 包:

<span class="pln">source </span><span class="pun">.</span><span class="pln">env</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">activate
pip install </span><span class="pun">-</span><span class="pln">r requirements</span><span class="pun">.</span><span class="pln">txt</span>

接下来,复制示例 settings/local 文件并修改它以匹配您的配置:

<span class="pln">cp settings</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">.</span><span class="pln">py</span><span class="pun">.</span><span class="pln">example settings</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">.</span><span class="pln">py</span>

现在,迁移数据库并加载初始数据:

<span class="pln">python manage</span><span class="pun">.</span><span class="pln">py migrate
python manage</span><span class="pun">.</span><span class="pln">py loaddata initial_user
python manage</span><span class="pun">.</span><span class="pln">py loaddata initial_project_templates
python manage</span><span class="pun">.</span><span class="pln">py compilemessages
python manage</span><span class="pun">.</span><span class="pln">py collectstatic </span><span class="pun">--</span><span class="pln">noinput</span>

对于前端,克隆 Taiga 前端存储库并安装所需的 Node.js 包:

<span class="pln">git clone https</span><span class="pun">:</span><span class="com">//github.com/kaleidos-ventures/taiga-front.git</span><span class="pln">
cd taiga</span><span class="pun">-</span><span class="pln">front
npm install</span>

复制示例 confjson格式 文件并修改它以匹配您的配置:

<span class="pln">cp dist</span><span class="pun">/</span><span class="pln">conf</span><span class="pun">.</span><span class="pln">example</span><span class="pun">.</span><span class="pln">json dist</span><span class="pun">/</span><span class="pln">conf</span><span class="pun">.</span><span class="pln">json</span>

第 6 步。为 Taiga 配置 Nginx。

要使 Taiga 可通过 Web 浏览器访问,请将 Nginx 配置为为 Taiga 前端提供服务。创建一个新的 Nginx 服务器块文件:

<span class="pln">sudo nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">sites</span><span class="pun">-</span><span class="pln">available</span><span class="pun">/</span><span class="pln">taiga</span>

在此文件中,添加以下服务器块,将 server_name 替换为您的域名或 IP 地址:

<span class="pln">server </span><span class="pun">{</span><span class="pln">
    listen </span><span class="lit">80</span><span class="pun">;</span><span class="pln">
    server_name _</span><span class="pun">;</span><span class="pln">
    large_client_header_buffers </span><span class="lit">4</span> <span class="lit">32k</span><span class="pun">;</span><span class="pln">
    client_max_body_size </span><span class="lit">50M</span><span class="pun">;</span><span class="pln">
    charset utf</span><span class="pun">-</span><span class="lit">8</span><span class="pun">;</span><span class="pln">

    access_log </span><span class="pun">/</span><span class="kwd">var</span><span class="pun">/</span><span class="pln">log</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">.</span><span class="pln">access</span><span class="pun">.</span><span class="pln">log</span><span class="pun">;</span><span class="pln">

    include </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">mime</span><span class="pun">.</span><span class="pln">types</span><span class="pun">;</span><span class="pln">
    default_type application</span><span class="pun">/</span><span class="pln">octet</span><span class="pun">-</span><span class="pln">stream</span><span class="pun">;</span><span class="pln">

    location </span><span class="pun">/</span> <span class="pun">{</span><span class="pln">
        root </span><span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">taiga</span><span class="pun">/</span><span class="pln">taiga</span><span class="pun">-</span><span class="pln">front</span><span class="pun">-</span><span class="pln">dist</span><span class="pun">/</span><span class="pln">dist</span><span class="pun">/;</span><span class="pln">
        try_files $uri $uri</span><span class="pun">/</span> <span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln">html</span><span class="pun">;</span>
    <span class="pun">}</span><span class="pln">

    location </span><span class="pun">/</span><span class="pln">api </span><span class="pun">{</span><span class="pln">
        proxy_set_header </span><span class="typ">Host</span><span class="pln"> $http_host</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Real</span><span class="pun">-</span><span class="pln">IP $remote_addr</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Scheme</span><span class="pln"> $scheme</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Forwarded</span><span class="pun">-</span><span class="typ">Proto</span><span class="pln"> $scheme</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Forwarded</span><span class="pun">-</span><span class="typ">For</span><span class="pln"> $proxy_add_x_forwarded_for</span><span class="pun">;</span><span class="pln">
        proxy_pass http</span><span class="pun">:</span><span class="com">//127.0.0.1:8001/api;</span><span class="pln">
        proxy_redirect off</span><span class="pun">;</span>
    <span class="pun">}</span><span class="pln">

    location </span><span class="pun">/</span><span class="pln">admin </span><span class="pun">{</span><span class="pln">
        proxy_set_header </span><span class="typ">Host</span><span class="pln"> $http_host</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Real</span><span class="pun">-</span><span class="pln">IP $remote_addr</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Scheme</span><span class="pln"> $scheme</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Forwarded</span><span class="pun">-</span><span class="typ">Proto</span><span class="pln"> $scheme</span><span class="pun">;</span><span class="pln">
        proxy_set_header X</span><span class="pun">-</span><span class="typ">Forwarded</span><span class="pun">-</span><span class="typ">For</span><span class="pln"> $proxy_add_x_forwarded_for</span><span class="pun">;</span><span class="pln">
        proxy_pass http</span><span class="pun">:</span><span class="com">//127.0.0.1:8001/admin;</span><span class="pln">
        proxy_redirect off</span><span class="pun">;</span>
    <span class="pun">}</span><span class="pln">

    location </span><span class="pun">/</span><span class="kwd">static</span> <span class="pun">{</span>
        <span class="kwd">alias</span> <span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">taiga</span><span class="pun">/</span><span class="pln">taiga</span><span class="pun">-</span><span class="pln">back</span><span class="pun">/</span><span class="kwd">static</span><span class="pun">;</span>
    <span class="pun">}</span><span class="pln">

    location </span><span class="pun">/</span><span class="pln">media </span><span class="pun">{</span>
        <span class="kwd">alias</span> <span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">taiga</span><span class="pun">/</span><span class="pln">taiga</span><span class="pun">-</span><span class="pln">back</span><span class="pun">/</span><span class="pln">media</span><span class="pun">;</span>
    <span class="pun">}</span>
<span class="pun">}</span>

通过创建指向启用站点目录符号链接来启用新的服务器块

<span class="pln">sudo ln </span><span class="pun">-</span><span class="pln">s </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">sites</span><span class="pun">-</span><span class="pln">available</span><span class="pun">/</span><span class="pln">taiga </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">sites</span><span class="pun">-</span><span class="pln">enabled</span><span class="pun">/</span><span class="pln">
sudo systemctl restart nginx</span>

第 7 步。为 Taiga 创建超级用户。

要管理 Taiga 实例,请创建一个超级用户帐户。运行以下命令,并按照提示创建新的超级用户:

<span class="pln">python manage</span><span class="pun">.</span><span class="pln">py createsuperuser</span>

第 8 步。访问 Taiga Web UI。

现在,您可以通过打开 Web 浏览器并导航到服务器的 IP 地址或域名来访问 Taiga 实例。使用您之前创建的超级用户凭据登录。

如何在 Ubuntu 上安装 Taiga 22.04 LTS

感谢您使用本教程在 Ubuntu 系统上安装 Taiga 项目管理工具。如需更多帮助或有用信息,我们建议您查看 Taiga 官方网站


Edge插件网 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:如何在 Ubuntu 上安装 Taiga 22.04 LTS
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址