aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/doc/installation/from-binary.en-us.md
diff options
context:
space:
mode:
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>2019-02-28 06:09:47 -0600
committerLunny Xiao <xiaolunwen@gmail.com>2019-02-28 20:09:47 +0800
commit4b7237b63ee4b5b1892ac6fa14afcd29568147fb (patch)
tree52f1c1cde01db8b6044359fc5119498dd56e6c6d /docs/content/doc/installation/from-binary.en-us.md
parent1cf3fc3bc59e749feb7c730dc50f12f8ff1fc9be (diff)
downloadgitea-4b7237b63ee4b5b1892ac6fa14afcd29568147fb.tar.gz
gitea-4b7237b63ee4b5b1892ac6fa14afcd29568147fb.zip
Doc updates for customization and installation. (#6176)
* Doc updates and changing default sqlite DB path Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update customizing locales and THEMES Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add link to templates directory Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add portion for final step of running Gitea Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add recommended to service file usage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Removed DB path change, moving to another PR Updated doc sentence structure Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert change to template wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move recommended run-type to top
Diffstat (limited to 'docs/content/doc/installation/from-binary.en-us.md')
-rw-r--r--docs/content/doc/installation/from-binary.en-us.md28
1 files changed, 24 insertions, 4 deletions
diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md
index 6c3246f3ad..700642213c 100644
--- a/docs/content/doc/installation/from-binary.en-us.md
+++ b/docs/content/doc/installation/from-binary.en-us.md
@@ -44,6 +44,9 @@ location. When launched manually, Gitea can be killed using `Ctrl+C`.
## Recommended server configuration
+**NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/advanced/specific-variables.en-us.md" >}}) as well!
+Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation.
+
### Prepare environment
Check that git is installed on the server, if it is not install it first.
@@ -66,9 +69,9 @@ adduser \
### 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 -p /var/lib/gitea/{custom,data,log}
+chown -R git:git /var/lib/gitea/
+chmod -R 750 /var/lib/gitea/
mkdir /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea
@@ -80,16 +83,33 @@ chmod 750 /etc/gitea
chmod 644 /etc/gitea/app.ini
```
+### Configure Gitea's working directory
+
+**NOTE:** If you plan on running Gitea as a Linux service, you can skip this step as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
+```
+export GITEA_WORK_DIR=/var/lib/gitea/
+```
+
### Copy gitea binary to global location
```
cp gitea /usr/local/bin/gitea
```
-### Create service file to start gitea automatically
+## Running Gitea
+
+After the above steps, two options to run Gitea are:
+
+### 1. Creating a service file to start Gitea automatically (recommended)
See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}})
+### 2. Running from command-line/terminal
+
+```
+GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
+```
+
## Updating to a new version
You can update to a new version of gitea by stopping gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.