Cobbler for automated installation (bottom)--implementation process

Source: Internet
Author: User

Experimental environment
7.2.1511 (Core) [[email protected] ~]# ifconfig eno16777736eno16777736:flags=4163<up,broadcast,running, Multicast>  MTU        192.168.4.116  netmask 255.255.255.0  broadcast 192.168.4.255        Inet6 fe80::20c:29ff:fe93:270f  prefixlen  scopeid 0x20<link>  ether 00:0c:29:93:27:0f Txqueuelen  (Ethernet) ...        [[email protected] ~]# systemctl stop firewalld.service[[email protected] ~]# systemctl disable Firewalld.service[[email Protected] ~]# vim/etc/selinux/config ...    Selinux=disabled ...    [[Email protected] ~]# Init 6
1) Installation of related services that cobbler depends on
[[email protected] ~]# yum-y install TFTP tftp-server DHCP httpd  #pxe可通过http或者ftp等方式提供安装文件 [[email protected] ~]# Yum Install-y syslinux  #提供pxe安装所需要的pxelinux. 0 files [[email protected] ~]# vim/etc/dhcp/dhcpd.conf    option Domain-name "test.com";    Option Domain-name-servers 8.8.8.8,114.114.114.114;    Default-lease-time;    Max-lease-time 7200;    Log-facility Local7;    Subnet 192.168.4.0 netmask 255.255.255.0{  #ip地址范围必须跟本机ip一致            range 192.168.4.1 192.168.4.100;            option routers 192.168.4.116;            FileName "pxelinux.0";            Next-server 192.168.4.116;    } [Email protected] ~]# systemctl start dhcpd  #启动dhcp [[email protected] ~]# cat/var/lib/dhcpd/dhcpd.leases  # You can see the lease of the IP by viewing the file [email protected] ~]# systemctl start httpd tftp.socket  #启动http, tftp
2) Install the Cobbler1, install the Cobbler, start the service, and then perform the Cobbler check
[[email protected] ~]# yum-y install cobbler[[email protected] ~]# systemctl start cobblerd[[email  Protected] ~]# Cobbler Check the following is potential configuration items that you could want to fix:1: the ' Server ' field in/etc/cobbler/settings must is set to something other than localhost, or kickstarting features would not wo  Rk.    This should is a resolvable hostname or IP for the boot server as reachable by all machines that would use it. 2:for PXE to be functional, the ' next_server ' field in/etc/cobbler/settings must is set to something other than 127.0.0    .1, and should match the IP of the boot server on the PXE network. 3:change ' disable ' to ' no ' in/etc/xinetd.d/tftp 4:some network boot-loaders is missing from/var/lib/cobbler/load ERS, you could run ' cobbler get-loaders ' to download them, or, if you have want to handle x86/x86_64 netbooting, your may ens Ure the installed a *recent* version of the Syslinux package installed and CAn Ignore this message entirely.  Files in this directory, should want to support all architectures, should include pxelinux.0, MENU.C32, Elilo.efi, and Yaboot.    The ' Cobbler get-loaders ' command is the easiest-to resolve these requirements. 5:enable and start Rsyncd.service with Systemctl 6:debmirror package isn't installed, it'll be required to Manag E Debian deployments and repositories 7:the default password used by the sample templates for newly installed machine S (default_password_crypted in/etc/cobbler/settings) is still set to ' cobbler ' and should are changed, try: "OpenSSL PASSW D-1-salt ' random-phrase-here ' your-password-here ' "to generate new one 8:fencing tools were not found, and is req Uired to use the (optional) power management features. Install Cman or fence-agents to use them Restart cobblerd and then run ' Cobbler Sync ' to apply changes.
2, to check out the various errors to deal with the corresponding
Modify #针对1, 2, 7 [email protected] ~]# OpenSSL passwd-1-salt "123456" "Zhanfei"  #创建密钥    $1$123456$khkws/sjlybtz7ikpsrxt0[[ Email protected] ~]# vim/etc/cobbler/settings
... server:192.168.4.116 next_server:192.168.4.116 default_password_crypted: "$1$123456$khkws/ Sjlybtz7ikpsrxt0 " #此密钥是安装系统后root默认密码
... #针对3进行修改 [Email protected] ~]# vim/etc/xinetd.d/tftp ... Disable = no ... #针对4进行修改 [Email protected] ~]# Cobbler get-loaders ... #针对5进行修改 [Email protected] ~]# systemctl start rsyncd.service[[email protected] ~]# systemctl disable Rsyncd.service ... #实验不涉及debian系统, the 6th can be ignored #针对8进行修改 [Email protected] ~]# yum-y install fence-agents...
3. Restart Cobbler
[Email protected] ~]# systemctl restart Cobblerd[[email protected] ~]# Cobbler Check the    following is potential conf  Iguration items want to fix:    1:debmirror package is not installed, it'll be required to manage Debian Deployments and repositories    Restart Cobblerd and then run ' Cobbler Sync ' to apply changes.[ [Email protected] ~]# Cobbler sync  #忽略debian的配置
3) Configure Cobbler1, create centos7.2 Cobbler objects
[Email protected] ~]# mount/dev/cdrom/mnt  #挂载centos7.2 optical drive [[email protected] ~]# Cobbler import--name= Centos-7.2-x86_6--path=/mnt  #创建cobbler对象组, this process is time consuming [[email protected] ~]# Cobbler distro List  # View the corresponding distribution    centos-7.2-x86_64

The image is automatically imported into the/var/www/cobbler/ks_mirror, followed by HTTP to obtain the installation source;

By default, cobbler also generates a minimized installed kickstart file, which is/VAR/LIB/COBBLER/KICKSTARTS/SAMPLE_END.KS by default. If we want to customize the kickstart file, you can do the following:

[[email protected] ~]# CP centos7.2.cfg/var/lib/cobbler/kickstarts/  #centos7.2.cfg for custom kickstart files [email Protected] ~]# Cobbler profile add--name=centos-7.2-x86_64-custom--distro=centos-7.2-x86_64--kickstart=/var/lib/ Cobbler/kickstarts/centos7.2.cfg  #--distro to correspond to the Distro object created in the previous step [[email protected] ~]# Cobbler profile list    centos-7.2-x86_64    Centos-7.2-x86_64-custom

Check that the httpd and TFTP service-related directories have created the appropriate files:

[[email protected] ~]# ll/var/www/cobblertotal 0drwxr-xr-x. 4 root root 16:06 Oct imagesdrwxr-xr-x. 5 root root (Oct) 16:04 ks_mirrordrwxr-xr-x. 2 root root 16:06 Oct linksdrwxr-xr-x. 2 root root 6 May 20:41 localmirrordrwxr-xr-x. 2 root root Notoginseng Oct 10:29 miscdrwxr-xr-x. 2 root root 6 May 20:41 pubdrwxr-xr-x. 2 root root 6 May 20:41 rendereddrwxr-xr-x. 2 root root 6 May 20:41 repo_mirrordrwxr-xr-x. 2 root root (OCT) 10:29 svc[[email protected] ~]# ll/var/lib/tftpboot/total 300drwxr-xr-x 3 root root + Oc T-15:00 bootdrwxr-xr-x. 2 root root 6 May 20:41 etcdrwxr-xr-x. 2 root root 15:00 Oct-grubdrwxr-xr-x. 4 root root 16:06 Oct imagesdrwxr-xr-x. 2 root root 6 May 20:41 images2-rw-r--r--. 1 root root 26268 Mar 6 memdisk-rw-r--r--2 root root 54964 may 16:49 menu.c32drwxr-xr-x. 2 root root 6 20:41 ppc-rw-r--r--2 root root 16794 may 16:49 pxelinux.0drwxr-xr-x. 2 Root ROot Oct 15:00 pxelinux.cfgdrwxr-xr-x. 2 root root Oct 15:00 s390x-rw-r--r--2 root root 198236 may 16:49 Yaboot

Test installation: (only test the Cobbler self-built kickstart, success)

2. Create a centos6.5 Cobbler object
Mount /dev/cdrom/mnt  ~]# Cobbler import--name=centos-6.7-x86_64--path=/mnt   ~]# Cobbler distro list  #查看对应的distribution    CentOS-6.7-x86_64    CentOS -7.2-~]# Cobbler Profile list    CentOS-6.7-x86_64    CentOS-7.2-x86_64    CentOS-7.2-x86_64-custom

Test Installation 6.5: Success

4) Cobbler Web management interface
[Email protected] ~]# yum-y install cobbler-web[[email protected] ~]# vim/etc/cobbler/modules.conf    ...    [Authentication]    module = Authn_pam   #使用authn_pam, local user authentication modules    ... [Email protected] ~]# useradd cbadmin[[email protected] ~]# echo 123456|passwd--stdin cbadmin    ... [Email protected] ~]# vim/etc/cobbler/users.conf ...    [Admins]    admin = "Cbadmin" [[email protected] ~]# systemctl restart Cobblerd

Client testing: (Note that https)

Cobbler for automated installation (bottom)--implementation process

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.