From 79b1984592cb48b8cd2407e5313b8d8611c9157c Mon Sep 17 00:00:00 2001 From: "Kaz Saita(raspi4)" Date: Tue, 12 Mar 2024 13:15:12 +0900 Subject: [PATCH] sync notes(auto) --- ...5 Raspi4 GiteaからForgejoに変更してみる.md | 49 ++++++++----------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/content/20240312115855 Raspi4 GiteaからForgejoに変更してみる.md b/content/20240312115855 Raspi4 GiteaからForgejoに変更してみる.md index f3dfaa3..240343c 100644 --- a/content/20240312115855 Raspi4 GiteaからForgejoに変更してみる.md +++ b/content/20240312115855 Raspi4 GiteaからForgejoに変更してみる.md @@ -1,25 +1,26 @@ # 20240312115855 Raspi4 GiteaからForgejoに変更してみる - -#gitea #forgejo #raspi +#gitea #forgejo #raspi ## インストール - [Forgejo](https://forgejo.org/download/) "Upgrade from Gitea" に、「バイナリを入れかえればOK」みたいなことが書いてあるので、そのようにしてみる。自分がインストールしていたバージョンは 1.21.5 なので、それに対応したバージョンをインストール giteaが動いている前提。 cf. [[20240215215031 Raspi4にGiteaをインストール|Raspi4にGiteaをインストール]] + + + + + + download: - ``` -cd tmp -sudo systemctl stop gitea -sudo mv /usr/local/bin/gitea /usr/local/bin/gitea.orig -wget https://codeberg.org/forgejo/forgejo/releases/download/v1.21.5-0/forgejo-1.21.5-0-linux-arm64 -chmod a+x ./forgejo-1.21.5-0-linux-arm64 +$ cd tmp +$ sudo systemctl stop gitea +$ sudo mv /usr/local/bin/gitea /usr/local/bin/gitea.orig +$ wget https://codeberg.org/forgejo/forgejo/releases/download/v1.21.5-0/forgejo-1.21.5-0-linux-arm64 +$ chmod a+x ./forgejo-1.21.5-0-linux-arm64 ``` - gpg - ``` $ wget https://codeberg.org/forgejo/forgejo/releases/download/v1.21.5-0/forgejo-1.21.5-0-linux-arm64.asc $ gpg --verify forgejo-1.21.5-0-linux-arm64.asc forgejo-1.21.5-0-linux-arm64 @@ -31,24 +32,21 @@ gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: EB11 4F5E 6C0D C2BC DD18 3550 A4B6 1A2D C592 3710 ``` - コピー - ``` - sudo cp forgejo-1.21.5-0-linux-arm64 /usr/local/bin/gitea + $ sudo cp forgejo-1.21.5-0-linux-arm64 /usr/local/bin/gitea ``` 再起動 - ``` -sudo systemctl start gitea +$ sudo systemctl start gitea ``` ・・・で問題なく動いた。 バイナリ名やサービス名がgiteaだったりで不完全だけど、とりあえずOK。バージョンアップする時に困るかもしれない。 一応 `/etc/gitea/app.ini` の [server] の `ROOT_URL`だけは `https://git.kinoshita-lab.org/`変更しておいた。 -外観的に落ちつかない、というか混乱しそうなので、トンネルとnginxは名前を変更した。 +外観的に落ちつかない、というか混乱しそうなので、トンネルとnginxは名前を変更した。 ``` $ su cloudflare Password: @@ -56,21 +54,16 @@ cloudflare@saipi4:~ $ vim ~/.cloudflared/config.yaml # gitea と書いてあるところを gitに変更 cloudflare@saipi4:~ $ cloudflared tunnel route dns c7e5dcd4-1cfe-4e6f-b8f0-d8d1d1c0c146 git.kinoshita-lab.org ``` - cloudflaredコマンドでCNAMEを消す方法が不明だったので、 webインターフェースから gitea を消去。 - ``` -sudo systemctl restart cloudflared +$ sudo systemctl restart cloudflared ``` nginxの設定を変更 - ``` -sudo vim /etc/nginx/sites-available/default +$ sudo vim /etc/nginx/sites-available/default ``` - 中身はこんな感じ - ``` # gitea -> forgejo server { @@ -94,12 +87,10 @@ server { } } ``` - ``` -sudo systemctl restart nginx +$ sudo systemctl restart nginx ``` -## Ref - +## Ref. - [Forgejo](https://forgejo.org/download/) -- [[20240215215031 Raspi4にGiteaをインストール|Raspi4にGiteaをインストール]] +- [[20240215215031 Raspi4にGiteaをインストール|Raspi4にGiteaをインストール]] \ No newline at end of file