Ubuntu Server 12.04.01 Installation Notes
Original Chinese title: ubuntu server 12.04.01 installed note
Problems Encountered
- I had a 1:5 Hadoop 1.9 cluster on hand, made up of retired non-production machines from a much earlier upgrade. They originally ran CentOS 5.4, and before being folded into the cluster, different groups had used them for coding—so every machine had different software versions, and some even had a GUI installed.
- Setting up the cluster back then was pure torture. Fortunately, this batch of machines was just retired as a whole, so I reconfigured the hardware. Unfortunately, the 1U chassis only has a single drive bay, so I could only upgrade the RAM. In the end, I put together four machines with 2 GB RAM and 160 GB hard drives to build a fresh cluster for coding and testing.
Funny enough, nobody else in our department works on this stuff—even though big data is getting hotter in the GIS community, still…
- The machines are really old (i686). My first mistake was overlooking that and grabbing an x64 CentOS image. And given my painful past experience trying to install CentOS from a USB stick, USB installation was the first thing I ruled out.
- The machines support PXE, but we didn’t have a PXE server ready. I happened to have an Ubuntu Server ISO lying around, and since the old machines only have a CD-ROM drive, I figured I’d give Ubuntu a try.
Installation
-
Booting from CD was super easy—knowing just a bit of English is enough to get through the whole install, or you can just pick Chinese if you don’t. Leaving partitioning and everything else at the defaults works fine.
-
The whole process was fast; it took me about 20 minutes to redo one machine. One slightly odd thing was that it didn’t ask to set a
rootpassword, only to create a new user. -
A quick Baidu search revealed that Ubuntu Server assigns a random password to
root, so you have to enablerootmanually:$ sudo passwd root enter your current passwd enter root passwd comfirm
LVM
- You can enable LVM during installation. I hadn’t run into it before, so I checked the wiki and learned it adds an extra layer between the filesystem and the partitions, allowing virtually unlimited expansion.
- For example, if your
/vardirectory runs out of space, you just hook up another hard drive. - Though with only one drive bay, what’s the point for me?
- Still, looking through some of the commands was pretty interesting. When I have time, I should read up on how LVM works under the hood and write up a doc.
- Just installing four machines already took quite a while, so I haven’t started setting up the environment yet—plus the lab’s internet went down.
- One thing to note: when installing an OS, try to plug into the motherboard ports directly. I’ve run into BIOS POST hanging because it couldn’t detect the keyboard when plugged into the case’s front-panel ports multiple times.
That’s about it.
遇到的问题
- 手上有一个1:5的hadoop 1.9的集群,用的是很久之前更新的时候退下来,非生产环境。之前装的是centos 5.4 ,在归入集群之前分别被不同的组拿去写代码,所以几个机器上的各个版本都不同,有的还装了GUI。
- 当时配集群的时候就是一种磨难,这次正好这批机器整体退了下来。对硬件重组了,可惜1U的机器只有一个硬盘位。只能扩一下内存。最后重组了4台 ram 2G 160硬盘的机器。重新做一个集群拿来编程和测试。
话说我们系也没人搞这个,虽然bigdata这类在GIS圈越来越热,但是…
- 机器太老,i686,第一个错误就是没注意这点找了一个x84的centos。由于之前有惨痛的使用u盘安装centos的经历。所以U盘安装第一个被我pass了。
- 机器是支持PXE,但是没有现成了server。刚好手上有ubuntu server 的iso。老机器只有CD-ROM,索性尝试下ubuntu。
安装
-
cd启动,很简单,稍微懂一些英文就能完成整个安装,当然你如果不懂选择中文就好了。分区什么的都选默认的就行。
-
整个过程很快,我用了大概20分钟就完成一个机器的重做。有一个地方比较奇怪就是没有设置root的password,而只有新建一个用户。
-
百度之,原来ubuntu server的 root用的随机密码。需要手动开启root。
$ sudo passwd root enter your current passwd enter root passwd comfirm
LVM
- 安装的时候可以开启LVM,之前没有遇到了,看了一下wiki知道这其实就在文件系统和分区层之间又加了一层,可以做无限扩展。
- 比如你/var 目录空间不足了。挂一块硬盘就行了。
- 话说我就一个硬盘位,有毛用。
- 不过看了一些命令还是挺有意思的,有时间应该看一些lvm的原理和实现,整理出一个文档。
- 因为装了4太机器就已经很费时间了,所有还么开始配环境,而且实验室还断网了
- 有点注意就是在装机的时候尽量都使用主板插口,我已经遇到了多次bios 自检过不去找不到键盘是因为插在机箱的口上的情况。