Ubuntu安装后的一些配置
ubuntu安装后root用户是禁用的,首先使用以下命令
sudo passwd root 启用 root 帐号 (也就是 设置一个口令) 使用
当你使用完毕后屏蔽 root 帐号 使用sudo passwd root命令
也可以直接使用sudo -s -H命令切换到root下,
一、安装VMware Tools
首先说明一下我的版本,vmware station6.03 ubuntu8.04,
因为这个与版本有点关系,我经过了一两的探索发现了,详细见我的另一篇日志
进入到ubuntu中,点击 vm----install vmtools ,一会vm将会自动将镜像挂载上,
使用命令cd /tmp切换到tmp目录下
cp /media/cdrom/VM******.tar.gz ./(**号那些省了)
解压:tar zxvf VM****.tar.gz
进入解压后的目录
cd vm***lib
执行脚本:
./vm**install.pl
# 安装过程的画面,全部使用默认值,一直按 Enter 就对了
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/rc.d]
What is the directory that contains the init scripts?
[/etc/rc.d/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]
Thepath "/usr/lib/vmware-tools" does not exist currently. This programisgoingto create it, including needed parent directories. Is thiswhatyou want?
[yes]
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
Thepath "/usr/share/doc/vmware-tools" does not exist currently.Thisprogram isgoing to create it, including needed parent directories.Isthis what you want?
[yes]
The installation of VMware Tools 5.5.1 build-19175 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]
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ 确定 ]
Trying to find a suitable vmhgfs module for your running kernel.
The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.
pcnet32 30153 0
Unloading pcnet32 module
Trying to find a suitable vmxnet module for your running kernel.
The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.
Detected X.org version 6.8.
关闭控制台鼠标服务: [ 确定 ]
启动控制台鼠标服务: [ 确定 ]
Please choose one of the following display sizes (1 - 13):
# 显示分辨率,这里是以 1024x768 为例
# VMware Tools 安装的时候,会自动修改 X server 的配置文件
[1] "640x480"
[2]< "800x600"
[3] "1024x768"
[4] "1152x864"
[5] "1280x800"
[6] "1152x900"
[7] "1280x1024"
[8] "1376x1032"
[9] "1400x1050"
[10] "1680x1050"
[11] "1600x1200"
[12] "1920x1200"
[13] "2364x1773"
Please enter a number between 1 and 13:
[2] 3
X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.9-34.EL i686 [ELF]
Current Operating System: Linux rd01.domain 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686
Build Date: 04 May 2006
Build Host: x8664-build.centos.org
Before reporting problems, check
to make sure that you have the latest version.
Module Loader present
OSKernel: Linux version 2.6.9-34.EL () (gccversion3.4.5 20051201 (Red Hat 3.4.5-2)) #1 Wed Mar 8 00:07:35 CST 2006P
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/vmware-config0/XF86ConfigLog.3131", Time: Mon Jun 12 20:57:34 2006
(++) Using config file: "/tmp/vmware-config0/XF86Config.3131"
(WW) VMWARE(0): Failed to set up write-combining range (0xf0000000,0x1000000)
X is running fine with the new config file.
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: [ 确定 ]
Guest filesystem driver: [ 确定 ]
DMA setup: [ 确定 ]
Guest operating system daemon: [ 确定 ]
The configuration of VMware Tools 5.5.1 build-19175 for Linux for this running
kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an XFree86 session.
To use the vmxnet driver, restart networking using the following commands:
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
depmod -a
modprobe vmxnet
/etc/init.d/network start
Enjoy,
--the VMware team
[root@rd01 vmware-tools-distrib]# shutdown -r now
# 修改完成之后,重新启动计算机,让 VMware Tools 生效
不过vm与ubuntu这两个版本的搭配,在共享文件上还是有点不尽人意,共享文件不能用,不过没关系
可以利用网络服务来使用
二、一些相关配置
1、安装ssh服务
sudo apt-get install openssh-server
按提示更新即可
2、安装minicom
sudo apt-get install minicom
按提示安装即可
关于minicom有相关设置见我的另一日志《Redhat9.0下minicom设置》
3、安装tftpd服务器
~$ sudo apt-get install tftpd-hpa tftp-hpa
PS:说明一下,其中tftpd-hpa是服务器端,tftp-hpa是客户端
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
将会安装下列额外的软件包:
openbsd-inetd
下列【新】软件包将被安装:
openbsd-inetd tftp-hpa tftpd-hpa
共升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 14 个软件未被升级。
需要下载 93.4kB 的软件包。
After this operation, 377kB of additional disk space will be used.
您希望继续执行吗?[Y/n]Y
获取:1 hardy/main openbsd-inetd 0.20050402-6 [34.9kB]
获取:2 hardy/main tftp-hpa 0.48-1ubuntu1 [23.8kB]
获取:3 hardy/main tftpd-hpa 0.48-1ubuntu1 [34.7kB]
下载 93.4kB,耗时 58s (1606B/s)
正在预设定软件包 ...
选中了曾被取消选择的软件包 openbsd-inetd。
(正在读取数据库 ... 系统当前总共安装有 95922 个文件和目录。)
正在解压缩 openbsd-inetd (从 .../openbsd-inetd_0.20050402-6_i386.deb) ...
选中了曾被取消选择的软件包 tftp-hpa。
正在解压缩 tftp-hpa (从 .../tftp-hpa_0.48-1ubuntu1_i386.deb) ...
选中了曾被取消选择的软件包 tftpd-hpa。
正在解压缩 tftpd-hpa (从 .../tftpd-hpa_0.48-1ubuntu1_i386.deb) ...
正在设置 openbsd-inetd (0.20050402-6) ...
* Stopping internet superserver inetd [ OK ]
* Not starting internet superserver: no services enabled.
正在设置 tftp-hpa (0.48-1ubuntu1) ...
正在设置 tftpd-hpa (0.48-1ubuntu1) ...
完成后
#apt-get install netkit-inetd
因为tftp是要inetd来控制的,而ubuntu类的系统,默认是没有安装inetd的,安装一下
修改/etc/inetd.conf
#emacs /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
#:INTERNAL: Internal services
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#daytime dgram udp wait root internal
#time stream tcp nowait root internal
#time dgram udp wait root internal
#tftp dgram udp wait nobody /usr/sbin/tcpd/usr/sbin/in.tftpd/tftpboot
重新加载inetd进程
#/etc/init.d/inetd reload
测试tftpd服务是否成功
tftp localhost
tftp> put mydoc.tar.gz
tftp> put test.log
tftp> get test.log
tftp> get mydoc.tar.gz
tftp>
上述表明在主机上测试tftp成功
对tftpd服务器进行一些相关设置(以下这一部分转自网络上)
打开/etc/default/tftpd-hpa它的配置文件。
打开的话可用gpedit /etc/default/tftpd-hpa
gpedit是一个默认安装的编辑器
#Defaults for tftpd-hpa
RUN_DAEMON="no"
OPTIONS="-l -s /var/lib/tftpboot"
修改设置如下:
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /home/zdreamx/tftpboot"
其中/home/zdreamx/tftpboot是自己设定的目录,可以根据情况修改。
选项参考
OPTIONS
-l Run the server in standalone (listen) mode, rather than run from
inetd. In listen mode, the -t option is ignored, and the -a
option can be used to specify a specific local address or port
to listen to.
-a [address][:port]
Specify a specific address and port to listen to when called
with the -l option. The default is to listen to the tftp port
specified in /etc/services on all local addresses.
listen 的 ip address 和 Port
-c Allow new files to be created. By default, tftpd will only
allow upload of files that already exist. Files are created
with default permissions allowing anyone to read or write them,
unless the -p or -U options are specified.
-s (决定tftp根目录)Change root directory on startup. This means the remote host
does not need to pass along the directory as part of the trans-
fer, and may add security. When -s is specified, exactly one
directory should be specified on the command line. The use of
this option is recommended for security as well as compatibility
with some boot ROMs which cannot be easily made to include a
directory name in its request.
重启OK
4、安装emacs编辑器
emacs 编辑器功能强大是进行开发中必不可少的工具之一
命令:
sudo apt-get install emacs
我安装时的详细情况如下:
sudo qpt-get install emacs
[sudo] password for yys:
sudo: qpt-get: command not found
sudo apt-get install emacs
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
将会安装下列额外的软件包:
emacs22-bin-common emacs22-common emacs22-gtk emacsen-common libgif4
liblockfile1
建议安装的软件包:
emacs22-el
下列【新】软件包将被安装:
emacs emacs22-bin-common emacs22-common emacs22-gtk emacsen-common libgif4
liblockfile1
共升级了 0 个软件包,新安装了 7 个软件包,要卸载 0 个软件包,有 14 个软件未被升级。
需要下载 20.8MB 的软件包。
After this operation, 65.1MB of additional disk space will be used.
您希望继续执行吗?[Y/n]Y
获取:1
http://security.ubuntu.com hardy-security/main emacs22-common 22.1-0ubuntu10.1 [18.6MB]
获取:2 hardy/main emacsen-common 1.4.17 [17.6kB]
获取:3 hardy/main liblockfile1 1.06.2 [14.8kB]
获取:4 hardy/main libgif4 4.1.6-4 [38.7kB]
获取:5
http://security.ubuntu.com hardy-security/main emacs22-bin-common 22.1-0ubuntu10.1 [163kB]
获取:6
http://security.ubuntu.com hardy-security/universe emacs22-gtk 22.1-0ubuntu10.1 [1950kB]
获取:7
http://security.ubuntu.com hardy-security/main emacs 22.1-0ubuntu10.1 [6338B]
下载 20.8MB,耗时 25min12s (13.7kB/s)
选中了曾被取消选择的软件包 emacsen-common。
(正在读取数据库 ... 系统当前总共安装有 95950 个文件和目录。)
正在解压缩 emacsen-common (从 .../emacsen-common_1.4.17_all.deb) ...
选中了曾被取消选择的软件包 emacs22-common。
正在解压缩 emacs22-common (从 .../emacs22-common_22.1-0ubuntu10.1_all.deb) ...
选中了曾被取消选择的软件包 liblockfile1。
正在解压缩 liblockfile1 (从 .../liblockfile1_1.06.2_i386.deb) ...
选中了曾被取消选择的软件包 emacs22-bin-common。
正在解压缩 emacs22-bin-common (从 .../emacs22-bin-common_22.1-0ubuntu10.1_i386.deb) ...
选中了曾被取消选择的软件包 libgif4。
正在解压缩 libgif4 (从 .../libgif4_4.1.6-4_i386.deb) ...
选中了曾被取消选择的软件包 emacs22-gtk。
正在解压缩 emacs22-gtk (从 .../emacs22-gtk_22.1-0ubuntu10.1_i386.deb) ...
选中了曾被取消选择的软件包 emacs。
正在解压缩 emacs (从 .../emacs_22.1-0ubuntu10.1_all.deb) ...
正在设置 emacsen-common (1.4.17) ...
emacsen-common: Handling install of emacsen flavor emacs
正在设置 emacs22-common (22.1-0ubuntu10.1) ...
正在设置 liblockfile1 (1.06.2) ...
正在设置 emacs22-bin-common (22.1-0ubuntu10.1) ...
正在设置 libgif4 (4.1.6-4) ...
正在设置 emacs22-gtk (22.1-0ubuntu10.1) ...
Byte-compiling add-on packages, please wait... done.
正在设置 emacs (22.1-0ubuntu10.1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
5、进行升级
sudo apt-get updata
进行漫长的升级
也可以安装汉字库
apt-get install language-pack-zh language-pack-zh-base language-support-zh
在系统登陆界面的“选项”中可以选择系统默认语言;在启动菜单的“系统”->“系统管理”->“语言支持”中也可以修改系统默认语言支持;
6、网络安装zmodem传输协议
这个可能会用到,先装上吧,以后省事
sudo apt-get install lrzsz
我的安装情况如下:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
下列【新】软件包将被安装:
lrzsz
共升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 40 个软件未被升级。
需要下载 97.0kB 的软件包。
After this operation, 262kB of additional disk space will be used.
获取:1 hardy/universe lrzsz 0.12.21-4.1 [97.0kB]
下载 97.0kB,耗时 11s (8642B/s)
选中了曾被取消选择的软件包 lrzsz。
(正在读取数据库 ... 系统当前总共安装有 97736 个文件和目录。)
正在解压缩 lrzsz (从 .../lrzsz_0.12.21-4.1_i386.deb) ...
正在设置 lrzsz (0.12.21-4.1) ...
7、输入法的安装
当你在安装时选择中文时,scim平台已经给你安装好了。但是还是无法输入中文,需要安装中文输入法
安装五笔输入法
sudo apt-get install scim-tables-zh
这样同时也安装了二笔,仓颉之类的输入法,可以scim设置中将不用的输入法关闭,将需要用的输入法,如拼音,五笔激活。不然切换时会很辛苦。
安装全拼输入法
sudo apt-get install scim-pinyin
8、记着升级一个库---libncurses5-dev
apt-get install libncurses5-dev
这个不升级你将会在编译u-boot与内核时通不过