In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In the above experiment, we didn't do any installation and configuration, all of which were done by Cobbler. But in the actual production, we have corresponding requirements for the hard disk partition and installed software of each host, so we need to customize the KickStart file ourselves, so we can customize the batch installation of the operating system.
We use the KickStart file in the experimental environment (CentOS 7) to customize our own KickStart file.
I. configure the ks file
Cobbler's ks file location
/ var/lib/cobbler/kickstarts/
How to configure ks
Method 1, each time a Centos machine is installed, the Centos installer will create a kickstart configuration file to record your actual installation configuration. If you want to implement an installation similar to a system, you can generate your own kickstart configuration file based on the system's kickstart configuration file. (the generated file is named anaconda-ks.cfg at / root/anaconda-ks.cfg)
Method 2. Centos provides a graphical kickstart configuration tool. Run the tool on any installed Linux system and you can easily create your own kickstart configuration file. The kickstart configuration tool command is redhat-config-kickstart (RHEL3) or system-config-kickstart (RHEL5/6/7)
Method 3. Customize a .cfg file according to the format (if method 1 is not available)
Ks file description
The kickstart file is a simple text file that contains a list of projects, each identified by a keyword.
Firewall (optional)
This option corresponds to the Firewall configuration screen in the installer: firewall-enabled |-disabled [- trust=] [- port=]
Graphical (optional)
Perform a kickstart installation in graphical mode. Kickstart installation installs .text text installation in graphical mode by default.
Network (optional)
Configure network information for the system. If the kickstart installation does not require networking (in other words, not from NFS,HTTP or FTP installation), you do not need to configure the network for the system. If the installation requires networking and the network information is not provided in the kickstart file, the installer assumes that the installation from the eth0 is installed through a dynamic IP address (BOOTP/DHCP), and configures the installed system to dynamically determine the IP address. the network option is the kickstart installation through the network and the installed system configuration networking information. -the IP address of the machine to be installed by ip=,. -default gateway in gateway=,IP address format. -nameserver=, principal name server, IP address format. -nodns, do not configure any DNS servers. -the subnet mask of the system installed by netmask=,. -the hostname of the system installed by hostname=,. -ethtool=, specifies other underlying settings for network devices passed to ethtool programs. -Network ID of essid=, wireless network.-encryption key of wepkey=, wireless network. -whether onboot=, enables the device at boot time. -class=,DHCP type. -mtu=, the MTU of the device. -noipv4=, disables IPv4 for this device. -noipv6=, disables IPv6 for this device
Multipath (optional)
Multipath-name=-device=-rule=part or partition (required for installation, upgrade can be ignored). Create a partition on the system. If there are multiple Red Hat Enterprise Linux systems in different partitions, the installer will prompt the user which system to upgrade. Note: as part of the installation process, all created partitions are formatted unless-noformat and-onpart., are used. If it is the mount point of the partition, it must be one of the following forms: /, for example, /, / usr,/homeswap, which is used as swap space to automatically determine the size of the swap partition. The minimum swap partition automatically generated by using the-recommended option .swap-recommended is greater than the amount of system memory, but less than twice the system memory. Raid. This partition is used for software RAID (see raid). Pv. This partition is used for LVM (see logvol). -the minimum partition value of size=, in MB. Specify an integer value here, such as 500. Don't add MB after the number. -grow, telling the partition to use all available space, if any, or to use the maximum value set. -maxsize=, the maximum value of the partition in MB when the partition is set to extensible. Specify an integer value here. Do not add MB after the number. -noformat, use the-onpart command to tell the installer not to format the partition. -onpart= or-usepart=, places partitions on existing devices. For example: partition / home-onpart=hda1, put / home on / dev/hda1 that must already exist. -ondisk= or-ondrive=, forces the partition to be created on the specified disk. For example:-ondisk=sdb puts the partition on the second SCSI disk of the system. -asprimary, forcing the partition to be assigned as the primary partition, otherwise it indicates that the partition failed. -type= (instead of fstype), this option is no longer available. You should use fstype. -fstype=, sets the file system type for partitions. The valid types are ext2,ext3,swap and vfat. -start=, specifies the starting cylinder of the partition, which requires the drive to be specified with-ondisk= or ondrive=. It also requires that the end cylinder be specified with-end= or the partition size be specified with-size=. -end=, specifies the end cylinder of the partition. It requires that the starting cylinder be specified with-start=. -bytes-per-inode=, specifies the node size of the file system created on this partition. Not all file systems support this option, so it is ignored in other cases. -recommended, automatically determines the size of the partition. -onbiosdisk, forcing the creation of partitions on specific disks found by BIOS. Note: if the partition fails for some reason, diagnostic information will be displayed on virtual terminal 3
Define installed packages:
Packages (xxx) end
Define the command or script to execute after installation:
Post (xxx) end
Ks file exampl
Centos7
Cat / var/lib/cobbler/kickstarts/centos7.cfg#platform=x86, AMD64 Or Intel EM64T#version=DEVEL# Install OS instead of upgradeinstall# Keyboard layouts# old format:keyboard us# new format:keyboard-- vckeymap=us-- xlayouts='us'# Root passwordrootpw-- iscrypted $1 $1qazox QAZQL4d6kVwN3toE.0oAS.dQ3The Use network installationurl-- url= "http://192.168.42.128/cobbler/ks_mirror/CentOS-7-x86_64_new-x86_64/"# System languagelang en_US.UTF-8# Firewall configurationfirewall-- disabled# System authorization informationauth-- useshadow-- passalgo=sha512# Use graphical install # graphicalreboottext# Run the Setup Agent on first bootfirstboot-enable# SELinux configurationselinux-- disabled# Do not configure the X Window Systemskipx# System servicesservices-- disabled= "chronyd" ignoredisk-- only-use=sda# Network informationnetwork-- bootproto=dhcp-- device=eth0-- onboot=on# Reboot after installationreboot# System timezonetimezone Asia/Shanghai# System bootloader configurationbootloader-- location=mbr-- boot-drive=sda# Clear the Master Boot Recordzerombr# Partition clearing informationclearpart-- all-- initlabel# Disk partitioning informationpart / boot--asprimary-fstype= "xfs"-size=1024part swap-- fstype= "swap" -- size=2048part /-- fstype= "xfs"-- grow-- size=1%packages@ ^ customers @ core%end%postcat > / etc/profile
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.