1. 设置CentOS linux 开机免密码自动登录:
% sudo vi /etc/gdm/custom.conf
...
[daemon]
AutomaticLogin=username
AutomaticLoginEnable=True
...
2. 编辑 username 用户 .bashrc 文件,以最后加上如下几行,注意 test 中 vmware 后面有空格,以便与其它vmware 的 Daemon 进程区别开来
...
if test$(pgrep -f "vmware" | wc -l)-eq 0;then
/usr/bin/vmware -n-x "/vmware/Hadoop1.vmwarevm/Hadoop1.vmx"-x "/vmware/Hadoop2.vmwarevm/Hadoop1.vmx"-x "/vmware/Hadoop3.vmwarevm/Hadoop1.vmx"&
fi