●无人值守安装KS文件(redhat用,删除下面中文)。

#LinuxIParm Config File
#Generated by LinuxIParm Configurator
#Boot Model UEFI
#System language
lang en_US
#System keyboard
keyboard jp106
#System timzone
timezone --utc Asia/ShaiHang
#System password
rootpw --iscrypted $$MnJHnXr8$C/yT9HAX/wM3XjxlkabXW0
#Reboot after installation
reboot
#install Linux intead of upgrade
install
#Use NFS installation media
nfs --server 192.168.0.20 --dir /(替换为NFS共享目录)/redhat7
#System bootloader configulation
bootloader --location=mbr
#Clear the Master Boot Record
zerombr
#Clear Partitions from the disk
clearpart --all --initlabel
#Disk partition information
part /boot/efi --fstype ext3 --size
part / --fstype ext3 --size
part /boot --fstype ext3 --size
#Use dhcp networking
network --bootproto dhcp --hostname redhat7UEFI
#System authorization information
auth --useshadow --enablemd5
#Firewall configuration
firewall --disabled
#XWindows configuration information
skipx
#Package install information
%packages
@ Core
@ X Window System
@ Development Tools
@ Network File System Client
glibc-*.i686
libgcc-*.i686
nss-softokn-freebl-*.i686
%end
#Script Command after install
%post #Auto Add APP Client
#Auto Add IA- Mode
NFSSERVER=192.168.0.20
APPServer=192.168.0.20 //TFTP所在服务器
#Dir Making
APPHOME=/opt/APPclient
mkdir -p $APPHOME
mkdir $APPHOME/APP
mkdir $APPHOME/APP/etc
mkdir $APPHOME/APP/bin
mkdir $APPHOME/APP/log
mkdir $APPHOME/APP/obj
#Mount /mnt/(替换为NFS共享目录)
mkdir /mnt
mkdir /mnt/test_For
/bin/mount -o nolock -t nfs $NFSSERVER:/(替换为NFS共享目录) /mnt/test_For
#File Copy(要做的处理)
rm -f $APPHOME/APP/bin/test.sh
cp -p /mnt/(替换为NFS共享目录)/某个文件夹/test.sh $APPHOME/bin
chmod $APPHOME/APP/bin/test.sh #UnMount /mnt/test_For
/bin/umount /mnt/test_For
#Delete MountPoint
rmdir /mnt/test_For
/bin/systemctl enable test-rc.service
/bin/systemctl daemon-reload
cp -p /etc/test-rc /etc/test-rc.org
sed -i '/^exit 0$/d' /etc/test-rc
echo "" >> /etc/test-rc
echo "chown root /etc/systemd/system/test.service" >> /etc/test-rc
echo "chgrp root /etc/systemd/system/test.service" >> /etc/test-rc
echo "chown root /usr/local/bin/testcancel" >> /etc/test-rc
echo "chgrp root /usr/local/bin/testcancel" >> /etc/test-rc
echo "chown -R root $APPHOME/APP" >> /etc/test-rc
echo "chgrp -R root $APPHOME/APP" >> /etc/test-rc
echo "cd $APPHOME/APP/bin" >> /etc/test-rc
echo "$APPHOME/APP/bin/test.sh -a" $APPServer >> /etc/test-rc
echo "exit 0" >> /etc/test-rc
chown root /etc/test-rc
chgrp root /etc/test-rc
chown root /etc/systemd/system/test-rc.service
chgrp root /etc/systemd/system/test-rc.service
%end

●ansfile应答文件(redhat用)

#LinuxIParm Config File
#LinuxOs Red Hat Enterprise Linux
#Boot Model UEFI
image=/TFTP目录/redhat7/vmlinuz
label=linux
initrd=/TFTP目录/redhat7/initrd.img
append="ks=nfs:192.168.0.20:/(替换为NFS共享目录)/ks/redhat7.cfg ksdevice=bootif IPAPPEND2"

网络安装OS(配置文件)的更多相关文章

  1. 通过 pxe(网络安装)完成centos 系统的网络安装

    首先交代环境.本地2台主机,一台windows主机,一台等待安装centos的主机.2台主机在同一个局域网.通过路由器自动获取ip上网. 网上大多数pxe安装方式都采用自己搭建dns服务器的方式来进行 ...

  2. Linux系统网络安装——基于pxe+dhcp+nfs+tftp+kickstart

    原文发表于:2010-09-05 转载至cu于:2012-07-21 一.原理简介 PXE(preboot execute environment)工作于Client/Server的网络模式,支持工作 ...

  3. vmware上搭建kickstart 网络安装centos6.2的过程

    前言 什么是PXE? PXE(Pre-boot Execution Environment,预启动执行环境)协议使计算机可以通过网络启动.协议分client和server. PXE client 在网 ...

  4. Mysql数据库介绍、安装和配置文件

    Mysql数据库介绍.安装和配置文件 MySQL数据库介绍 mysql是开源关系型数据库,遵循GPL协议. mysql的特点是性能卓越且服务稳定,开源,无版本限制,成本低,单进程多线程,多用户,基于C ...

  5. VIRTUALBOX 虚拟机安装 OS X 10.9 MAVERICKS

    VIRTUALBOX 虚拟机安装 OS X 10.9 MAVERICKS 原文链接:http://bbs.weiphone.com/read-htm-tid-7625465.html 原文作者已经写的 ...

  6. VMware 9 安装 OS X 10.8.4 并安装 Xcode 4.6

    转自:http://blog.csdn.net/weizi4332/article/details/9264799 学习Objective-C必须要有运行环境,Xcode是最好的选择.不过Window ...

  7. centos网络安装中的注意点

    转自centos网络安装中的注意点 centos网络安装的教程网上很多,这里仅仅记录一下安装过程中网上别处提及很少的注意点. 1.centos默认会安装selinux,并且默认阻止ftp服务,所以要禁 ...

  8. 网络安装CentOS 5.3

    转自网络安装CentOS 5.3 0. 基本要求 (1) 需要使用至少两台服务器:其中一台没有操作系统,是我们即将安装的服务器;另外一台是已经安装好操作系统的服务器,我们用来存储CentOS的安装文件 ...

  9. CentOS 6.0图解网络安装全过程

    转自CentOS 6.0图解网络安装全过程 国内镜像站点(东北大学.网易) 网易镜像站点:http://mirrors.163.com/centos/6.0/isos/ 中科大镜像站点:http:// ...

随机推荐

  1. oracle 11g AUTO_SAMPLE_SIZE动态采用工作机制

    Note that if you're interested in learning about Oracle Database 12c, there's an updated version of ...

  2. Centos 7 安装 Supervisor 及使用

    Supervisor官网链接:http://supervisord.org/installing.html 安装与设置开机启动: http://blog.csdn.net/fenglailea/art ...

  3. 360搜索引擎取真实地址-python代码

    还是个比较简单的,不像百度有加密算法 分析 http://www.so.com/link?url=http%3A%2F%2Fedu.sd.chinamobile.com%2Findex%2Fnews. ...

  4. [转] Java中的final、static、this、super

    final 关键字 final关键字主要用在三个地方:变量.方法.类. 对于一个final变量,如果是基本数据类型的变量,则其数值一旦在初始化之后便不能更改:如果是引用类型的变量,则在对其初始化之后便 ...

  5. vue的全局方法和局部方法

    var infiniteScroll = require('vue-infinite-scroll') 等价写法 import infiniteScroll from 'vue-infinite-sc ...

  6. ES6数字操作

    数字判断和转换 数字验证Number.isFinite( xx ) 可以使用Number.isFinite( )来进行数字验证,只要是数字,不论是浮点型还是整形都会返回true,其他时候会返回fals ...

  7. facebook api之Access Tokens

    Access Tokens When someone connects with an app using Facebook Login and approves the reqest for per ...

  8. 所有JTAG集成电路都应该支持菊花链

    菊花链 在电气和电子工程中,菊花链是一种布线方案,其中多个设备按顺序或环形连接在一起.相邻设备才能通信.菊花链可用于电源,模拟信号,数字数据或其组合. 但是由于菊花链的串联特性,如果任何一个设备从链路 ...

  9. 【NOIP 2015】Day2 T3 运输计划

    Problem Background 公元 \(2044\) 年,人类进入了宇宙纪元. Description 公元\(2044\) 年,人类进入了宇宙纪元. $L $国有 \(n\) 个星球,还有 ...

  10. python学习 day018打卡 反射

    本节主要内容: 1.isinstance,type,issubclass 2.区分函数和方法 3.反射(重点) 一.isinstance,type,issubclass issubclass():判断 ...