mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +00:00
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:
committed by
techknowlogick
parent
f45b1df0bf
commit
b9a2e0c41e
@@ -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 destination platform from the [downloads page](https://dl.gitea.io/gitea), copy
|
||||||
the URL and replace the URL within the commands below:
|
the URL and replace the URL within the commands below:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
wget -O gitea https://dl.gitea.io/gitea/1.3.2/gitea-1.3.2-linux-amd64
|
wget -O gitea https://dl.gitea.io/gitea/1.4.2/gitea-1.4.2-linux-amd64
|
||||||
chmod +x gitea
|
chmod +x gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -34,6 +34,54 @@ location. When launched manually, Gitea can be killed using `Ctrl+C`.
|
|||||||
./gitea web
|
./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
|
## Troubleshooting
|
||||||
|
|
||||||
### Old glibc versions
|
### Old glibc versions
|
||||||
|
|||||||
Reference in New Issue
Block a user