[FrontPage] [TitleIndex] [WordIndex

This is a read-only archived version of wiki.centos.org

FOG 项目(0.30 版本)在 CentOS 5.X 的安装

1. 什么是 FOG?

转自 http://www.fogproject.org/?q=node/1

FOG 是一个基于 Linux,自由开源的支持 Windows XP,Vista 和 7 的计算机镜像解决方案,它绑定了一部分开源的工具,同时带有一个基于 php 的网络接口。FOG 不使用任何启动磁盘或者 CD;任何事情都通过 TFTP 以及 PXE 完成。fog 同时在内核中内建了许多驱动,因此你完全不需要担心驱动的问题(除非它不存在一个 linux 内核)。FOG 同时支持将一个计算机上 80GB 分区上的镜像放置到带有 40GB硬盘 的机器上,只要实际的数据量少于40GB。Fog 同时包含了一个图形界面的 Windows 服务,用以更改 PC 的计算名,按照计划任务重新计算机,以及自动导入主机到 FOG 数据库中。这个服务同时还会安装打印机和一些简单管理单元。

2. CentOS 5.X 的 FOG

下载 FOG 0.30 源代码(http://sourceforge.net/projects/freeghost/files/),同时下载当前的 RPM Forge(http://packages.sw.be/rpmforge-release/),简单起见,我们把文件都保存到桌面。要在 CentOS 下成功安装 FOG,我们首先需要做一些改变,请参考此处描述的要点(http://www.fogproject.org/wiki/index.php?title=Installation_on_CentOS_5.3#Installing_0.29_and_0.30)。

首先安装 RPMforge 包(Installing RPMforge)。

接下来我们需要编辑位于 fog_0.30/lib/redhat/config.sh 的安装脚本

Edit line 22 we need to remove 'php-gettext' and change 'clam-update' to 'clamav'
Edit line 63 to read 'freshDB="var/clamav/";
Edit line 66 to read 'freshcron="/usr/sbin/freshclam"

编辑完成之后,保存退出。

现在我们可以开始安装(我们假设 FOG 安装文件夹在当前用户的桌面上),开启一个终端,输入

$ cd Desktop
$ cd fog_0.30
$ cd bin
$ ./installfog.sh

现在应该可以看到安装程序启动

Version: 0.30 Installer/Updater
What version of Linux would you like to run the installation for?
1) Redhat Based Linux (Fedora, CentOS)
2) Ubuntu Based Linux (Kubuntu, Edubuntu)

此处为 CentOS 安装选择 [1]

Staring Redhat Installation.
FOG Server installation modes:
* Normal Server: (Choice N)
This is the typical installation type and
will install all FOG components for you on this
machine. Pick this option if you are unsure what to pick.
* Storage Node: (Choice S)
This install mode will only install the software required
to make this server act as a node in a storage group
More information:
http://www.fogproject.org/wiki/index.php?title=InstallationModes
What type of installation would you like to do?

此处提示,选择执行一个常规安装(Normal [N] install)

What is the IP address to be used by this FOG Server? [XXX.XXX.XXX.XX3]

这里会自动获得你 eth0 的 IP 地址(无论是静态的还是 DHCP 的),稍后我们需要将 PXE 网络通信转发到这个地址

Would you like to setup a router address for the DHCP server? [Y/n]

此处选择 [Y]

What is the IP address to be used for the router on the DHCP server? [XXX.XXX.XXX.XX4]

这里会自动获得你的路由器地址,如果不正确你可以进行指定

Would you like to setup a DNS address for the DHCP server and client boot image? [Y/n]

此处选择 [Y]

What is the IP address to be used for DNS on the DHCP server and client boot image?
[XXX.XXX.XXX.2]

这里会自动获得你的 DNS 地址,如果不正确你可以进行指定

Would you like to change the default network interface from eth0?
If you are not sure, select No. [y/N]

如果你对默认的适配器很满意,那么选择 [N]

Would you like to use the FOG server for dhcp service? [Y/n]

因为我们使用现有的 DHCP 服务器,因此此处选择 [N]

DHCP will not be setup but you must setup your
current DHCP server to use FOG for pxe services.
On a Linux DHCP server you must set:
next-server
On a Windows DHCP server you must set:
option 066 & 067

这部分的内容很重要,因为你的网络组需要将你 eth0 网卡的 PXE 网络通信转发到你的 IP 地址,在一个 Linux 路由器上,需要指定 "next-server XXX.XXX.XXX.XX3" 以及文件名 "pxelinux0"

This version of FOG has internationalization support, would
you like to install the additional language packs? [Y/n]

按照需要安装语言支持

FOG now has everything it needs to setup your server, but please
understand that this script will overwrite any setting you may
have setup for services like DHCP, apache, pxe, tftp, and NFS.
It is not recommended that you install this on a production system
as this script modifies many of your system settings.
This script should be run by the root user on Fedora, or with sudo on Ubuntu.
Here are the settings FOG will use:
Distro: Redhat
Installation Type: Normal Server
Server IP Address: XXX.XXX.XXX.XX3
DHCP router Address: XXX.XXX.XXX.XX4
DHCP DNS Address: XXX.XXX.XXX.2
Interface: eth0
Using FOG DHCP: 0
Internationalization: 0
Are you sure you wish to continue (Y/N)

输入 [Y] 确认后,开始安装进程

现在可以安装 FOG 网络服务, TFTP,mysql 等,如果你还没有安装。一旦安装完成,你将会被询问是否要把成功安装的信息发送给 FOG 项目。

最后我们需要为 iptables 关闭等设置如下的 4 个命令

$ service iptables stop
$ service ip6tables stop
$ chkconfig iptables off
$ chkconfig ip6tables off

现在你可以导航到 http://XXX.XXX.XXX.XX3/fog/ 并且使用默认的用户名 "fog" 和默认的密码 "password" 登陆。出于安全原因,请立即删除这个账户,并且创建一个新账户。

服务器上发生的一些变更

Services
/etc/init.d/FOGImageReplicator
/etc/init.d/FOGMulticastManager
/etc/init.d/FOGScheduler
Created Databases in mysql
fog
Creates Directorys
/var/www/fog
/opt/fog
/tftpboot
/images
Creates System User
fog (with random generated password)


AlexGoffe

Translation of revision 3


2023-09-11 07:23