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
This commit is contained in:
Lauris BH 2018-06-05 05:02:04 +03:00 committed by techknowlogick
parent 6400d8a3cb
commit 1aee261aae
8 changed files with 81 additions and 29 deletions

View file

@ -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