Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Pxe unattended installation of centos system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you Pxe unattended installation of centos system example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

Establish a CD mount point

Mkdir / mnt/cdrom

Mount / dev/cdrom / mnt/cdrom

Enter the CD-ROM server directory and install the vsftpd service

Cd / mnt/cdrom/Server/

Rpm-ivh vsftpd-2.0.5-16.e15.i386.rpm

Start vsftpd

Service vsftpd start

Set vsftpd to boot automatically

Chkconfig vsftpd on

Install the dhcp service

Rpm-ivh dhcp-3.0.5-21.e15.i386.rpm

Start the dhcp service

However, there is currently no configuration script, so edit the configuration script first

Enter the script editing interface

Vi / etc/dhcpd.conf

Enter: set nu to display the line number

R / usr/share/doc/dhcp-3.0.5/dhcp.conf.sample in bottom line mode (read dhcp.conf.sample file)

After modification

Note: the main modification is that the subnet is changed to the local network segment, the option routers,option subnet-mask,optiondomain-name-servers in the default gateway, and the rest can be ignored.

Now dhcp is ready to start.

Service dhcpd start

Set the dhcp service to boot automatically

Install tftp server below

First check to see if it has been installed.

Rpm-qa | grep tftp

I have already installed it here. If not, execute the following instructions to install it.

Rpm-ivh tftp-server-0.49-2.i386.rpm

View the installation directory

Rpm-ql tftp-server

/ etc/xinetd.d/tftp indicates that the tftp service is controlled by the super daemon

So set the boot self-boot

Edit / etc/xinetd.d/ftp

Vi / etc/xinetd.d/ftp

Just change disable = yes to no (wake up instead of wake up)

Tftp boot self-startup setting completed: wq save exit

Restart the super daemon, or it will not take effect.

Service xinetd restart

Since then, three servers have been built, but the ftp server is special and needs to place CD-ROM image files, so let's copy the CD-ROM files.

Return to the root directory of the CD

Cd..

Copy the files on the CD to. Var/ftp/pub/

Cp-r (there is a directory in the CD, use recursive parameters). Represents all) / var/ftp/pub/ under the root directory of the CD

After the CD file is copied, all the functions of ftp are available.

I got the address on ftp, but how do I know the address of tftp-server?

Edit the dhcp.config file

Add the local address to this file

Return to the root directory

Find the tftpboot directory

Put some necessary things to start (kernel drivers, etc.) into it.

Cd / tftpboot

Copy the initrd.img (driver file) and vmlinuz (kernel file) from the CD to the current directory

Copy the pxe driver file of / usr/lib/syslinux/pxelinux.0 to the current directory as well

For pxelinux. 0 create a directory pxelinux.cfg (be sure to read the configuration file default in the pxelinux.cfg directory when the system calls pxelinux.0)

Copy isolinux.cfg to pxelinux.cfg and name it default

Here are the things you need to start.

There is also a critical step to achieve pxe unattended installation of linux, to indicate the location of the ks.cfg.

Generate ks.cfg

Edit default

There is an append (append kernel parameters) in it

Add ks= ftp://192.168.126.30/ftp/pub/ks.cfg

Save exit: wq!

Edit / etc/dhcpd.conf again

Vim / etc/dhcpd.conf

Add information to default gateway

Filename "pxelinux.0"

Copy the ks.cfg file to / var/ftp/pub

Edit / etc/yum.repos.d rhel-debuginfo.repo

Vim / etc/yum.reppos.d rhel-debuginfo.repo

After revising.

Install yum tools

Yum install system-config-kickstart

Then connect to linnux via ssh. I feel very uncomfortable when I read white characters on a black background all day long. I adjust it occasionally. )

System-config-kickstart

This one contains ftp server 192.168.126.30 ftp Directory / pub

Then create a new partition

Network configuration chooses to obtain the ip address automatically

Firewall, kill...

Well, it's done, and then remember to save it.

However, the linux we use does not have a serial number, and you have to install it unattended, in case he asks you to enter the serial number, but you are not there. The system is probably resting there.

So add the following command to ks.cfg

Just to be on the safe side, restart various servers.

Service dhcpd restart

Service xinetd restart

Service vsftpd restart

Okay.

Restart the system.

The above is all the contents of the article "sample Analysis of Pxe unattended installation of centos system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report