码迷,mamicode.com
首页 > 其他好文 > 详细

第七周学习总结

时间:2019-07-04 13:00:59      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:port   The   步骤   ice   dhcp   magedu   mod   高可用   端口   

第七周学习总结

内容总结

  这一周学习的主要内容是操作系统的自动化安装,还有cobbler。cobbler是基于kickstart来实现自动化安装系统的,cobbler实质是把kickstart经过封装后,以web界面的方式,可以让我们以简单粗暴的方式自定义自已的系统。

安装cobbler

首先我们需要epel源

[root@magedu ~]#yum -y install cobbler cobbler-web dhcp tftp-server pykickstart httpd

然后我们需要检查还有哪些步骤需要做

[root@magedu ~]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.    #设置server端Ip地址
2 : For PXE to be functional, the ‘next_server‘ field in /etc/cobbler/settings must be set to something other than 128.0.0.1, and should match the IP of the boot server on the PXE network.   #PXE设置
3 : change ‘disable‘ to ‘no‘ in /etc/xinetd.d/tftp  #把disable改为no
4 : 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.  #需要下载,运行cobbler get-loaders即可
5 : change ‘disable‘ to ‘no‘ in /etc/xinetd.d/rsync  #disable改为no
6 : file /etc/xinetd.d/rsync does not exist  #没有这个文件
7 : debmirror package is not installed, it will be required to manage debian deployments and repositories  #可忽略
8 : 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  #提示需要修改root密码
9 : 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.

把下载好的命令传过来解压,由于官方下载的太慢,所以这里使用下载好的直接解压

[root@magedu ~]rz -E
rz waiting to receive.
[root@magedu ~]# ls
anaconda-ks.cfg  cobbler_load.tar.gz  install.log  install.l/og.syslog
[root@magedu ~]# tar xfP cobbler_load.tar.gz
[root@magedu ~]# cobbler sync
task started: 2017-04-12_172139_sync
task started (id=Sync, time=Wed Apr 12 17:21:39 2017)
running pre-sync triggers
cleaning trees
removing: /var/lib/tftpboot/grub/images
copying bootloaders
trying hardlink /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
trying hardlink /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
trying hardlink /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
trying hardlink /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk
trying hardlink /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
trying hardlink /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying distros to tftpboot
copying images
generating PXE configuration files
generating PXE menu structure
rendering TFTPD files
generating /etc/xinetd.d/tftp
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***
[root@magedu ~]# /etc/init.d/xinetd restart
Stopping xinetd:                                           [FAILED]
Starting xinetd:                                           [  OK  ]
[root@magedu ~]# /etc/init.d/cobblerd restart
Stopping cobbler daemon:                                   [  OK  ]
Starting cobbler daemon:                                   [  OK  ]
[root@magedu ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for CentOS6
httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName
[  OK  ]
sed -i ‘s#192.168.1#172.16.1#g;22d;23d‘ /etc/cobbler/dhcp.template

检查端口
[root@magedu ~]# ss -luntp|grep dhcp
[root@magedu ~]# cobbler sync
挂载
[root@magedu ~]#mount /dev/cdrom /mnt
接下来进行web界面的操作
在浏览器输入http://ip/cobbler_web即可访问

第七周学习总结

标签:port   The   步骤   ice   dhcp   magedu   mod   高可用   端口   

原文地址:https://blog.51cto.com/14322573/2417005

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!