# Vérifier la dernière version sur https://dl.gitea.io/gitea/GITEA_VERSION="1.21.3"wget-O/usr/local/bin/giteahttps://dl.gitea.io/gitea/${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64
chmod+x/usr/local/bin/gitea
gitea--version
cat>/etc/systemd/system/gitea.service<< 'EOF'[Unit]Description=Gitea (Git with a cup of tea)After=syslog.targetAfter=network.targetAfter=mariadb.service[Service]Type=simpleUser=giteaGroup=giteaWorkingDirectory=/var/lib/giteaExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.iniRestart=alwaysEnvironment=USER=gitea HOME=/home/gitea GITEA_WORK_DIR=/var/lib/gitea[Install]WantedBy=multi-user.targetEOFsystemctldaemon-reload
systemctlenablegitea
5. Configuration
Première configuration (via web)
systemctlstartgitea
# Ouvrir http://IP:3000
Configuration manuelle
vim/etc/gitea/app.ini
APP_NAME=Gitea: Git with a cup of teaRUN_MODE=prodRUN_USER=gitea[server]HTTP_PORT=3000ROOT_URL=https://git.example.com/DOMAIN=git.example.comSSH_DOMAIN=git.example.comSSH_PORT=22START_SSH_SERVER=falseOFFLINE_MODE=false[database]DB_TYPE=mysqlHOST=127.0.0.1:3306NAME=giteaUSER=giteaPASSWD=gitea_passwordCHARSET=utf8mb4[repository]ROOT=/var/lib/gitea/repositories[security]SECRET_KEY=GENERATE_ONEINTERNAL_TOKEN=GENERATE_ONEINSTALL_LOCK=true[service]DISABLE_REGISTRATION=falseREQUIRE_SIGNIN_VIEW=falseENABLE_NOTIFY_MAIL=false[mailer]ENABLED=false[log]MODE=fileLEVEL=infoROOT_PATH=/var/lib/gitea/log