Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS boot image to achieve semi-automatic installation     - Java implementation heap sort (large root heap) (Programming)

- CentOS modify yum update source (Linux)

- CentOS5 installation Nodejs (Linux)

- Magical Virtualbox under Ubuntu (Linux)

- Netcat Example (Linux)

- How to clean up your Ubuntu 14.10 / 14.04 / 13.10 system (Linux)

- Android custom controls create the simplest skid menu in the history (Programming)

- ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], [] (Database)

- C ++ in the elimination Wunused (Programming)

- Caffe + Ubuntu 14.04 64bit + CUDA 6.5 configuration instructions (Linux)

- How to Create a file can not be changed under Linux (Linux)

- Mac OS X 10.10 Yosemite compiling OpenJDK 9 (Linux)

- C ++ class implementation date operator overloading (Programming)

- Android Studio and Git Git configuration file status (Linux)

- Common Linux system performance monitoring command (Linux)

- Learning UNIX good habits (Linux)

- What Java 8 fastest garbage collector (Programming)

- CentOS 6.6 command-line automatic completion (Linux)

- On the Web application attack techniques Common (Linux)

- MD5 and simple to use (Linux)

 
         
  CentOS boot image to achieve semi-automatic installation
     
  Add Date : 2018-11-21      
         
         
         
  The experiment is now in a production environment is not used anymore, because there are already more advanced automated installation software to replace the present experiment, so just from a low level to a better understanding of the installation of Linux, which made this "boot mirroring CentOS semi-automatic installation "experiment, deepen current knowledge and understanding of what they have learned.

Simple explanation topology, the first turn on the server http service, create two directories at http default directory are ks, x86_64, and to mount the CD image under / var / www / html / x86_64 directory, has making good ks.cfg files are copied to / var / www / html / ks directories; on the server side for making isolinux boot client (in fact, the CD-ROM image of the isolinux directory to be extracted and re-used command generates a iso file). In the client mount isolinux, install CentOS via LAN 6.6 x86_64.

(1) First make ks.cfg file

Generates an anaconda-ks.cfg file in the / root CentOS 6 after the installation is complete, this is the CentOS 6 installer anaconda Choose your system during the installation of all the keyboard type, language, time zone, zoning, according to the package It generated a file.

If we want to make an anaconda-ks.cfg file, you can refer to this document be modified on the basis of these, you can use the system-config-kickstart program generates the relevant documents.

Install system-config-kickstart program

1 [root @ node-2 ~] # yum install -ysystem-config-kickstart

Start system-config-kickstart program

Use xshell 4 remote connection terminal starts a system-config-kickstart, XmanagerEnterprise 4 is recommended to install the software, so you can open Linux system software in the local terminal. Enter the system-config-kickstart command at the command line.

After modifying the File menu select Save to save in the uppermost input ks.cfg name, choose a save location, click on the Save button.

See just generated file and add some content, because some commands need to manually add the relevant information, please refer REHL official.

[Root @ node-2 ~] # cat /var/www/html/ks/ks.cfg
# Platform = x86, AMD64, or IntelEM64T
# Version = DEVEL
# Firewall configuration
Select Off Firewall firewall --disabled # After rebooting the system is initialized installation
# Install OS instead of upgrade
install # install type is selected for installation
# Use network installation
url --url = "http://172.16.9.21/x86_64/" # installing over a network using 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 / # root administrator's password, use encryption to store
# System authorizationinformation
auth --useshadow --passalgo = sha512 # authentication method, encryption method used sha512
# Use graphical install
graphical # use the graphical interface for installation
firstboot --disable
# System keyboard
Keyboard type keyboard us # chosen for us
# System language
lang en_US # language to English
# SELinux configuration
Close selinux selinux --disabled #
# Do not configure the X WindowSystem
skipx # ignore the X Window System Configuration
# Installation logging level
logging --level = info # start logging level
# Reboot after installation
After installing reboot the system reboot #
# System timezone
When the timezone Asia / Shanghai # system area for the Asia / Shanghai
# Network information
#network --bootproto = dhcp --device = eth0 --onboot = on
# System bootloaderconfiguration # represents the kernel can pass parameters
bootloader - append = "crashkernel = auto crashkernel = auto rhgb quiet" - location = mbr --driveorder = "sda"
# Partition clearinginformation
clearpart --all # The following are the disk partitioning operations, where the use of LVM
zerombr # disk has no partition to 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
  
Script% post # after the installation to be performed
  
% End # script terminator
Packages and package groups% packages # during the installation process need to be installed
@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) Installation and Startup Service http
12345 [root @ node-2 ~] # yum installhttpd -y # install httpd service
[Root @ node-2 ~] # service httpdstart # http service to start
Starting httpd: [OK]
[Root @ node-2 ~] # netstat-ntlp | grep 80 # View startup state, http port to tcp port 80
tcp 0 0 ::: 80 ::: * LISTEN 2008 / httpd

(3) mount disc image
  The CD-ROM image into the drive, if you are using a virtual machine to add files to the CD-ROM drive of the virtual machine, and select Enable.
1234 [root @ node-2 ~] # mkdir / var / www / html / {ks, x86_64} # create ks, x86_64 directory
[Root @ node-2 ~] # mount -r / dev / dvd / var / www / html / x86_64 / # mounted read-only CD image to / var / www / html / x86_64 /
[Root @ node-2 ~] # mount | tail -1 # Mount View case
/ Dev / sr0 on / var / www / html / x86_64 type iso9660 (ro)

(4) Copy the ks.cfg file to / var / www / html / ks directory
123 [root @ node-2 ~] # cp / root / ks.cfg / var / www / html / ks /
[Root @ node-2 ~] # ls / var / www / html / ks /
ks.cfg

(5) Production isolinux boot
In / tmp / cdrom to create a directory, the CD-ROM image is copied to the isolinux / tmp / cdrom directory and use the mkisofs command to generate the iso file.
1234567 [root @ node-2 ~] # cd / tmp / # to switch the / tmp directory
[Root @ node-2 tmp] # cp -r / var / www / html / x86_64 / isolinux / / tmp / cdrom / # copy isolinux to / tmp / cdrom directory
[Root @ node-2 tmp] # ls cdrom / # copy View Results
isolinux
[Root @ node-2 tmp] # mkisofs -RJ -T -v --no-emul-boot --boot-load-size 4 --boot-info-table -V "Centos6.6 X86_64 boot disk" -b isolinux / isolinux.bin -c isolinux / boot.cat -o / root / boot.iso cdrom / # make boot.iso file
[Root @ node-2 tmp] # ll / root / boot.iso # View iso file making situation
-rw-r - r-- 1 root root 39866368Apr 17 13:39 /root/boot.iso

(6) make a good boot.iso file is downloaded to the local computer, the possible drag through Xshell 4 comes Xftp As the boot.iso put on the desktop.
(7) to create a new virtual machine, the disk space is 120G, the boot.iso loaded into the virtual machine CD-ROM drive, choose "start connection" to open just the new virtual machine, press F2 to enter the BIOS, Boot Options moved to amend section a startup item for the CD-ROM Driver, press F10 to save and exit, will restart the virtual machine.
(8) in the selection interface when installed CentOS

Then press the ESC key, because we only have one boot, and no need to install the program package, we want to specify ks.cfg file and use the http service for remote installation of CentOS 6 x86_64 manually.
  Will enter the boot command prompt, enter linux ip = 172.16.9.34 netmask = 255.255.0.0 gateway = 172.16.0.1ks = http: //172.16.9.21: 80 / ks / ks.cfg, enter after the completion of the transport, loading isolinux micro kernel vmlinux and initrd.img file to start the automatic installation of CentOS.

prompt:
 In the boot command line prompt enter linux installation using the graphical representation CentOS, need to have more than 512M of memory;
 ip, netmask, gateway is used to specify the local network adapter IP address, mask, gateway,
 ks denotes a specified location ks.cfg file, you can use http, ftp, nfs, https, DVD Driver, later used by the different services connected address may be different:
        DVD drive ks = cdrom: / path / to / kickstart_file
        HTTP Server ks = http: // server_ip: port / path / to / kickstart_file
        HTTPS Server ks = https: // server_ip: port / path / to / kickstart_file
        FTP Server ks = ftp: // server_ip: port / path / to / kickstart_file
        NFS Server ks = nfs: server_ip: / path / to / kickstart_file
 
Install Centos Advanced:
  Through the above installation you find that every time we have to specify the path IP address address, subnet mask, gateway and ks.cfg file, we can not put into production ks.cfg file isolinux boot, assuming a network environment where already has a DHCP server which allows the host to automatically obtain IP address, and we just need to make isolinux CD into the drive, and then is wait wait, Centos 6 x86_64 has finished installation.

 We only need to be modified on the basis of the above can be achieved, make the following modifications;
(1) to copy the ks.cfg file under / tmp / cdrom / directory
123 [root @ node-2 tmp] # cp / var / www / html / ks / ks.cfg /tmp/cdrom/ks.cfg
[Root @ node-2 tmp] # ls / tmp / cdrom /
isolinux ks.cfg

(2) modify the ks.cfg file open NIC DHCP services, to automatically obtain an IP address, add the following line:
12 # Network information
network --bootproto = dhcp --device = eth0 --onboot = on # in the above ks.cfg file to "#" in front can be canceled;

(3) to switch to the / tmp / cdrom / isolinux / directory of the file to be modified isolinux.cfg
[Root @ node-2 ~] # cd / tmp / cdrom / isolinux / # to switch to the / tmp / cdrom / isolinux / directory
[Root @ node-2 isolinux] #chmod u + w * # add permissions to all files modified
[Root @ node-2 isolinux] # vimisolinux.cfg # compiler isolinux.cfg file later append plus ks = cdrom: /ks.cfg
label linux
  menu label ^ Install or upgrade an existingsystem
  menu default
  kernel vmlinuz
  append initrd = initrd.img ks = cdrom: /ks.cfg
(4) remake isolinux boot images
12 [root @ node-2 isolinux] # cd / tmp # Switch to the / tmp directory
[Root @ node-2 tmp] # mkisofs -RJ -T -v --no-emul-boot --boot-load-size 4 --boot-info-table -V "Centos6.6 X86_64 boot disk" -b isolinux / isolinux.bin -c isolinux / boot.cat -o / root / boot.iso cdrom /

(5) The /root/boot.iso downloaded to the local desktop, restart the virtual machine to install the system, select "Install or upgrade an existing system" tab, automated installation CentOS6.6 x86_64.

Tip: You can also specify the ks.cfg file when creating isolinux boot image to http Service ks / ks.cfg file, you can also do the ks.cfg file directly release the disc, according to your needs to automate installation.
 
summary:
This experiment has not used in a production environment, just to understand the CentOS installation process, so that by his own hand to make isolinux boot to provide CentOS installation image and ks.cfg file via http service, in order to achieve a semi-automated install CentOS system for better understanding of the future of fully automated installation of CentOS, do the next pre-installation process familiar.
     
         
         
         
  More:      
 
- How to update the ISPConfig 3 SSL Certificates (Server)
- Oracle 12c detailing the new features (Database)
- Inject script commands manually annotated summary (Linux)
- Git large file storage will help handle large binary files (Linux)
- A well-known but rarely used skills: object pool (Programming)
- C ++ in the elimination Wunused (Programming)
- Learning how to teach safety system to prevent your own IP leakage (Linux)
- Linux usage in echo (Linux)
- PCM audio under Linux (Linux)
- Linux disk partition batch format mount script (Linux)
- Ubuntu 15.04 and CentOS 7 to deploy .NET, Mono and DNX (Server)
- The official release method to upgrade to Ubuntu 15.04 (Linux)
- RedHat Linux 6.4 install Oracle 10g error (Database)
- Hadoop 0.23 compile common errors (Server)
- RHEL5 / 6 Installation Notes (Linux)
- Binary search is really easy as you think you do (Programming)
- Linux upgrade Glibc (Linux)
- The file name is garbled or deleted files with special characters under Linux (Linux)
- Hibernate learning introductory tutorial (Programming)
- Oracle 11g principle study Dataguard (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.