Fully automated installation of the CentOS system based on Pxe+cobbler

Source: Internet
Author: User
Tags rsync

Objective:

Based on the content of the previous article, we have been able to build a fully automated installation of CentOS service. But if we want it to support the installation of various systems at the same time, the implementation is more complicated. Different systems, to be installed with different boot boot files, and there are different installation sources and kickstart files, and so on. Since it is a complex thing, it can be simplified by some tool, and this time we use the legendary cobbler to manage various sources, PXE loaded kernel files and so on. Let ' s do it!

Body:

The usual, first describes the join cobbler after the overall workflow, has been cobbler to achieve the function. When a machine that needs to install a system starts, it obtains the IP address from the DHCP server in the network, learns the TFTP address and file of the PXE, then loads a small Linux system, obtains the installer from a source, installs the operating system according to the kickstart file, Although the east of the DHCP can also let cobbler to manage, but bloggers still like to let it stand out. The default cobbler will manage our TFTP service, as well as the source provided by HTTP, so all processes except DHCP can be managed through cobbler to make the entire implementation easier-talk not much, war!

First need to install the required program configuration basic services, in the previous blog introduction to the service we do not introduce, please check the previous blog, we will still use, tftp,dhcp,http,syslinux program. In addition to the previously required procedures, we also need to use another two: Cobbler and rsync (note here, cobbler is provided by the Epel source yo)

Yum Install Cobbler Rsync-y

We have to make sure our tftp,dhcp,http is up! and can provide service D. We also have to close selinux. Setting up the/etc/selinux/config file

#/etc/selinux/configselinux=disabled

Start the Cobbler service

Systemctl Start Cobbler #centos7系统哦

We have to set up the Cobbler profile:/etc/cobbler/settings, only the modified sections are shown below

server:192.168.6.100 #设置提供cobbler服务的主机ipnext_server: 172.16.6.100 #提供pxe服务的主机ipdefault_passwd_crypted: $1$478cc085 $PPCQHRK 7rpzgr5xqwx4iu0 #重新设置密码

We have to set up the code above, we can generate the password with OpenSSL.

OpenSSL passwd-1-salt $ (OpenSSL Rand-hex 4)

We also have to provide cobbler with the PXE-related files for the installation system, and save them to the/var/lib/cobbler/loaders directory.

CP/USR/SHARE/SYSLINUX/{PXELINUX.0,MENU.C32}/var/lib/cobbler/loaders/

We then configure the installation source, but before we generate the source we have to introduce a few important builds

1. Is our distro, this is equivalent to our installation source, we can create different distro according to different systems, it is recommended to use the import installation image to frame distro. If we are going to install the CENTOS6 system and name this distro centos-6.5-x86_64

Cobbler Import--name=centos-6.5-x86_64--path=/media/cdrom #一定要确定centos安装盘已挂载到/media/cdrom Directory

This process copies the files of the installation disk to the cobbler corresponding file to form a distro

2.profile,cobbler uses profile to provide the required installation configuration for a specific requirement category, and we create one based on the distro above

Cobbler profile Add--name=centos-6.5-x86_64-basic--distro=centos-6.5-x86_64

By default, Cobbler generates the PXE default file and the kickstart file, which should be installed as the minimum, if we want to specify our own Kickstart file:

Cobbler profile Add--name=centos-6.5-x86_64-basic--distro=centos-6.5-x86_64--kickstart=/tmp/centos6.cfg

Our cobbler has been configured for this. There is wood is very simple!!!! Now we synchronize the cobbler data to the hard disk. This step must not forget!!!!! Otherwise the installation process will fail!!! The command is as follows

Systemctl Restart Cobblercobbler Sync #同步数据

By this, we can test!!! The following can not see ~ ~ ~





If cobbler encounters any problems during this process cobbler check   See if there are any errors, there are a number of hints that can be ignored. The following few do not care, the first is to prompt selinux, we have set disabled. The second prompt boot-loaders file, we have copied from the Syslinux, after the later also do not pay much attention, we are CENTOS7 no xinetd problem, debmirror in 7 also did not, fencing do not pay attention.

The following are potential configuration items that you may want  to fix:1 : selinux is enabled. please review the following  wiki page for details on ensuring cobbler works correctly  in your selinux environment:    https://github.com/cobbler/cobbler/wiki/ Selinux2 : some network boot-loaders are missing from /var/lib/cobbler /loaders, you may run  ' Cobbler get-loaders '  to download them, or,  if you only want to handle x86/x86_64 netbooting, you may  ensure that you have installed a *recent* version of the  syslinux package installed and can ignore this message entirely.   files in this directory, should you want to support all  Architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot.  The  ' Cobbler get-loaders '  command is the easiest way to  resolve these requirements.3 : file /etc/xinetd.d/rsync does not  exist4 : debmirror package is not installed, it will be  Required to manage debian deployments and repositories5 : fencing  tools were not found, and are required to use the  ( Optional)  power management features. install cman or fence-agents to  use themRestart cobblerd and then run  ' Cobbler sync '  to  Apply changes.


This article is from the "mechanism of small Wind" blog, please be sure to keep this source http://xiaofengfeng.blog.51cto.com/8193303/1887723

Fully automated installation of the CentOS system based on Pxe+cobbler

Related Article

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.