Cobbler实现开机自动安装CentOS 7.1 X86_64
2015-11-29 00:55
423 查看
1、安装准备
本文出自 “万越天的架构师之路” 博客,请务必保留此出处http://wanyuetian.blog.51cto.com/3984643/1717855
[root@linux-node1 ~]# yum install cobbler cobbler-web dhcp tftp-server pykickstart httpd -y [root@linux-node1 ~]# /etc/init.d/httpd restart2、安装配置Cobbler
[root@linux-node1 ~]# /etc/init.d/cobblerd start [root@linux-node1 ~]# cobbler check The following are potential configuration items that you may want to fix: 1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it. 2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network. 3 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run ' cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements. 4 : change 'disable' to 'no' in /etc/xinetd.d/rsync 5 : reposync is not installed, need for cobbler reposync, install/upgrade yum-utils? 6 : debmirror package is not installed, it will be required to manage debian deployments and repositories 7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one 8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them Restart cobblerd and then run 'cobbler sync' to apply changes.第一步+第二步
vim /etc/cobbler/settings server: 10.0.0.7 next_server: 10.0.0.7 manage_dhcp: 1第三步:
cobbler get-loaders第四步:
[root@linux-node1 ~]# vim /etc/xinetd.d/rsync change 'disable' to 'no' [root@linux-node1 ~]# /etc/init.d/xinetd restart第七步:
openssl passwd -1 -salt 'oldboy' 'oldboy' default_password_crypted: "$1$oldboy$fXF8f078vI9J/q9XyXA8e/" [root@linux-node1 ~]# yum install -y debmirror yum-utils fence-agents [root@linux-node1 ~]# /etc/init.d/cobblerd restart [root@linux-node1 ~]# cobbler check [root@linux-node1 ~]#vim /etc/cobbler/dhcp.template subnet 10.0.0.0 netmask 255.255.255.0 { option routers 10.0.0.2; option domain-name-servers 10.0.0.2; option subnet-mask 255.255.255.0; range dynamic-bootp 10.0.0.100 10.0.0.200;##Cobbler同步
[root@linux-node1 ~]# cobbler sync [root@linux-node1 ~]# cobbler import --path=/mnt/ --name=CentOS-7.1-x86_64 --arch=x86_64
KS文件放这里: cd /var/lib/cobbler/kickstarts/ [root@linux-node1 kickstarts]# mv Cobbler-CentOS-7.1-x86_64.cfg CentOS-7.1-x86_64.cfg [root@linux-node1 kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-7.1-x86_64.cfg [root@linux-node1 kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kopts='net.ifnames=0 biosdevname=0' #修改Cobbler提示 vim /etc/cobbler/pxe/pxedefault.template MAC 00:0C:29:2B:4E:83 cobbler system add --name=oldboy --mac=00:0C:29:2B:4E:83 --profile=CentOS-7.1-x86_64 --ip-address=10.0.0.111 --subnet=255.255.255.0 --gateway=10.0.0.2 --interface=eth0 --static=1 --hostname=oldboy.example.com --name-servers=10.0.0.2
本文出自 “万越天的架构师之路” 博客,请务必保留此出处http://wanyuetian.blog.51cto.com/3984643/1717855
相关文章推荐
- Linux学习笔记(2)之目录操作
- linux下面误删root里面的文件夹 恢复方法~~
- 第十六天-linux文件系统特殊权限suid-sgid
- linux下工作一些实用工具的总结贴
- crt使用root帐号登录linux
- linux中挂载磁盘步骤
- linux中ssh免密码登录
- 每日一个Linux命令 pwd
- 每日一个Linux &
- Linux下Gcc生成和使用静态库和动态库详解
- kickstart实现开机自动安装CentOS 7.1 X86_64
- Linux终端合并7z的分卷文件(*.7z.001 *.7z.001)
- Linux bc命令
- Linux学习笔记(1)之相对、绝对路径
- Linux下自定义虚拟串口驱动
- 解决:CentOS下的 error while loading shared libraries: libmysqlclient.so.16: cannot open shared object fi
- Linux常用服务部署与优化
- Linux笔记分享-crazychao
- CentOS下安装xampp
- 登录linux系统设置默认目录