Cobbler Introduction
Cobbler (Cobbler) is a fast network installation service for Linux servers and can be adjusted to support network installation of Windows.
The tool, developed in Python, is small and lightweight (15k-line Python code) that allows you to quickly install, reinstall physical servers and VMS in a network boot (PXE) manner, while also managing Dhcp,dns,tftp, rsync, and Yum repositories, Constructs the system ISO image.
Cobbler can be managed using the command line, also provides a web-based interface management tool (Cobbler-web), and also provides API interfaces that can be used two times for development.
Cobbler is an upgraded version of the earlier kickstart, with the advantage of being relatively easy to configure, and also easy to manage with its own web interface.
Cobbler has built-in a lightweight configuration management system, but it also supports integration with other configuration management systems, such as puppet, and temporarily does not support saltstack.
Cobbler client Koan supports virtual machine installation and operating system reinstallation, making reloading systems easier.
In short, it has installed the Linux network technology threshold, from the college level, the success of lower to junior high school, even the shoemaker can learn!
http://cobbler.github.io/, this is the official website.
Lab Environment :
centos7.5 ip:192.168.116.128
Win7 ip:192.168.2.92
Objective: To set up cobbler to realize remote and fast unattended Centos7 machine.
Steps:
First of all, let's do some preliminary preparation.
Determine access to the outside network, ping Baidu try.
Shutting down the firewall
SELinux
#wget-o/etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo #cobbler安装必须使用到epel源
# yum Install cobbler cobbler-web pykickstart httpd DHCP tftp-server–y #安装Cobbler
Installation Notes:
Cobbler #cobbler程序包
Cobbler-web #cobbler的web服务包
Pykickstart #cobbler检查kickstart语法错误
httpd #Apache Web Services
DHCP #dhcp服务
Tftp-server #tftp服务
Start Cobblerd and httpd
# Systemctl Start httpd
# Systemctl Start Cobblerd
Remember to use status to detect success after launch!
Check the configuration file
# Cobbler Check
There are a lot of problems to solve.
Workaround
1. Modify the value of the server parameter in the/etc/cobbler/settings file to the corresponding IP address or host name of the host that provided the Cobbler service
#sed-i ' s/server:127.0.0.1/server:192.168.116.128/'/etc/cobbler/settings
#sed-i ' s/next_server:127.0.0.1/next_server:192.168.116.128/'/etc/cobbler/settings
Check it out.
#grep "server:192.168.116.128" settings
2. Modify the Disable parameter in the/etc/xinetd.d/tftp file to disable = no
Go and modify it.
3. Execute the Cobbler get-loaders command to download the bootloader
# Cobbler Get-loaders
4. Start the RSYNCD service.
# Systemctl Enable RSYNCD #开启rsync的服务开机自启动
# Systemctl Start Rsyncd #开启rsync的服务
5. Generate a password to replace the default password to enhance your security.
# OpenSSL passwd-1-salt ' 123123 ' 123123 ' #生成一个叫123123的加密信息
Copy this line generated garbled, be sure not to miss the word.
# vim/etc/cobbler/settings #替换主配置文件中的默认密码
Location in this:
The Scarlet Letter section is replaced by the garbled characters that were just generated.
6. Configure DHCP
#vim/etc/cobbler/dhcp.template
Edit here, the IP address and network segments are changed to their own.
Configuration of synchronous Cobbler
# Cobbler Sync
Re-detect the error, these three items can be used without the tube, will not affect the startup.
Finally, all the services are set to boot, all services are restarted again.
Boot up
# Systemctl Enable Dhcpd.service
# Systemctl Enable Rsyncd.service
# Systemctl Enable Tftp.service
# Systemctl Enable Httpd.service
# Systemctl Enable Cobblerd.service
Restart
# systemctl Restart Dhcpd.service
# systemctl Restart Rsyncd.service
# systemctl Restart Tftp.service
# systemctl Restart Httpd.service
# systemctl Restart Cobblerd.service
Import Mirror
Make sure the image file is already mounted under/mnt
#cobbler import--path=/mnt/--name=centos-7-x86_64--arch=x86_64 #根据需求导入, it takes a while.
#--path Mirror Path
#--name defines a name for the installation source
#--ARCH Specifies that the installation source is 32-bit, 64-bit, IA64, and the currently supported options are: X86│x86_64│ia64
Confirm Import Success
Restart all services!
Finally, according to the requirements of the configuration ks.cfg can complete the automatic installation
Experiment with an empty virtual machine.
Start the ESC quickly, select Fourth
Start installing the system
When we're done, we'll get a centos7 of the character interface, which is done.
installation and configuration of the Cobbler Web management interface
The new Cobbler Web interface uses HTTPS
Login Url:https://192.168.116.128/cobbler_web
Default User name: Cobbler
Default Password: Cobbler
/ETC/COBBLER/USERS.CONF # Web Service Authorization Profile
/etc/cobbler/users.digest # User name password configuration file for Web Access
#在Cobbler组添加mod用户.
# htdigest/etc/cobbler/users.digest "Cobbler" Moz
Sync under
#obbler Sync
Try to login
Complete!
centos7+ build Cobblerweb Remote Fast Machine