VMware Workstation 下 Ubuntu 11.04安装VMWare Tools小结
Ubuntu安装后,root用户默认是被锁定了的,不允许登录,也不允许“su”到 root。有人说这是个不好的实践,特别是对于服务器来说。我觉得对于桌面用户来说,这样安全性更高一些,是应该的;但对于服务器可以设置成“允许 su 到root,但不允许root用户直接登录”。而我为了开发时的方便,则在桌面和服务器上都采用这种方式。
允许 su 到 root
非常简单,下面是设置的方法:
me@tipfoo:~$ sudo passwd
Enter new UNIX password: <--- 新的Root用户密码
Retype new UNIX password: <--- 重复新的Root用户密码
passwd:已成功更新密码
允许root登录
如果要允许root登录(不推荐),则这样操作:
me@tipfoo:~$ gksu /usr/sbin/gdmsetup
(或者使用桌面菜单:系统>系统管理>登录窗口)
点“安全”选项页,选择“允许本地管理员登录”。
注:这一步依赖上一步
不输入密码直接登录
在论坛上也看见有人抱怨,家中的Ubuntu不能像Window$那样──不用输入密码就能登录。其实同样能做到:
就在上一步的“安全”选项页中,勾选:
“启用自动登录”,“用户”选择(如:“me”);
注意:公共用的计算机千万不能这么设置!
SSH登录远程服务器
如果远程服务器只允许root用户SSH到服务器时,在Ubuntu下,必须“su 到root”用户才能登录成功(具体是看服务器端的配置)。
首先,复制密钥到“/root/.ssh/”目录,
me@tipfoo:~$ su
Password:
root@tipfoo:/home/me# chmod 600 -R /root/.ssh/
root@tipfoo:/home/me# ssh -p 27482 11.22.33.44
Enter passphrase for key '/root/.ssh/id_rsa':
Last login: Thu Jun 21 14:29:00 2007 from 11.22.33.45
安装VMWare Tools:
1、点击“虚拟机 - 安装VMWare Tools”,双击桌面上出现的光盘图标,右击“…….”后缀文件将其解压缩桌面上。
2、打开“终端”,运行su命令后输入密码获取root用户权限,依次执行下面的命令(注意这里版本号可能有所不同,可以在终端中执行uname -r查看当前内核版本):
cd /usr/src/linux-headers-2.6.35-22-generic/include1314我爱你
cp -p generated/utsrelease.h linux/utsrelease.h
cp -p generated/autoconf.h linux/autoconf.h
3、在终端中进入桌面的解压缩目录(以自己的实际分区目录为基准):
cd /home/june/桌面/vmware-tools-distrib
然后执行:
sudo ./vmware-install.pl(注意 / 前有一个 . )
4、然后剩下的就没什么了,跟以前的基本一致,一路回车,一直到提示选择分辨率,再到提示“Enjoy, — the VMware team”就好了。最后就是在“首选项 - 启动应用程序”里把vmware-toolbox添加进去就可以了。
简化的过程:
cc@cc-virtual-machine:~$ sudo passwd
[sudo] password for cc:
输入新的 UNIX 密码:
五一节快乐祝福语图片重新输入新的 UNIX 密码:
passwd:已成功更新密码
潘雨辰老公
cc@cc-virtual-machine:~$ su root
密码:
root@cc-virtual-machine:~# cd /home/cc/桌面/vmware-tools-distrib
root@cc-virtual-machine:/home/cc/桌面/vmware-tools-distrib# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/usr/bin]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]
What is the directory that contains the init scripts?
[/etc/init.d]
In which directory do you want to install the daemon files?
[/usr/sbin]
In which directory do you want to install the library files?
[/usr/lib/vmware-tools]
温碧霞的老公The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]
The installation of VMware Tools 8.4.6 build-385536 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes] 黄圣依嫌弃网友
Making sure services for VMware Tools are stopped.
The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmmemctl to override.
Before you can compile modules, you need to have the
make
gcc
kernel headers of the running kernel
Searching
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
高以翔Would you like to change it? [no]
Searching for a valid kernel
Detected the kernel headers of the running kernel at
"/lib/modules/2.6.38-8-generic/build/include".
The path "/lib/modules/2.6.38-8-generic/build/include" appears to be a valid
path to the kernel headers of the running kernel.
Would you like to change it? [no]
Using 2.6.x kernel build system.
发布评论