From 4c8591d4d73eff2a32f69e41739ad30b0d5c104e Mon Sep 17 00:00:00 2001 From: Yik Teng Hie Date: Tue, 27 Sep 2022 11:14:52 +0800 Subject: [PATCH] add gitea for 64bit OS --- giteaServer.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ readme.md | 14 +++++-- 2 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 giteaServer.md diff --git a/giteaServer.md b/giteaServer.md new file mode 100644 index 0000000..a146cc3 --- /dev/null +++ b/giteaServer.md @@ -0,0 +1,99 @@ +# Setup gitea on rasberry 64bit + +- [Reference](https://pimylifeup.com/raspberry-pi-gitea/) + +- Ensure Raspbian up-to-date +``` +sudo apt update +sudo apt upgrade +``` + +- Install mySQL Server +``` +sudo apt install git mariadb-server -y +``` + +- Disable git user login +``` +sudo adduser --disabled-login --gecos 'Gitea' git +``` + +- Setup mySQL Database. Enter 'Y' for all question +``` +sudo mysql_secure_installation +``` + +``` +sudo mysql -u root +``` + + +``` +CREATE DATABASE gitea; + +GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY 'ENTERPASSWORD'; + +FLUSH PRIVILEGES; + +exit +``` + + +``` +sudo su git +``` + +``` +cd ~ +mkdir gitea + +cd gitea +wget https://dl.gitea.io/gitea/1.17.2/gitea-1.17.2-linux-arm64 -O gitea + +chmod +x gitea + +exit + +sudo nano /etc/systemd/system/gitea.service +``` + +``` +[Unit] +Description=Gitea (Git with a cup of tea) +After=syslog.target +After=network.target + +[Service] +# Modify these two values ​​and uncomment them if you have +# repos with lots of files and get to HTTP error 500 because of that +### +# LimitMEMLOCK=infinity +# LimitNOFILE=65535 +RestartSec=2s +Type=simple +User=git +Group=git +WorkingDirectory=/home/git/gitea +ExecStart=/home/git/gitea/gitea web +Restart=always +Environment=USER=git +HOME=/home/git + +[Install] +WantedBy=multi-user.target +``` + +``` +sudo systemctl enable gitea.service +sudo systemctl start gitea.service +``` + +- Start install gitea +``` +http://192.168.0.143:3000 +``` + +- Main configuration + - Domain : homenetyth + - SSH port: 29419 + - Application URL : https://homenetyth.ddnsking.com/ diff --git a/readme.md b/readme.md index 1f8383c..906eca4 100644 --- a/readme.md +++ b/readme.md @@ -119,17 +119,25 @@ pass : yikth@7572137 ``` Update Gitea config file `custom/conf/app.ini` -sample `home/git/custom/conf/app.ini` +sample `home/git/gitea/custom/conf/app.ini` ```text [server] SSH_DOMAIN = homenetyth.ddnsking.com -DOMAIN = localhost +DOMAIN = homenetyth.ddnsking.com HTTP_PORT = 3000 -ROOT_URL = http://192.168.10.113:3000/ +ROOT_URL = https://homenetyth.ddnsking.com/ DISABLE_SSH = false SSH_PORT = 29419 +[mailer] +ENABLED = true +HOST = smtp.gmail.com:587 +FROM = smarttvminix@gmail.com +USER = smarttvminix +PASSWD = pkxgsabszatmyxgk + + ```