一.环境
- Ubuntu server版最小化安装(只安装openssh-server)
- 网络:
IP:192.168.16.128为外网IP,同时也作为管理网络IP
网关:192.168.16.2(VMware虚拟机设置的,默认是这个)
二.设置用户
- 设置stack用户
groupadd stack
useradd -g stack -s /bin/bash -d /opt/stack -m stack
passwd stack(设置密码)
- 添加stack用户权限
sudo echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
- 切换到stack用户