第一步: 安装ftp 以及dns服务
rpm –ivh 服务包名
service 服务名 start restart 并将系统导入、var/ftp/pub目录下啊
具体实现步骤为 创建挂载点/mnt/cdrom
挂载 mount /dev/cdrom/ mnt/cdrom
进入/mnt/cdrom 执行cp –a –r * /var/ftp/pub 将相应文件复制到pub目录下
[root@localhost ftp]# cd pub/
[root@localhost pub]# ll
?昏. 5764
dr-xr-xr-x 3 root root
4096 2009-08-19 Cluster
dr-xr-xr-x 3 root root
4096 2009-08-19 ClusterStorage
-r--r--r-- 1 root root
8445 2008-09-03 EULA
-r--r--r-- 1 root root
8445 2009-08-04 eula.en_US
-r--r--r-- 1 root root 18416 2006-12-01 GPL
dr-xr-xr-x 4 root root
4096 2009-08-19 p_w_picpaths
dr-xr-xr-x 2 root root
4096 2009-08-19 isolinux
-rw-r--r-- 1 root root
1443 02-26 00:24 ks.cfg
-r--r--r-- 1 root root
9310 2009-08-13 README-en
-r--r--r-- 1 root root 19763 2009-08-13 README-en.html
-r--r--r-- 1 root root 137669 2009-08-13 RELEASE-NOTES-as.html
-r--r--r-- 1 root root 148174 2009-08-13 RELEASE-NOTES-bn.html
-r--r--r-- 1 root root 85767 2009-08-13 RELEASE-NOTES-de.html
-r--r--r-- 1 root root 61011 2009-08-13 RELEASE-NOTES-en
-r--r--r-- 1 root root 80344 2009-08-13 RELEASE-NOTES-en.html
-r--r--r-- 1 root root 87977 2009-08-13 RELEASE-NOTES-es.html
-r--r--r-- 1 root root 90627 2009-08-13 RELEASE-NOTES-fr.html
-r--r--r-- 1 root root 131998 2009-08-13 RELEASE-NOTES-gu.html
-r--r--r-- 1 root root 132218 2009-08-13 RELEASE-NOTES-hi.html
-r--r--r-- 1 root root 86266 2009-08-13 RELEASE-NOTES-it.html
-r--r--r-- 1 root root 95511 2009-08-13 RELEASE-NOTES-ja.html
-r--r--r-- 1 root root 148308 2009-08-13 RELEASE-NOTES-kn.html
-r--r--r-- 1 root root 88701 2009-08-13 RELEASE-NOTES-ko.html
-r--r--r-- 1 root root 154019 2009-08-13 RELEASE-NOTES-ml.html
-r--r--r-- 1 root root 129649 2009-08-13 RELEASE-NOTES-mr.html
-r--r--r-- 1 root root 139801 2009-08-13 RELEASE-NOTES-or.html
-r--r--r-- 1 root root 105863 2009-08-13 RELEASE-NOTES-pa.html
-r--r--r-- 1 root root 86703 2009-08-13 RELEASE-NOTES-pt_BR.html
-r--r--r-- 1 root root 102748 2009-08-13 RELEASE-NOTES-ru.html
-r--r--r-- 1 root root 80339 2009-08-13 RELEASE-NOTES-si.html
-r--r--r-- 1 root root 138814 2009-08-13 RELEASE-NOTES-ta.html
-r--r--r-- 1 root root 139321 2009-08-13 RELEASE-NOTES-te.html
-r--r--r-- 1 root root 137669 2009-08-13 RELEASE-NOTES-U4-as.html
-r--r--r-- 1 root root 148174 2009-08-13 RELEASE-NOTES-U4-bn.html
-r--r--r-- 1 root root 85767 2009-08-13 RELEASE-NOTES-U4-de.html
-r--r--r-- 1 root root 61011 2009-08-13 RELEASE-NOTES-U4-en
-r--r--r-- 1 root root 80344 2009-08-13 RELEASE-NOTES-U4-en.html
-r--r--r-- 1 root root 87977 2009-08-13 RELEASE-NOTES-U4-es.html
-r--r--r-- 1 root root 90627 2009-08-13 RELEASE-NOTES-U4-fr.html
-r--r--r-- 1 root root 131998 2009-08-13 RELEASE-NOTES-U4-gu.html
-r--r--r-- 1 root root 132218 2009-08-13 RELEASE-NOTES-U4-hi.html
-r--r--r-- 1 root root 86266 2009-08-13 RELEASE-NOTES-U4-it.html
-r--r--r-- 1 root root 95511 2009-08-13 RELEASE-NOTES-U4-ja.html
-r--r--r-- 1 root root 148308 2009-08-13 RELEASE-NOTES-U4-kn.html
-r--r--r-- 1 root root 88701 2009-08-13 RELEASE-NOTES-U4-ko.html
-r--r--r-- 1 root root 154019 2009-08-13 RELEASE-NOTES-U4-ml.html
-r--r--r-- 1 root root 129649 2009-08-13 RELEASE-NOTES-U4-mr.html
-r--r--r-- 1 root root 139801 2009-08-13 RELEASE-NOTES-U4-or.html
-r--r--r-- 1 root root 105863 2009-08-13 RELEASE-NOTES-U4-pa.html
-r--r--r-- 1 root root 86703 2009-08-13 RELEASE-NOTES-U4-pt_BR.html
-r--r--r-- 1 root root 102748 2009-08-13 RELEASE-NOTES-U4-ru.html
-r--r--r-- 1 root root 80339 2009-08-13 RELEASE-NOTES-U4-si.html
-r--r--r-- 1 root root 138814 2009-08-13 RELEASE-NOTES-U4-ta.html
-r--r--r-- 1 root root 139321 2009-08-13 RELEASE-NOTES-U4-te.html
-r--r--r-- 1 root root 100745 2009-08-13 RELEASE-NOTES-U4-zh_CN.html
-r--r--r-- 1 root root 105773 2009-08-13 RELEASE-NOTES-U4-zh_TW.html
-r--r--r-- 1 root root 100745 2009-08-13 RELEASE-NOTES-zh_CN.html
-r--r--r-- 1 root root 105773 2009-08-13 RELEASE-NOTES-zh_TW.html
-r--r--r-- 1 root root
1706 2009-08-04 RPM-GPG-KEY-redhat-beta
-r--r--r-- 1 root root
1164 2009-08-04 RPM-GPG-KEY-redhat-release
dr-xr-xr-x 3 root root 151552 2009-08-19 Server
-r--r--r-- 1 root root 14594 2009-08-19 TRANS.TBL
dr-xr-xr-x 3 root root
4096 2009-08-19 VT
[root@localhost pub]#
其中p_w_picpath里的iso.Boot实现光盘引导
进入 dhcp 的主配置文件 dhcpd.conf 并将/usr/share/doc/dhcp*/dhcp.conf.sample文件内容导入并修改相应配置
[root@localhost ~]# vim /etc/dhcpd.conf
#
ddns-update-style interim;
ignore client-updates;
subnet 192.168.101.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 192.168.1.1;
option time-offset -18000; # Eastern Standard Time
#
option ntp-servers 192.168.1.1;
#
option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#
option netbios-node-type 2;
range dynamic-bootp 192.168.101.10 192.168.101.100;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
# DHCP Server Configuration file.
#
see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
第二步:配置yum
1 [rhel-server]
2 name=Red Hat Enterprise Linux server
3 baseurl=file:///mnt/cdrom/Server
4 enabled=1
5 gpgcheck=1
6 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
7 [rhel-vt]
8 name=Red Hat Enterprise Linux vt
9 baseurl=file:///mnt/cdrom/VT
10 enabled=1
11 gpgcheck=1
12 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
13 [rhel-cluster]
14 name=Red Hat Enterprise Linux cluster
15 baseurl=file:///mnt/cdrom/Cluster
16 enabled=1
17 gpgcheck=1
18 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
19 [rhel-clusterstorag]
20 name=Red Hat Enterprise Linux clusterstorage
21 baseurl=file:///mnt/cdrom/ClusterStorage
22 enabled=1
23 gpgcheck=1
24 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
第三部,安装system-config-kiksstart.noarch
其依赖于yum工具进行安装,yum可以很好的解决包与包之间的依赖关系
启动kickstart 这只能在图形界面下进行操作
启动命令为 system-config-kickstart
对其进行配置,并将其保存到pub目录下,对其进行编译,将key --skip加入并重启服务
[root@localhost pub]# vim ks.cfg
#platform=x86, AMD64, ?.Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --append="quiet" --location=mbr
# Clear the Master Boot Record
zerombr
key --skip
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
text
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang zh_CN
# Installation logging level
logging --level=info
# Use network installation
url --url=ftp://192.168.101.2/pub
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw --iscrypted $1$naCqaKbf$IXDKakv8mPbXAWUfWv0ZG/
# SELinux configuration
selinux --permissive
# System timezone
timezone America/New_York
# Install OS instead of upgrade
install
# X Window System configuration information
xconfig --defaultdesktop=GNOME --depth=8 --resolution=800x600
# Disk partitioning information
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=100
part / --bytes-per-inode=4096 --fstype="ext3" --size=10240
part swap --bytes-per-inode=4096 --fstype="swap" --size=512
%packages
@x-software-development
@system-tools
@admin-tools
@legacy-software-development
@chinese-support
@gnome-software-development
@web-server
@graphics
@dns-server
@office
@text-internet
@java-development
@editors