aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-05-15 23:03:38 +0800
committerGitHub <noreply@github.com>2023-05-15 23:03:38 +0800
commitf74bd9dc81e343d82e95f41699a505eeb2ac52c4 (patch)
tree400fecdfc9dd20212bf73bace07cdd6983bc872e
parent7bf80ad0752e8d0887b6d7464db05b8065ac663e (diff)
downloadgitea-f74bd9dc81e343d82e95f41699a505eeb2ac52c4.tar.gz
gitea-f74bd9dc81e343d82e95f41699a505eeb2ac52c4.zip
Docs for creating a user to run Gitea on Fedora/RHEL/CentOS (#24725)
The current command doesn't work on Fedora/RHEL/CentOS. - `--gecos`: use `--comment` instead. - `--group`: use `--gid` instead, `--group` means "A list of supplementary groups" on F/R/C. - `--disabled-password`: leave `--password` empty instead, "The default is to disable the password". - `--home`: use `--home-dir` and `--create-home` instead.
-rw-r--r--docs/content/doc/installation/from-binary.en-us.md12
-rw-r--r--docs/content/doc/installation/from-binary.zh-cn.md12
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md
index c7824c3480..5c8973fa94 100644
--- a/docs/content/doc/installation/from-binary.en-us.md
+++ b/docs/content/doc/installation/from-binary.en-us.md
@@ -80,6 +80,7 @@ git --version
Create a user to run Gitea (e.g. `git`)
```sh
+# On Ubuntu/Debian:
adduser \
--system \
--shell /bin/bash \
@@ -88,6 +89,17 @@ adduser \
--disabled-password \
--home /home/git \
git
+
+# On Fedora/RHEL/CentOS:
+groupadd --system git
+adduser \
+ --system \
+ --shell /bin/bash \
+ --comment 'Git Version Control' \
+ --gid git \
+ --home-dir /home/git \
+ --create-home \
+ git
```
### Create required directory structure
diff --git a/docs/content/doc/installation/from-binary.zh-cn.md b/docs/content/doc/installation/from-binary.zh-cn.md
index abe799dc94..248f03d63f 100644
--- a/docs/content/doc/installation/from-binary.zh-cn.md
+++ b/docs/content/doc/installation/from-binary.zh-cn.md
@@ -74,6 +74,7 @@ git --version
创建用户(推荐使用名称 `git`)
```sh
+# On Ubuntu/Debian:
adduser \
--system \
--shell /bin/bash \
@@ -82,6 +83,17 @@ adduser \
--disabled-password \
--home /home/git \
git
+
+# On Fedora/RHEL/CentOS:
+groupadd --system git
+adduser \
+ --system \
+ --shell /bin/bash \
+ --comment 'Git Version Control' \
+ --gid git \
+ --home-dir /home/git \
+ --create-home \
+ git
```
### 创建工作路径