mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-09-10 20:22:14 +02:00
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.
This commit is contained in:
parent
7bf80ad075
commit
f74bd9dc81
2 changed files with 24 additions and 0 deletions
|
@ -80,6 +80,7 @@ git --version
|
||||||
Create a user to run Gitea (e.g. `git`)
|
Create a user to run Gitea (e.g. `git`)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
# On Ubuntu/Debian:
|
||||||
adduser \
|
adduser \
|
||||||
--system \
|
--system \
|
||||||
--shell /bin/bash \
|
--shell /bin/bash \
|
||||||
|
@ -88,6 +89,17 @@ adduser \
|
||||||
--disabled-password \
|
--disabled-password \
|
||||||
--home /home/git \
|
--home /home/git \
|
||||||
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
|
### Create required directory structure
|
||||||
|
|
|
@ -74,6 +74,7 @@ git --version
|
||||||
创建用户(推荐使用名称 `git`)
|
创建用户(推荐使用名称 `git`)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
# On Ubuntu/Debian:
|
||||||
adduser \
|
adduser \
|
||||||
--system \
|
--system \
|
||||||
--shell /bin/bash \
|
--shell /bin/bash \
|
||||||
|
@ -82,6 +83,17 @@ adduser \
|
||||||
--disabled-password \
|
--disabled-password \
|
||||||
--home /home/git \
|
--home /home/git \
|
||||||
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
|
||||||
```
|
```
|
||||||
|
|
||||||
### 创建工作路径
|
### 创建工作路径
|
||||||
|
|
Loading…
Reference in a new issue