Kickstart unattended Installation RHEL6.5

Source: Internet
Author: User

Service environment:

[Email protected] ~]# uname-a #服务器必须是图形页面的才可以安装无人值守Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 2 9 11:47:41 EST x86_64 x86_64 x86_64 gnu/linux

Network environment:

[Email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0 device=eth0hwaddr=00:0c:29:a3:38:13type= Ethernetuuid=c4f52fd7-10a2-4aa4-b1f6-3f093e167d9fonboot=yesnm_controlled=yesbootproto=staticipaddr= 192.168.16.18netmask=255.255.255.0gateway=192.168.16.18

Requirements: Set up an unattended installation of Linux server, so that the client can automatically install the installation requirements, depending on the circumstances, according to the requirements of installation.

Preparation before installation:

[[Email protected] ~]# service iptables stop[[email protected] ~]# setenforce 0setenforce:selinux is disabled

Build local Yum Source

[[email protected] ~]# Vim/etc/yum.repos.d/rhel-source.repo ... ..... ... ..... ..... ..... ..........-.......-.................... omit part ... ... ..... .... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... Baseurl=file:///mnt/sr0enabled=1gpgcheck=0 ... ..... .... ... the omitted part of ..... ...... .... .....-.....-... the omission of ..................... the ellipsis is ..... ... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... [Email protected] ~]# mkdir/mnt/sr0/[[email protected] ~]# mount/dev/cdrom/mnt/sr0/

Installing the VSFTPD Service

[[email protected] ~]# yum-y install vsftpd[[email protected] ~]# mkdir/var/ftp/pub/dvd #建立一个共享的文件 [[Email Pro Tected] ~]# chmod 777/var/ftp/pub/dvd# give this file 777 permission

Installing TFTP

[[email protected] ~]# yum -y install tftptftp-server dhcp syslinux# TFTP and Tftp-server are installed in order to have TFTP configuration files, there are some installation TFTP there are some installed Tftp-server, DHCP service, syslinux installation will produce a kernel-related boot program [[email  Protected] ~]# vi /etc/xinetd.d/tftp ... ... omitted part of the ..................................................................................  of ..... omit the parts of the ....????????????????       server_args              = -s/tftpboot       #为了简单配置把路径修改的简单点         disable                  = no                #开启tftp服务 ......... ............................ Omit part ..... ..... ..... ....... ................ ........ ................... ....... [[email protected] ~]# service xinetd restart     # Because TFTP is based on the XINETD service, restart the XINETD service when rebooting [[email protected] ~]# mkdir /tftpboot        #创建tftp服务的文件 [[Email protected] ~]# chmod  777 /tftpboot       #给个权限

install DHCP service

[[email protected] ~]# yum -y install dhcp[[email protected] ~]#  cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf  #配置dhcp服务cp: Whether to overwrite "/etc/dhcp/ Dhcpd.conf "?  y[[email protected] ~]# vi /etc/dhcp/dhcpd.conf ... ..... ..... .... ..... .... ..... ....... ...................... Omit part ..............................................................................subnet 192.168.16.0 netmask 255.255.255.0 { range  192.168.16.20 192.168.16.50;           #这里初始IP不能是0, If 0 is not occupied, the host that gets to 0 cannot be found  option domain-name-servers 192.168.16.11;                #DNS  option routers 192.168.16.11;               #网关  default-lease-time 600;  max-lease-time 7200;  filename "pxelinux.0";            #指定文件名   next-server192.168.16.11;                     #指定tftp服务器的位置} .... ..... ....... .................................. The omitted part ..... ..... ....... ............... ....................... ........ [[Email protected] ~]# service dhcpd restart Close  dhcpd:                                                 [OK] starting  dhcpd:                                             [OK]

Configure shared system sources:

[[email protected] ~]# umount /dev/cdrom        # First unload the system disk that is already mounted [[email protected] ~]# mount /dev/cdrom/var/ftp/pub/dvd/      #把系统盘挂载到ftp共享的目录mount: block device /dev/sr0 iswrite-protected, mounting  Read-only[[email protected] ~]# service vsftpd restart[[email protected] ~] # cp/usr/share/syslinux/pxelinux.0 /tftpboot # pxelinux.0 is a boot file [[email protected]  ~]# mkdir/tftpboot/pxelinux.cfg           # Create a configuration default boot file [[email protected] ~]# cp/var/ftp/pub/dvd/isolinux/isolinux.cfg /tftpboot/ pxelinux.cfg/default  #把系统的引导文件拷贝到共享目录下并且必须改名为default [[email protected] ~]# cd/tftpboot/ pxelinux.cfg/[[email protected] pxelinux.cfg]# lsdefault[[email protected]  Pxelinux.cfg]# chmod 644default          #为了不然别人更改给赋予权限 [[email protected]  pxelinux.cfg]# cp/var/ftp/pub/dvd/isolinux/* /tftpboot/  #把光盘的引导相关文件都拷贝到tftp的工作目录里

start related services:

[[email protected] ~]# service dhcpd restart                 #重启一下服务关闭  dhcpd:                                                 [OK] starting  dhcpd:                                             [Determine][[email  Protected] ~]# service vsftpd restart Close  vsftpd:                                                [OK] for   vsftpd  Start  vsftpd:                                      [OK][[email protected] ~]# service xinetd restart stop  xinetd:                                                [OK] starting  xinetd:                                             [Determine][[emaIl protected] ~]# chkconfig dhcpd on[[email protected] ~]# chkconfig  vsftpd on[[email protected] ~]# chkconfig xinetd on

Client-side testing requires manual intervention. Kickstart is not installed:

Enter BIOS,

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/1F/wKiom1WSQELz4sICAAEKYpL61Fc965.jpg "title=" QQ picture 20150630150528.png "alt=" Wkiom1wsqelz4sicaaekypl61fc965.jpg "/>

Set Network boot from Intel E1000 is the first boot, save the boot system and enter the system. The system obtains the IP itself into the shared image after it has been acquired. installation requires manual selection. Test:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/1C/wKioL1WSQsKjvGhzAAHNeDuwFG4367.jpg "title=" QQ picture 20150630151037.png "alt=" Wkiol1wsqskjvghzaahneduwfg4367.jpg "/>

This needs to wait 60 seconds. If you do not want to wait

/tftpboot/pxelinux.cfg/default modification

#prompt 1
Timeout #把600修改小点就可以了

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/1F/wKiom1WSQ8GjysWeAAEd6jP86sA387.jpg "title=" QQ picture 20150630151607.png "alt=" Wkiom1wsq8gjysweaaed6jp86sa387.jpg "/>

Cancel without ks.cfg file

The first step: Select the language. Step two, choose Keyboard mode

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/1C/wKioL1WSRg-QaH1dAADGGpqzhJ4541.jpg "title=" QQ picture 20150630152426.png "alt=" Wkiol1wsrg-qah1daadggpqzhj4541.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/1C/wKioL1WSRtTzOuPZAAFxANvYsz8781.jpg "title=" QQ picture 20150630152659.png "alt=" Wkiol1wsrttzoupzaafxanvysz8781.jpg "/>

Step Three: Installation Method, select the URL OK---OK---ftp://192.168.16.11/pub/dvd/images/install.img , select OK

Here is how to install the optical drive installation.

Client Unattended Testing:

Server Installation Kickstart

[email protected] ~]# yum installsystem-config-kickstart.noarch[[email protected] ~]# System-config-kickstart #必须在图像桌 Run under Face

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/1C/wKioL1WSSBWw653PAAJ7M77SMGc341.jpg "title=" QQ picture 20150630141543.png "alt=" Wkiol1wssbww653paaj7m77smgc341.jpg "/>

Basic settings, installation type, grub option, installation option settings are not set here in boot loader options

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/1D/wKioL1WSTe-Sb2sVAAGUquPNSYQ031.jpg "title=" QQ picture 20150630155612.png "alt=" Wkiol1wste-sb2svaaguqupnsyq031.jpg "/>

Installation method

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/20/wKiom1WSR6vgMyH3AAHA70_t-xo610.jpg "title=" QQ picture 20150630153828.png "alt=" Wkiom1wsr6vgmyh3aaha70_t-xo610.jpg "/>

Partition information: If the new machine can be added in the partition, if not the new confidential delete the existing partition. Network configuration can be installed in the machine after the IP, you can also use the static after the configuration according to their own needs to do the corresponding configuration.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/20/wKiom1WSSFehhsH5AAKhGxz0aWc675.jpg "title=" QQ picture 20150630141817.png "alt=" Wkiom1wssfehhsh5aakhgxz0awc675.jpg "/>

Packages can feel like they need to, select the appropriate package.

After setting, select File Save;

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/20/wKiom1WSSLLjp4bQAAIsMiFG10I436.jpg "title=" QQ picture 20150630141843.png "alt=" Wkiom1wsslljp4bqaaismifg10i436.jpg "/>

Save the configured file to the root folder:

[[email protected] ~]# ls #可以看到刚刚配置的anaconda-ks.cfg install.log.syslog public video document music Install.log ks.cfg Template Picture Download desktop

Setting up a client startup configuration file

[Email protected] ~]# cp-a ks.cfg/var/ftp/pub/[[email protected] ~]# vi/tftpboot/pxelinux.cfg/default ..... ..... ..... ..... ....... ................. ............... The omitted part ... ... .... ... .... ... .... ... .... ... .... ... .... ... .... .... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... label Linux menu label ^install or upgrade an existing system menu default Kernel Vmlinuz AP Pend initrd=initrd.img ks=ftp://192.168.16.18/pub/ks.cfg #指定一下

Client direct boot, BIOS boot entry select NIC Boot

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/1D/wKioL1WSTo3yjQ9QAAD0ViB9dh8208.jpg "title=" QQ picture 20150630160013.png "alt=" Wkiol1wsto3yjq9qaad0vib9dh8208.jpg "/>

If it's an error, don't worry about it.

If the installation type is set, it will be installed directly, I do not set it so I have to choose

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/1D/wKioL1WST07z_rw1AAIaK7zBnJc229.jpg "title=" QQ picture 20150630160155.png "alt=" Wkiol1wst07z_rw1aaiak7zbnjc229.jpg "/>

Select Use all space Next, wait for the installation to complete.

If there is an error solution:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/21/wKiom1WSTzLRJQ4VAAF0R2Wts0k978.jpg "title=" QQ picture 20150630141448.png "alt=" Wkiom1wstzlrjq4vaaf0r2wts0k978.jpg "/>

If the above error should be seen in the following firewalls, as well as the client's BIOS startup items,

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/1E/wKioL1WSUVaCysT0AAB9JXSKPC4577.jpg "title=" QQ picture 20150630161246.png "alt=" Wkiol1wsuvacyst0aab9jxskpc4577.jpg "/>

If it is the above error suggest a new disc, reinstall



This article is from the "stand in the Cloud" blog, be sure to keep this source http://9827789.blog.51cto.com/9817789/1669445

Kickstart unattended Installation RHEL6.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.