您的位置:首页 > 其它

如何通过编译内核来安装Mosix?

2006-02-03 19:36 483 查看
这是我2003年做Mosix集群时写的,放这里备忘。

开始安装Mosix之前你需要确定你已经安装了Linux,其发行版本在RedHat 5.1以上,或SuSE 6.0以上,你有Linux内核2.4.9版本的源码,且已经被正确地解压缩到/usr/src/linux-2.4.9目录下,这一点很重要,如果没有源码,请从Internet上下载。然后解压缩包文件,
tar zxvf linux-2.4.9.tar.gz
确认编译内核所需的软件环境。
Make 版本 3.77 以上
Gcc 版本 2.91.66 (egcs 1.1.2)以上
Binutils 版本 2.9.1.0.25 以上
如果没有以上软件,请从Linux的发行光盘上追加,或从Internet上下载。
开始安装:
以超级用户登录,
先备份系统内核,将/boot/目录下的Linux内核复制到其他目录下。用LILO将其设置成另一个新的启动选项。
下载Mosix的压缩包MOSIX-1.3.0.tar.gz,将其保存到相应的目录下,
解压缩包文件:
tar xzf MOSIX-1.3.0.tar.gz
运行安装程序:
cd MOSIX-1.3.0
./mosix.install
Mosix在安装过程中会修改以下文件,它们原来的配置都被加了".pre_mosix"的扩展名。
- /etc/inittab
- /etc/inetd.conf and/or /etc/xinetd.d/*
- /etc/lilo.conf
- /etc/rc.d/init.d/atd
- /etc/cron.daily/slocate.cron
如果要卸载Mosix,用以下的命令:
./mosix.install --uninstall
 
以下是完整的安装过程,安装过程中有很多选项需要设置,直接回车使用默认设置:

[root@linux /boot]# cd /usr

[root@linux /usr]# cd MOSIX-1.3.0

[root@linux MOSIX-1.3.0]# ./mosix.install

Please specify the location of the plain (non-MOSIX) Linux-2.4.9

kernel sources: it can be either a directory, a compressed tar file

(with a .gz or .bz2 extension) or `-' to skip the kernel installation.

Linux sources (default=/usr/src/linux-2.4.9) :-

Trim kernel #endif suffixes (some compilers require it) [Y/n] :-

Would you like the new kernel to be added to lilo [Y/n] :-

It is highly recommended to create symbolic links from /usr/include

to the kernel's include directory.

OK to create those links now? [Y/n] :-

In which run-levels to run MOSIX? (`-' for none; default=2345) :-

Create an MFS mount point now [Y/n] :-

(注:以下开始内核编译选项的配置,选择config进入命令行进行逐项设置,如果在X Window下,推荐使用xconfig选项,它是一个窗口型的配置界面,比较清晰。)

Which configuration method to use:

config, xconfig or menuconfig (default) :- xconfig

Do you need to watch the kernel compilation details [y/N] :-

Do you need to watch the user-level compilation details [y/N] :-

Begin installation...

Patching kernel...

Running make xconfig...

Compiling the Kernel:

Checking dependencies...

shmiq.c:58: asm/shmiq.h: No such file or directory (注:出错信息)

shmiq.c:59: asm/gfx.h: No such file or directory

Compiling the main kernel...

comm.c: In function `comm_take_urgent': (注:出错信息)

comm.c:2070: warning: unused variable `was'

dmi_scan.c:181: warning: `disable_ide_dma' defined but not used

Root device is (3, 2)

Boot sector 512 bytes.

Setup is 2399 bytes.

System is 875 kB

Compiling the kernel modules...

Installing the kernel modules...

Kernel compiled successfully. (注:内核编译完成)

Added linux

Added dos

Added mosix-1.3.0 *

Making the user-level MOSIX programs...

Compiling MOSIX Utilities (注:编译Mosix管理工具)

a - libmosix.o

a - dadvise.o

a - msxctl.o

Installing MOSIX Utilities

Installing MOSIX utilties in /tmp/mosix_user/tmp/usr

MOSIX installation complete:

MOSIX-1.3.0 for linux-2.4.9

[root@linux MOSIX-1.3.0]#

安装好Mosix后,需要设置/etc/mosix.map文件:

#第一项:本网段中第一个MOSIX节点的节点号

#第二项:该MOSIX节点的IP地址

#第三项:本网段中MOSIX节点的节点总数

1 200.200.120.1 6

设置完成后重新启动机器,你会发现启动选项里多了一项“MOSIX”,选择这一项,你就进入了Mosix的世界。

你可以执行“mon”来监视Mosix的运行,也可以下载一个运行于XWINDOW的Mosix监控程序MOSIXVIEW来监视Mosix的运行状况。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: