modify by hand
This commit is contained in:
parent
79b1984592
commit
005e20ec0b
1 changed files with 29 additions and 20 deletions
|
@ -1,26 +1,25 @@
|
|||
# 20240312115855 Raspi4 GiteaからForgejoに変更してみる
|
||||
|
||||
#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
|
||||
|
@ -32,21 +31,24 @@ 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は名前を変更した。
|
||||
|
||||
```
|
||||
$ su cloudflare
|
||||
Password:
|
||||
|
@ -54,16 +56,21 @@ 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 {
|
||||
|
@ -87,10 +94,12 @@ server {
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
$ sudo systemctl restart nginx
|
||||
sudo systemctl restart nginx
|
||||
```
|
||||
|
||||
## Ref.
|
||||
## Ref
|
||||
|
||||
- [Forgejo](https://forgejo.org/download/)
|
||||
- [[20240215215031 Raspi4にGiteaをインストール|Raspi4にGiteaをインストール]]
|
Loading…
Reference in a new issue