Automatically install the Linux system based on cobbler

Automatically install the Linux system based on cobbler

1. Install components

yum install epel-rpm-macros.noarch -y #Install epel source yum install -y cobbler cobbler-web dhcp tftp-server pykickstart httpd rsync xinetd
cobbler \ ##Install cobbler\
cobbler-web \ ##Provide web management dhcp \ ##Address allocation service tftp-server \ ##Put compression and boot files pykickstart \ ##Kickstart developed by Python
httpd \ ##Provide web
rsync \ ##Remote synchronization management xinetd ##Management platform

2. Configure cobbler

vim /etc/cobbler/settings #Open the configuration file and modify the following items next_server: 10.1.1.1 #Set the listening IP address server: 10.1.1.1
manage_dhcp: 1 # Enable dhcp
vim /etc/xinetd.d/tftp #Configure tftp, enable tftp 


openssl passwd -1 -salt '123456' '123456' #Use ssl to encrypt the password [root@localhost ~]# openssl passwd -1 -salt '123456' '123456' 
$1$123456$wOSEtcyiP2N/IfIl15W6Z0 #Copy the generated encrypted password vim /etc/cobbler/settings #Open the cobbler configuration file and find the following password option default_password_crypted:$1$123456$wOSEtcyiP2N/IfIl15W6Z0 #Paste the encrypted password just generated here. This is the default password for the root system after installation. Encrypt and store it

3. Configure DHCP service and start the service

vim /etc/cobbler/dhcp.template #Configure dhcp service and modify the following items 


systemctl restart syncd.service #Start the synchronization service cobbler sync #Synchronize the configuration file just now to each software systemctl restart cobblerd.service dhcpd.service httpd.service xinetd.service
#Start cobblerd dhcp and other services

4. Import the iso file and check the storage location of the system boot kernel

mount /dev/cdrom /mnt # Mount the iso file in the mnt directory 


cobbler import --path=/mnt/ --name=Centos-7-x86_64 --arch=x86_64
#Specify the path and save the name to copy the image to cobbler 


cobbler list # View the images saved on the current system 



cd /var/www/cobbler/ks_mirror/ #This directory is where the mirror is stored 


#Here you can see that the image files are copied to this directory and managed cd /var/lib/tftpboot/images #This directory stores the microkernel installed by the boot system 

systemctl restart cobblerd.service dhcpd.service httpd.service xinetd.service #Restart each service again

5. Prepare a computer without system and select network card to start


#When this screen appears, it means success. The system will be automatically installed just by making a cup of tea.



The installation is complete, the root password is "123456", which is the one used to log in to the web management with SSL encryption before
https://192.168.1.111/cobbler_web #Replace the middle IP with your own


6. Simply configure the ks file and install it using the ks file

cp anaconda-ks.cfg /var/lib/cobbler/kickstarts/center7.ks
#Find an installed system and copy the ks file in the root directory to the directory where cobbler saves ks. The ks file configuration in the root directory is automatically generated after the system is installed and the parameters set this time.

vim /var/lib/cobbler/kickstarts/center7.ks #Modify the ks file just copied



#Comment out cdrom and replace it with url --url=http://192.168.1.111/cobbler/ks_mirror/Centos-7-x86_64/
Note that when you access the changed URL in a browser, make sure the client can access it.



cobbler profile add --name=CentOS7 --distro=Centos-7-x86_64 --kickstart=/var/lib/cobbler/kickstarts/center7.ks #Add a startup item

#Indicates adding a startup item named CentOS7, the image file is Centos-7-x86_64, and the ks file is center7.ks

cobbler list #View related data



#You can see here that there is an additional startup item. When installing, select this newly added startup item to call the ks file and complete the automatic installation



#The system I installed before had a desktop, so the ks configuration also had a desktop.

View and delete startup items



cobbler profile list #Display only startup items cobbler profile remove --name=CentOS7 #Delete the startup item named CentOS7

Summarize

The above is the editor's introduction to the automatic installation of Linux system based on cobbler. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Automatically install the Linux system based on cobbler
  • Cobbler batch installation operating system configuration method
  • How to install Maven automatically in Linux continuous integration
  • MySQL 5.6.24 (binary) automatic installation script under Linux
  • How to configure SVN under Linux to achieve automatic update of project directory and source code installation
  • MariaDB 10 automated installation and deployment on Linux servers
  • How to install Redis database under Linux and share the automatic startup script
  • Shell script to automatically install JDK in Linux system

<<:  JavaScript deshaking and throttling examples

>>:  Vue.js implements image switching function

Recommend

js+css to realize three-level navigation menu

This article example shares the specific code of ...

In-depth explanation of the locking mechanism in MySQL

Preface In order to ensure the consistency and in...

Vue two fields joint verification to achieve the password modification function

Table of contents 1. Introduction 2. Solution Imp...

Introducing icons by implementing custom components based on Vue

Preface In project development, there are many wa...

Html tips to make your code semantic

Html semantics seems to be a commonplace issue. G...

Specific use of ES6 array copy and fill methods copyWithin() and fill()

Table of contents Batch copy copyWithin() Fill ar...

JavaScript to implement the function of changing avatar

This article shares the specific code of JavaScri...

Linux sudo vulnerability could lead to unauthorized privileged access

Exploiting a newly discovered sudo vulnerability ...

Use semantic tags to write your HTML compatible with IE6,7,8

HTML5 adds more semantic tags, such as header, fo...

JavaScript Canvas draws dynamic wireframe effect

This article shares the specific code of JavaScri...

How to draw special graphics in CSS

1. Triangle Border settings Code: width: 300px; h...

Notes on configuring multiple proxies using vue projects

In the development process of Vue project, for th...

Xftp download and installation tutorial (graphic tutorial)

If you want to transfer files between Windows and...

Summary of data interaction between Docker container and host

Preface When using Docker in a production environ...