Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1508273
  • 博文数量: 793
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 5488
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(793)

文章存档

2020年(135)

2019年(214)

2018年(216)

2017年(146)

2016年(82)

分类: LINUX

2018-07-16 16:23:00

https://blog.csdn.net/sxy2475/article/details/78015262

#!/bin/bash
systemctl disable firewalld.service
systemctl stop firewalld.service
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
nmcli connection show
nmcli connection modify "ens3" ipv4.addresses 192.168.27.132/24 ipv4.gateway 192.168.27.1
yum install -y dhcp tftp-server httpd syslinux
systemctl enable httpd.service
systemctl start httpd.service
mkdir -pv  /var/www/html/centos/7
mount /dev/sr0 /var/www/html/centos/7/
mkdir /var/www/html/ksdir/
cp -p /root/anaconda-ks.cfg /var/www/html/ksdir/ks7-1.cfg
chmod +r /var/www/html/ksdir/*.cfg
systemctl enable tftp.socket
systemctl start tftp.socket
cp /usr/share/doc/dhcp*/dhcpd.conf.example /etc/dhcp/dhcpd.conf
systemctl enable dhcpd
systemctl start dhcpd
mkdir /var/lib/tftpboot/pxelinux.cfg/
mkdir /var/lib/tftpboot/centos7
cp /usr/share/syslinux/{pxelinux.0,menu.c32} /var/lib/tftpboot/
cp /var/www/html/centos/7/isolinux/{initrd.img,vmlinuz}  /var/lib/tftpboot/centos7
cp /var/www/html/centos/7/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default


label centos7 #自动安装centos7 menu label Auto Install CentOS Linux ^7 
kernel centos7/vmlinuz 
append initrd=centos7/initrd.img ks=http://192.168.27.187/ksdir/ks7-1.cfg 
----------
阅读(242) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~