一:创建用户,修改密码,增加sudo权限。
useradd dolphinscheduler
#输入密码
passwd dolphinscheduler
# 配置 sudo 免密
sed -i '$adolphinscheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers
sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers
二:修改配置
# 在root用户下执行
root@hadoop101:/opt$ vim /etc/passwd
root@hadoop100:~# sudo mkdir /home/dolphinscheduler
root@hadoop100:~# sudo chown dolphinscheduler:dolphinscheduler /home/dolphinscheduler
root@hadoop100:~# su dolphinscheduler
dolphinscheduler@hadoop100:/root$ cp /etc/skel/.bashrc ~/
dolphinscheduler@hadoop100:/root$ vi ~/.profile
将以下内容填写到 ~/.profile
# if running bash
if [ -n "$BASH_VERSION" ]; then# include .bashrc if it existsif [ -f "$HOME/.bashrc" ]; then. "$HOME/.bashrc"fi
fi# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; thenPATH="$HOME/bin:$PATH"
fi# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; thenPATH="$HOME/.local/bin:$PATH"
fi
dolphinscheduler@hadoop100:/root$ source ~/.profile
退出普通用户 Ctrl+D
root@hadoop100:~# sudo bash
root@hadoop100:~# chmod 775 .