Automatic installation of the CentOS system using centos6.6 deployment cobbler--

Source: Internet
Author: User

Cobbler is an open source project for deploying and installing systems. Cobbler is more than just a PXE server, he can also manage DNS and DHCP. DHCP is not allowed in the General data center or production environment, but PXE requires DHCP, so we assign IP based on the MAC address so that DHCP does not affect the existing network.

1. First turn off SELinux

[[Email protected] ~] #sed-i '/selinux/s/enforcing/disabled/'/etc/selinux/config

#重新启动linux系统使配置生效;

2. Close the firewall iptables

[[Email protected] ~]# service iptables stop


3. Install Epel Package

[[Email protected] ~] #yum Install http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

4. Install Cobbler and the third-party toolkit it needs

[[Email protected] ~] #yum Install cobbler cobbler-web xinetd pykickstart cman DHCP tftp-server bind


Set several services to start automatically after installation is complete

[Email protected] ~]# chkconfig httpd on

[Email protected] ~]# chkconfig dhcpd on

[Email protected] ~]# chkconfig cobblerd on

[Email protected] ~]# service httpd start #启动http服务

[Email protected] ~]# service Cobblerd start #启动cobbler服务

Note: The DHCPD should start failing at this point because DHCP has not yet been configured.




5. Configuration

5.1 modifying/etc/xinetd.d/tftp

Disable = yes

=

Disable = no

5.2 Modify/etc/xinetd.d/rsync

Disable = yes

=

Disable = no




5.3 Edit the/etc/cobbler/settings file and set the following items, where 172.16.1.2 is the current machine IP. server: 172.16.1.2

next_server:172.16.1.2

Pxe_just_once:1

Manage_rsync:1

Manage_dhcp:1




5.4 Set Default (System installed via cobbler) root user's password

[email protected] ~]# OpenSSL passwd-1-salt ' random-phrase-here ' Dragon ' #密码加密

$1$random-p$kifnqzryofzx/kaa0cjxv/

The results are then replaced with the following: default_password_crypted:/etc/cobbler/settings file.

5.5 set the password for Cobbler Web Access

[[Email protected] ~] #htdigest/etc/cobbler/users.digest "Cobbler" cobbler


5.6 Edit the/etc/cobbler/dhcp.template file, the following is the configuration information I changed part;

Option Domain-name "172.16.1.2";

Option Domain-name-servers 172.16.1.2;

Default-lease-time 43200;

Max-lease-time 86400;

Log-facility Local7;

Subnet 172.16.0.0 netmask 255.255.0.0 {

Range 172.16.1.100 172.16.1.254;

Option routers 172.16.1.1;

}

Next-server 172.16.1.2;

Filename= "pxelinux.0";


Note: If you already have a DHCP server in an existing network segment, you need to comment out the range DYNAMIC-BOOTP, otherwise there will be a conflict. This place needs special attention, to be set according to your own network situation.

5.7 Restart the service, temporarily do not start DHCP, configuration is not synchronized to/etc/dhcp/dhcpd.conf

[[Email protected] ~] #service xinetd Restart

[[Email protected] ~] #service httpd restart

[[Email protected] ~] #service cobblerd Restart


5.8 start and detect cobbler

[[Email protected] ~] #cobbler get-loaders #执行 Cobbler Get-loaders, the system will automatically download loader program

[[Email protected] ~] #cobbler check #此时如果有错误, cobbler will prompt, you can follow the prompts to fix. However, any modifications to the parameters need to be made using the following command to make them effective


5.9 Web Test

Browser access/HTTP / 172.16.1.2/ Cobbler_web # Enter your own IP here

username/password: cobbler/ Dragon # set at step 5.5

6.0 Import the system image, this assumes the use of centos-6.6-x86_64 to test, the virtual machine needs to mount the image first;

[[Email protected] ~] #mount/dev/cdrom/mnt

[[Email protected] ~] #cobbler import--path=/mnt--name=centos-6.6--arch=x86_64

After running these two commands, you can use the following command to view the packages that have been loaded

[[Email protected] ~] #cobbler distro List

[[Email protected] ~] #cobbler profile List

It can also be viewed through the distros and Profiles of the Web interface.

7. Automatic Installation System
Using VirtualBox to create a virtual machine, the network settings use the same bridging mode as above. However, in the startup sequence, System-by-virtual machine settings, hook up the network and move it up to the first place, and then start the virtual machine. At this point, you can enter the Cobbler network installation interface, select the centos-6.6-x86_64 created above and then you can install it automatically. When you are finished, remember to change the virtual machine boot order back to hard disk boot priority, and then start the newly installed virtual machine.


Second, the configuration Kickstart configuration template with annotated version (with no comment version below)

[email protected] ~]# cat KICKSTART_FC6.KS

#platform =x86, amd64, or intel em64t#version=devel# upgrade existing  installationupgrade# use network installation# changed to his own ipurl --url= "Http://172.168.12/cobbler /ks_mirror/centos-6.6-x86_64/"# root password rootpw dragon# system  authorization informationauth  --useshadow  --passalgo=sha512# shutting down the firewall firewall -- disabled# Select time Zone timezone asia/shanghai# use graphical installgraphicalfirstboot -- Disable# system keyboardkeyboard us# system language Select language, if you want to fill in Chinese: lang zh_ Cnlang en_us# installation logging levellogging --level=info# reboot after  installationreboot# system bootloader configuration#--initlabel, the disk label is initialized to the default settings according to the different architectures (for example, Msdos for x86 and GPT for Itanium). This is useful when installing to a brand new hard  , and the installer does not ask if the disk label should be initialized. #--grow, tell the partition to use all available space (if any), or use the maximum value of the setting. #-- Size= the minimum value of the partition, in megabytes. Specify an integer value here, such as 500. Do not add m after the numberB.#--fstype=, set the file system type for the partition. Valid types are Ext2,ext3,swap and vfat.#--asprimary, forcing partitions to be allocated as primary partitions, otherwise prompting partition failure. #--ondisk= or--ondrive=, Forces the partition to be created on the specified disk. bootloader --location=mbrclearpart --all --drives=sda --initlabelpart / Boot --fstype ext3 --size=100 --ondisk=sda   part swap --size= 4096part / --fstype ext3 --size=100 --grow --asprimary#%packages section, this section selects the packages that need to be installed .%packages@core@server-policy@workstation-policy%end


No comment version, can be copied directly, modify the address path can:

[Email protected] ~]# KICKSTART.KS

#platform =x86, amd64, or intel em64t#version=devel# upgrade existing  installationupgrade# use network installation# changed to his own ipurl --url= "Http://172.168.12/cobbler /ks_mirror/centos-6.6-x86_64/"# root passwordrootpw --iscrypted $1$cgigfipo$ rqnvzr480z5a2dnbxdd7c0# system authorization informationauth  --useshadow   --passalgo=sha512firewall --disabledtimezone asia/shanghai# use graphical  installgraphicalfirstboot --disable# system keyboardkeyboard us# system  languagelang en_us# installation logging levellogging --level=info# reboot  after installationreboot# system bootloader configurationbootloader --location= Mbrclearpart --all --drives=sda --initlabelpart /boot --fstype ext3 --size= 100 --ondisk=sdapart swap --size=4096part / --fstype ext3 --size=100 --grow --asprimary% Packages@core@server-policy@workstation-policy%end



This article is from the "obsessed" blog, make sure to keep this source http://dragondragon.blog.51cto.com/6170889/1765048

Automatic installation of the CentOS system using centos6.6 deployment 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.