「Gitea」:修訂間差異

出自Gea-Suan Lin's Wiki
跳至導覽 跳至搜尋
本頁面具有訪問限制。如果您看見此訊息,這代表您沒有訪問本頁面的權限。
行 26: 行 26:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cd /etc/systemd/system; sudo wget -c https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service; sudo systemctl daemon-realod; sudo systemctl enable --now gitea
cd /etc/systemd/system; sudo wget -c https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service; sudo systemctl daemon-reload; sudo systemctl enable --now gitea
</syntaxhighlight>
</syntaxhighlight>



於 2024年2月26日 (一) 20:09 的修訂

Gitea一套輕量級的Git託管軟體。

安裝

這邊的安裝是假設在Ubuntu 22.04下。

先建立使用者帳號:

sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git

再來建立對應的目錄結構(這邊的/etc/gitea設為770是暫時性的,後續等Gitea把設定檔寫進去後就會修正):

sudo mkdir -p /var/lib/gitea/{custom,data,log}; sudo chown -R git:git /var/lib/gitea; sudo chmod -R 750 /var/lib/gitea; sudo mkdir /etc/gitea; sudo chown root:git /etc/gitea; sudo chmod 770 /etc/gitea

接著下載軟體檔案:

GITEA_VER=1.21.7; sudo mkdir -p /usr/local/bin; cd /usr/local/bin; sudo wget -c https://github.com/go-gitea/gitea/releases/download/v${GITEA_VER}/gitea-${GITEA_VER}-linux-amd64; sudo chmod 755 gitea-${GITEA_VER}-linux-amd64; sudo ln -sf gitea-${GITEA_VER}-linux-amd64 gitea

然後是systemd的設定檔:

cd /etc/systemd/system; sudo wget -c https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service; sudo systemctl daemon-reload; sudo systemctl enable --now gitea

外部連結