[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