From b9a2e0c41ef4a74f3c219dbd26fada4411606708 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Tue, 5 Jun 2018 05:02:04 +0300 Subject: [PATCH] More detailed documentation on how to set up from binary (#4121) * More detailed documentation on how to set up from binary Also change recommended file locations --- doc/installation/from-binary.en-us.md | 52 +++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/doc/installation/from-binary.en-us.md b/doc/installation/from-binary.en-us.md index 91f81f73..9c885921 100644 --- a/doc/installation/from-binary.en-us.md +++ b/doc/installation/from-binary.en-us.md @@ -20,8 +20,8 @@ embedded assets. This can be different for older releases. Choose the file match the destination platform from the [downloads page](https://dl.gitea.io/gitea), copy the URL and replace the URL within the commands below: -``` -wget -O gitea https://dl.gitea.io/gitea/1.3.2/gitea-1.3.2-linux-amd64 +```sh +wget -O gitea https://dl.gitea.io/gitea/1.4.2/gitea-1.4.2-linux-amd64 chmod +x gitea ``` @@ -34,6 +34,54 @@ location. When launched manually, Gitea can be killed using `Ctrl+C`. ./gitea web ``` +## Recommended server configuration + +### Prepare environment + +Check that git is installed on the server, if it is not install it first. +```sh +git --version +``` + +Create user to run gitea (ex. `git`) +```sh +adduser \ + --system \ + --shell /bin/bash \ + --gecos 'Git Version Control' \ + --group \ + --disabled-password \ + --home /home/git \ + git +``` + +### Create required directory structure + +```sh +mkdir -p /var/lib/gitea/{custom,data,indexers,public,log} +chown git:git /var/lib/gitea/{data,indexers,log} +chmod 750 /var/lib/gitea/{data,indexers,log} +mkdir /etc/gitea +chown root:git /etc/gitea +chmod 770 /etc/gitea +``` + +**NOTE:** `/etc/gitea` is temporary set with write rights for user `git` so that Web installer could write configuration file. After installation is done it is recommended to set rights to read-only using: +``` +chmod 750 /etc/gitea +chmod 644 /etc/gitea/app.ini +``` + +### Copy gitea binary to global location + +``` +cp gitea /usr/local/bin/gitea +``` + +### Create service file to start gitea automatically + +See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}}) + ## Troubleshooting ### Old glibc versions