1、cobbler工做流程linux
2、 准备工做web
下面开始配置环境检查 出来的问题centos
在主配置文件/etc/cobbler/settings里进行一些设置安全
server: 192.168.163.100 # 384行,cobbler的服务器地址,本机IP地址
next_server: 192.168.163.100 # 272行,TFTP的服务器的IP地址,通常装在本机。填写本机ip便可
centos6中的老提示,启动TFTP服务的,6中tftp服务由xinted接管的,因此须要设置启动。服务器
- 若是能够联网的状况下,可使用命令
cobbler get-loaders
便可- 没有联网联网,则须要安装syslinux程序包,然后复制/usr/share/syslinux/{pxelinux.0,menu.c32}等文件到/var/lib/cobbler/loaders/目录中
- 使用 openssl passwd -1 生成密码,替换/etc/cobbler/settings文件中 default_password_crypted参数的值
- 从新启动cobbler服务
- 而后使用 cobbler sync 同步文件数据
CentOS7中其余的错误不影响使用。
使用cobbler帮助生成dhcp配置文件网络
- /etc/cobbler/setttings配置文件中 manage_dhcp: 0 参数设置为1,则cobbler自动生成DHCP配置文件
- /etc/cobbler/dhcp.template dhcp的配置模版文件
subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.254; option domain-name-servers 192.168.1.1; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.1.100 192.168.1.254; default-lease-time 21600; max-lease-time 43200; next-server $next_server; #修改IP的范围 网段 网关 等属性便可
cobbler import --path=/mnt/7 --name=CentOS7.4 --arch=x86_64 # --path 光盘挂载路径 --name 生成的包名 --arch 系统架构 cobbler import --path=/mnt/6 --name=CentOS6.9 --arch=x86_64 du -sh /var/www/cobbler/ks_mirror/ #能够查看生成大小,生成包所在的路径
能够修改/var/lib/tftpboot/pxelinux.cfg/default 的文件内容,本身指定ks(kickstart文件)的路径。 ks文件能够根据本身的需求编写。
url --url=$tree 安装源路径
开启后能够看见以下图:架构
3、cobbler的一些命令使用dom
cobbler check # 核对当前设置是否有问题 cobbler list # 列出全部的cobbler元素 cobbler report # 列出元素的详细信息 cobbler sync # 同步配置到数据目录,更改配置最好都要执行下 cobbler reposync # 同步yum仓库 cobbler distro # 看导入的发行版系统信息 cobbler distro list # 几套安装系统 cobbler system # 查看添加的系统信息 cobbler profile # 查看配置信息 cobbler profile list #查看安装系统的启动菜单项
四 、cobbler-web的实现
cobbler-web访问要基于ssl加密,因此须要mod_ssl安全包。
查看文件 /etc/cobbler/modules.confsocket
# authn_denyall -- no one (default) # authn_configfile -- use /etc/cobbler/users.digest (for basic setups) # authn_passthru -- ask Apache to handle it (used for kerberos) # authn_ldap -- authenticate against LDAP # authn_spacewalk -- ask Spacewalk/Satellite (experimental) # authn_pam -- use PAM facilities # authn_testing -- username/password is always testing/testing (debug) [authentication] module = authn_configfile #密码的验证方式,基于/etc/cobblerusers.digest 文件账号验证
建立Cobbler管理帐号ide
htdigest -c /etc/cobbler/users.digest Cobbler cobbleradmin # 给Cobbler建立 账号 为 cobbleradmin # 而后开始输入要建立的账号的密码
下面就能够操做web界面了。
[authentication] module = authn_pam
[admins] admin = "cobbler " #输入要登录的linux系统普通用户名 cobbler = "" #不用填写
服务重启后,登录时使用 这个用户名登录便可。