You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zi...@apache.org on 2024/09/06 00:32:24 UTC
(dolphinscheduler) branch dev updated: [Improvement-8295][Document] Standalone Deployment doc should instruct users to configure sudo without password (#16585)
This is an automated email from the ASF dual-hosted git repository.
zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 862038e5ea [Improvement-8295][Document] Standalone Deployment doc should instruct users to configure sudo without password (#16585)
862038e5ea is described below
commit 862038e5eab6ac19941d1f3c2c27cc21b6271c59
Author: xiangzihao <46...@qq.com>
AuthorDate: Fri Sep 6 08:32:19 2024 +0800
[Improvement-8295][Document] Standalone Deployment doc should instruct users to configure sudo without password (#16585)
---
docs/docs/en/guide/installation/pseudo-cluster.md | 8 ++++++--
docs/docs/en/guide/installation/standalone.md | 25 +++++++++++++++++++++++
docs/docs/zh/guide/installation/pseudo-cluster.md | 13 ++++--------
docs/docs/zh/guide/installation/standalone.md | 25 +++++++++++++++++++++++
4 files changed, 60 insertions(+), 11 deletions(-)
diff --git a/docs/docs/en/guide/installation/pseudo-cluster.md b/docs/docs/en/guide/installation/pseudo-cluster.md
index 45a00bc9e4..6561759a9f 100644
--- a/docs/docs/en/guide/installation/pseudo-cluster.md
+++ b/docs/docs/en/guide/installation/pseudo-cluster.md
@@ -33,7 +33,7 @@ echo "dolphinscheduler" | passwd --stdin dolphinscheduler
# Configure sudo without password
sed -i '$adolphinscheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers
-sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers
+sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
# Modify directory permissions and grant permissions for user you created above
chown -R dolphinscheduler:dolphinscheduler apache-dolphinscheduler-*-bin
@@ -43,7 +43,11 @@ chmod -R 755 apache-dolphinscheduler-*-bin
> **_NOTICE:_**
>
> - Due to DolphinScheduler's multi-tenant task switch user using command `sudo -u {linux-user} -i`, the deployment user needs to have `sudo` privileges and be password-free. If novice learners don’t understand, you can ignore this point for now.
-> - If you find the line "Defaults requirett" in the `/etc/sudoers` file, please comment the content.
+> - If you find the line "Defaults requiretty" in the `/etc/sudoers` file, please comment the content.
+
+### Prepare Zookeeper
+
+If you use Zookeeper as the registry center, you need to install Zookeeper and start it first.
## Modify Configuration
diff --git a/docs/docs/en/guide/installation/standalone.md b/docs/docs/en/guide/installation/standalone.md
index 3540ecf27e..bf47c3b9a5 100644
--- a/docs/docs/en/guide/installation/standalone.md
+++ b/docs/docs/en/guide/installation/standalone.md
@@ -14,6 +14,31 @@ If you want to deploy DolphinScheduler in production, we recommend you follow [c
- JDK:download [JDK][jdk] (1.8 or 11), install and configure environment variable `JAVA_HOME` and append `bin` dir (included in `JAVA_HOME`) to `PATH` variable. You can skip this step if it already exists in your environment.
- Binary package: download the DolphinScheduler binary package at [download page](https://dolphinscheduler.apache.org/en-us/download/<version>). <!-- markdown-link-check-disable-line -->
+### Configure User Exemption and Permissions
+
+Create a deployment user, and make sure to configure `sudo` without password. Here make an example to create user `dolphinscheduler`:
+
+```shell
+# To create a user, login as root
+useradd dolphinscheduler
+
+# Add password
+echo "dolphinscheduler" | passwd --stdin dolphinscheduler
+
+# Configure sudo without password
+sed -i '$adolphinscheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers
+sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
+
+# Modify directory permissions and grant permissions for user you created above
+chown -R dolphinscheduler:dolphinscheduler apache-dolphinscheduler-*-bin
+chmod -R 755 apache-dolphinscheduler-*-bin
+```
+
+> **_NOTICE:_**
+>
+> - Due to DolphinScheduler's multi-tenant task switch user using command `sudo -u {linux-user} -i`, the deployment user needs to have `sudo` privileges and be password-free. If novice learners don’t understand, you can ignore this point for now.
+> - If you find the line "Defaults requiretty" in the `/etc/sudoers` file, please comment the content.
+
## Start DolphinScheduler Standalone Server
### Extract and Start DolphinScheduler
diff --git a/docs/docs/zh/guide/installation/pseudo-cluster.md b/docs/docs/zh/guide/installation/pseudo-cluster.md
index 1ccd005ea2..5c910ee759 100644
--- a/docs/docs/zh/guide/installation/pseudo-cluster.md
+++ b/docs/docs/zh/guide/installation/pseudo-cluster.md
@@ -33,7 +33,7 @@ echo "dolphinscheduler" | passwd --stdin dolphinscheduler
# 配置 sudo 免密
sed -i '$adolphinscheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers
-sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers
+sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
# 修改目录权限,使得部署用户对二进制包解压后的 apache-dolphinscheduler-*-bin 目录有操作权限
chown -R dolphinscheduler:dolphinscheduler apache-dolphinscheduler-*-bin
@@ -43,16 +43,11 @@ chmod -R 755 apache-dolphinscheduler-*-bin
> **_注意:_**
>
> - 因为任务执行服务是以 `sudo -u {linux-user} -i` 切换不同 linux 用户的方式来实现多租户运行作业,所以部署用户需要有 sudo 权限,而且是免密的。初学习者不理解的话,完全可以暂时忽略这一点
-> - 如果发现 `/etc/sudoers` 文件中有 "Defaults requirett" 这行,也请注释掉
+> - 如果发现 `/etc/sudoers` 文件中有 "Defaults requiretty" 这行,也请注释掉
-### 启动 zookeeper
+### 准备 zookeeper
-进入 zookeeper 的安装目录,将 `zoo_sample.cfg` 配置文件复制到 `conf/zoo.cfg`,并将 `conf/zoo.cfg` 中 dataDir 中的值改成 `dataDir=./tmp/zookeeper`
-
-```shell
-# 启动 zookeeper
-./bin/zkServer.sh start
-```
+如果使用 Zookeeper 作为注册中心,需要先安装 Zookeeper 并启动。
## 修改相关配置
diff --git a/docs/docs/zh/guide/installation/standalone.md b/docs/docs/zh/guide/installation/standalone.md
index 5591b6e482..d669db4727 100644
--- a/docs/docs/zh/guide/installation/standalone.md
+++ b/docs/docs/zh/guide/installation/standalone.md
@@ -12,6 +12,31 @@ Standalone 仅适用于 DolphinScheduler 的快速体验.
- JDK:下载[JDK][jdk] (1.8 or 11),安装并配置 `JAVA_HOME` 环境变量,并将其下的 `bin` 目录追加到 `PATH` 环境变量中。如果你的环境中已存在,可以跳过这步。
- 二进制包:在[下载页面](https://dolphinscheduler.apache.org/en-us/download/<version>)下载 DolphinScheduler 二进制包 <!-- markdown-link-check-disable-line -->
+## 配置用户免密及权限
+
+创建部署用户,并且一定要配置 `sudo` 免密。以创建 dolphinscheduler 用户为例
+
+```shell
+# 创建用户需使用 root 登录
+useradd dolphinscheduler
+
+# 添加密码
+echo "dolphinscheduler" | passwd --stdin dolphinscheduler
+
+# 配置 sudo 免密
+sed -i '$adolphinscheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers
+sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers
+
+# 修改目录权限,使得部署用户对二进制包解压后的 apache-dolphinscheduler-*-bin 目录有操作权限
+chown -R dolphinscheduler:dolphinscheduler apache-dolphinscheduler-*-bin
+chmod -R 755 apache-dolphinscheduler-*-bin
+```
+
+> **_注意:_**
+>
+> - 因为任务执行服务是以 `sudo -u {linux-user} -i` 切换不同 linux 用户的方式来实现多租户运行作业,所以部署用户需要有 sudo 权限,而且是免密的。初学习者不理解的话,完全可以暂时忽略这一点
+> - 如果发现 `/etc/sudoers` 文件中有 "Defaults requiretty" 这行,也请注释掉
+
## 启动 DolphinScheduler Standalone Server
### 解压并启动 DolphinScheduler