In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to achieve semi-automatic installation of CentOS system, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Let's take a look at the topology first.
Simply explain the topology diagram. First, open the http service on the server side, create two directories under the http default directory, namely ks and x86x64, mount the CD image to the / var/www/html/x86_64 directory, and copy the ks.cfg files that have been made to the / var/www/html/ks directory. Make isolinux on the server side to boot the client (in fact, extract the isolinux directory from the CD image and re-generate an iso file with the command). Install isolinux on the client side and install CentOS 6.6x86x64 through the local area network.
(1) make ks.cfg file first.
After the CentOS 6 installation is complete, an anaconda-ks.cfg file will be generated under / root, which is a file generated by the CentOS 6 installer anaconda based on all your keyboard types, languages, time zones, partitions, and packages during the system installation.
If we want to make an anaconda-ks.cfg file, we can refer to this file and modify it on some basis, and we can use the system-config-kickstart program to generate the relevant files.
Install the system-config-kickstart program
[root@node-2 ~] # yum install-ysystem-config-kickstart
Start the system-config-kickstart program
Use the xshell 4 remote connection terminal to start system-config-kickstart, and it is recommended to install XmanagerEnterprise 4 software, so that you can open the software in the Linux system in the local terminal. Enter the system-config-kickstart command on the command line.
After modification, select Save to save from the File menu, enter the ks.cfg name at the top, select the save location, and click the Save button.
Look at the file you just generated and add some content, because some commands need to be added manually, please refer to the official materials of REHL.
[root@node-2 ~] # cat / var/www/html/ks/ks.cfg
# platform=x86, AMD64, or IntelEM64T
# version=DEVEL
# Firewall configuration
Firewall-- disabled # choose to turn off the firewall when restarting and initializing the system after installation
# Install OS instead of upgrade
Install # installation type selected as installation
# Use network installation
Url-url= "http://172.16.9.21/x86_64/" # is installed over the network and uses the Http service
Repo-name= "CentOS"-baseurl= http://172.16.9.21/x86_64/-cost=100
# repo-name= "FedoraEPEL"-baseurl= http://172.16.0.1/fedora-epel/6/x86_64/-cost=1000
# Root password
Rootpw-- iscrypted $1 $jLn8z9P1 $ff07gV9CfXmz1Q0NEOmAw/ # password of administrator root, which is stored with encryption
# System authorizationinformation
Auth-- useshadow-- passalgo=sha512 # authentication method, sha512 encryption method used
# Use graphical install
Graphical # installs using a graphical interface
Firstboot-disable
# System keyboard
Keyboard us # selected keyboard type is us
# System language
Lang en_US # is in English
# SELinux configuration
Selinux-- disabled # turn off selinux
# Do not configure the X WindowSystem
Skipx # ignores the configuration of X Window System
# Installation logging level
Logging-- the level started by level=info # is text
# Reboot after installation
Restart the system after reboot # installation
# System timezone
Timezone Asia/Shanghai # system time zone is Asia / Shanghai
# Network information
# network-bootproto=dhcp-device=eth0-onboot=on
# System bootloaderconfiguration # indicates the parameters of the transfer energy kernel
Bootloader--append= "crashkernel=auto crashkernel=auto rhgb quiet"-location=mbr-driveorder= "sda
# Partition clearinginformation
Clearpart-- all # the following are used to partition the disk. LVM is used here.
Zerombr # disk has no partition, partition the disk
Part / boot-- fstype=ext4--size=200
Part pv.008002-size=61440
Volgroup vg0-pesize=8192pv.008002
Logvol /-- fstype=ext4--name=root-- vgname=vg0-- size=20480
Logvol swap-- name=swap--vgname=vg0-size=2048
Logvol / usr-fstype=ext4--name=usr-vgname=vg0-size=10240
Logvol / var-fstype=ext4--name=var-vgname=vg0-size=20480
Scripts to be executed after% post # is installed
% end # script Terminator
% packages # packages and package groups that need to be installed during installation
@ base
@ basic-desktop
@ chinese-support
@ client-mgmt-tools
@ core
@ desktop-platform
@ fonts
@ general-desktop
@ graphical-admin-tools
@ legacy-x
@ network-file-system-client
@ perl-runtime
@ remote-desktop-clients
@ x11
-ibus-table-cangjie
-ibus-table-erbi
-ibus-table-wubi
% end # package and package group Terminator
(2) install http service and start
[root@node-2 ~] # yum installhttpd-y # install httpd service
[root@node-2 ~] # service httpdstart # start the http service
Starting httpd: [OK]
[root@node-2 ~] # netstat-ntlp | grep 80 # check the startup status. The port of http is port 80 of tcp.
Tcp 00: 80: * LISTEN 2008/httpd
(3) Mount the CD image
Put the CD image into the CD drive, if you are using a virtual machine, add the CD file to the CD drive of the virtual machine, and select enable.
[root@node-2 ~] # mkdir / var/www/html/ {ks,x86_64} # create a ks,x86_64 directory
[root@node-2 ~] # mount-r/dev/dvd / var/www/html/x86_64/ # Mount the CD read-only and image it to / var/www/html/x86_64/
[root@node-2 ~] # mount | tail-1 # to check the mount condition
/ dev/sr0 on/var/www/html/x86_64 type iso9660 (ro)
(4) copy the ks.cfg file to the / var/www/html/ks directory
[root@node-2 ~] # cp/root/ks.cfg / var/www/html/ks/
[root@node-2 ~] # ls/var/www/html/ks/
Ks.cfg
Thank you for reading this article carefully. I hope the article "how to realize semi-automatic installation of CentOS system" shared by the editor will be helpful to everyone. At the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.