记录如何在 VMWare 中安装 ubuntu 9.04
安装“空白”的系统
重点说2件事情:1)语言选择英文;2)注意分好区。
装完重启后登录进入系统即可。
修改控制台分辨率
按顺序执行下面的设置:
sudo vi /etc/initramfs-tools/modules 添加2行内容:
fbcon
vesafb
sudo vi /etc/modprobe.d/blacklist-framebuffer 删除这一行:
blacklist vesafb
sudo update-initramfs –u
sudo vi /boot/grub/menu.lst 找到 kernel 行,修改其 vga 参数为788(16bit,800×600):
说明:如果是ubuntu 9.10以上版本,则应该修改 /boot/grub/grub.conf
设置网卡
查看NAT的网关地址
配置IP地址
sudo vi /etc/network/interfaces 内容改成下面的:
auto eth0
iface eth0 inet static
address 192.168.222.11
netmask 255.255.255.0
gateway 192.168.222.2
设置更新源
更改源服务器
sudo vi /etc/apt/sources.list 内容改成下面的:
deb http://tel.mirrors.163.com/ubuntu/ lucid main restricted universe multiverse
deb http://tel.mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://tel.mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://tel.mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://tel.mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://tel.mirrors.163.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://tel.mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://tel.mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://tel.mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://tel.mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse
下面是9.04版本的源,有的时候可能有用:
deb http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
更新软件包列表
sudo apt-get update
更新所有的软件
sudo apt-get upgrade
安装Samba
sudo apt-get install samba
安装完毕即可使用,默认是这个样子的:
添加系统用户
sudo adduser samba
添加Samba用户
sudo smbpasswd –a samba
在Window中添加同名、同密码的用户
修改Samba配置文件
sudo vi /etc/samba/smb.conf
重启服务
sudo /etc/init.d/samba restart
到此,一个“空白”的ubuntu服务器就准备好了,接下来备份一个,就可以用于制作各种专门服务器了。
说明:vmware虚拟机的磁盘镜像文件复制以后,网卡mac地址会变掉导致网卡无法使用。因此,复制以后,需要进入操作系统运行:
1、sudo rm /etc/udev/rules.d/70-persistent-net.rules
2、sudo shutdown –r now
这样就可以使用了。当然,还要按照需要修改网卡地址。