标签:man 图形 mount 菜单 sys $1 mask 复制 httpd
实验1:在centos7上cobbler实现pxe的自动化安装(2)要安装的机器的配置
关闭自动获取本地dhcp选项
设置网络模式
设置硬盘大小以适应ks中的分区
设置内存大小以防centos7图形安装内存不够
进入启动项界面,选择网络引导,以安装系统
实验2:centos6上实现cobbler自动化安装系统
(1)A机器搭建cobbler配置
yum install dhcp httpd syslinux tftp-server
cd /etc/yum.repos.d/
vim epel.repo
[epel]
name=epel_centos6
baseurl=https://mirrors.aliyun.com/epel/6/x86_64/
gpgcheck=0
yum repolist
yum install cobbler cobbler需要epel源提供包
service cobblerd start
chkconfig cobblerd on
chkconfig tftp on
service xinetd start
chkconfig --list
rpm -ql tftp-server
service httpd restart
vim /etc/cobbler/dhcp.template
option routers 172.18.62.5;
option domain-name-servers 223.5.5.5,8.8.8.8;
option subnet-mask 255.255.0.0;
range dynamic-bootp 172.18.62.200 172.18.62.254;
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
vim /etc/cobbler/settings
manage_dhcp: 1 必须有
next_server: 172.18.62.50
server: 172.18.62.50
default_password_crypted: "$1$K1U0gpRl$BXEnaaYVdarbjYbHP6WVh0"
注意:默认密码需要用openssl passwd -1命令生成
cobbler check
cobbler get-loaders
yum install pykickstart -y
vim /etc/xinetd.d/rsync
disable = no
service cobblerd restart
cobbler check
cobbler sync
ss -nutl
mkdir /mnt/centos6
mount /dev/sr0 /mnt/centos6
mkdir /mnt/centos7
mount /dev/sr1 /mnt/centos7
cobbler import --path=/mnt/centos6/ --name=Centos6.9-x86_64 --arch=x86_64
cobbler import --path=/mnt/centos7/ --name=Centos7.4-x86_64 --arch=x86_64
du -sh /var/www/cobbler/ks_mirror/
cobbler profile list
cobbler distro list
cobbler profile remove --name=Centos6.9-x86_64
cobbler profile add --name=Centos6.9-x86_64 --distro=Centos6.9-x86_64
cobbler profile --help
cobbler profile rename --help
cobbler profile rename --name=Centos6.9-x86_64 --newname=Centos6.9-mini-x86_64
重命名启动菜单;
cobbler profile rename --name=Centos7.4-x86_64 --newname=Centos7.4-mini-x86_64
重命名启动菜单;
cd /var/lib/cobbler/kickstarts/
rz 导入ks应答文件
vim ks6-pxe-desktop.cfg
url --url=$tree
vim ks7-pxe-desktop.cfg
url --url=$tree
cobbler profile add --name=Centos7.4-desktop-x86_64 --distro=Centos7.4-x86_64 --kickstart=ks7-pxe-desktop.cfg 添加启动菜单
cobbler profile add --name=Centos7.4-desktop-x86_64 --distro=Centos7.4-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks7-pxe-desktop.cfg 添加启动菜单
cobbler profile add --name=Centos6.9-desktop-x86_64 --distro=Centos6.9-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks6-pxe-desktop.cfg 添加启动菜单
cat /var/lib/tftpboot/pxelinux.cfg/default 查看添加菜单后的启动菜单文件
(2)要安装的机器的配置
关闭自动获取本地dhcp选项
设置网络模式
设置硬盘大小以适应ks中的分区
设置内存大小以防centos7图形安装内存不够
进入启动项界面,选择网络引导,以安装系统
标签:man 图形 mount 菜单 sys $1 mask 复制 httpd
原文地址:http://blog.51cto.com/angwoyufengtian/2129775