From 0b9ee9f05ba08824dc265014412199e0b45327ed Mon Sep 17 00:00:00 2001 From: Ken Schaefer Date: Mon, 6 Mar 2023 09:27:59 -0600 Subject: [PATCH] Added comments to gitea docs --- Runbooks/linux.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Runbooks/linux.md b/Runbooks/linux.md index 8be9699..7806ee5 100644 --- a/Runbooks/linux.md +++ b/Runbooks/linux.md @@ -190,17 +190,22 @@ sudo ufw reload ``` sudo apt install git sudo apt install mariadb-server + +# Login to MySQL sudo mysql -u root -p +# Add the git database CREATE DATABASE gitea; GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY "Root"; FLUSH PRIVILEGES; QUIT; +# Install gitea sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/1.16.7/gitea-1.16.7-linux-amd64 sudo chmod +x /usr/local/bin/gitea gitea --version +# Create gitea user sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git sudo mkdir -pv /var/lib/gitea/{custom,data,log} sudo chown -Rv git:git /var/lib/gitea @@ -211,6 +216,9 @@ sudo chown -Rv root:git /etc/gitea sudo chmod -Rv 770 /etc/gitea sudo chmod -Rv 770 /etc/gitea +# Append code to the service file +sudo nano /etc/systemd/system/gitea.service + [Unit] Description=Gitea After=syslog.target @@ -228,12 +236,14 @@ Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea [Install] WantedBy=multi-user.target +# Start gitea sudo systemctl start gitea sudo systemctl status gitea sudo systemctl enable gitea +# Access gitea http://localhost:3000 ``` -### Logging with Prometheus \ No newline at end of file +### Logging with Prometheus