# Git Gitea

## 原生

选择：

- Gitea 1.16.8
- MariaDB 10.7.4

### 配置数据库

<https://docs.gitea.io/en-us/database-prep/>

\`\`\`bash pacman -S mariadb \`\`\`

修改 `bind-address`，登录 root 用户下的数据库。

本地安装 Gitea：

\`\`\`sql SET old<sub>passwords</sub>=0; CREATE USER 'gitea' IDENTIFIED BY 'gitea'; CREATE DATABASE giteadb CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4<sub>unicodeci</sub>'; GRANT ALL PRIVILEGES ON giteadb.* TO 'gitea'; FLUSH PRIVILEGES; \`\`\`

### 安装 Gitea

\`\`\`bash pacman -S gitea gitea # 浏览器打开 <http://localhost:3000> 进行配置 sudo cp /etc/gitea/app.example.ini /etc/gitea/app.ini systemctl enable --now gitea \`\`\`

无法打开 gitea 服务。无法使用，安装失败。

refer:

1. <https://forum.hostea.org/t/howto-gitea-upgrades-a-guide-for-admins/39>

## Docker

<https://docs.gitea.io/en-us/install-with-docker-rootless/>
