网络安装OS(配置文件)
●无人值守安装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(配置文件)的更多相关文章
- 通过 pxe(网络安装)完成centos 系统的网络安装
首先交代环境.本地2台主机,一台windows主机,一台等待安装centos的主机.2台主机在同一个局域网.通过路由器自动获取ip上网. 网上大多数pxe安装方式都采用自己搭建dns服务器的方式来进行 ...
- Linux系统网络安装——基于pxe+dhcp+nfs+tftp+kickstart
原文发表于:2010-09-05 转载至cu于:2012-07-21 一.原理简介 PXE(preboot execute environment)工作于Client/Server的网络模式,支持工作 ...
- vmware上搭建kickstart 网络安装centos6.2的过程
前言 什么是PXE? PXE(Pre-boot Execution Environment,预启动执行环境)协议使计算机可以通过网络启动.协议分client和server. PXE client 在网 ...
- Mysql数据库介绍、安装和配置文件
Mysql数据库介绍.安装和配置文件 MySQL数据库介绍 mysql是开源关系型数据库,遵循GPL协议. mysql的特点是性能卓越且服务稳定,开源,无版本限制,成本低,单进程多线程,多用户,基于C ...
- VIRTUALBOX 虚拟机安装 OS X 10.9 MAVERICKS
VIRTUALBOX 虚拟机安装 OS X 10.9 MAVERICKS 原文链接:http://bbs.weiphone.com/read-htm-tid-7625465.html 原文作者已经写的 ...
- VMware 9 安装 OS X 10.8.4 并安装 Xcode 4.6
转自:http://blog.csdn.net/weizi4332/article/details/9264799 学习Objective-C必须要有运行环境,Xcode是最好的选择.不过Window ...
- centos网络安装中的注意点
转自centos网络安装中的注意点 centos网络安装的教程网上很多,这里仅仅记录一下安装过程中网上别处提及很少的注意点. 1.centos默认会安装selinux,并且默认阻止ftp服务,所以要禁 ...
- 网络安装CentOS 5.3
转自网络安装CentOS 5.3 0. 基本要求 (1) 需要使用至少两台服务器:其中一台没有操作系统,是我们即将安装的服务器;另外一台是已经安装好操作系统的服务器,我们用来存储CentOS的安装文件 ...
- CentOS 6.0图解网络安装全过程
转自CentOS 6.0图解网络安装全过程 国内镜像站点(东北大学.网易) 网易镜像站点:http://mirrors.163.com/centos/6.0/isos/ 中科大镜像站点:http:// ...
随机推荐
- 《web前端设计基础——HTML5、CSS3、JavaScript》 张树明版 简答题简单整理
web前端设计基础——HTML5.CSS3.JavaScript 简答题整理 第一章 (1)解释一下名词的含义:IP地址.URL.域名 iP定义了如何连入因特网,以及数据如何在主机间传输的标准. ...
- Ubuntu mysql数据库导入sql文件
在阿里云Ubuntu系统导入sql数据库文件 首先linux 下查看mysql相关目录 root@ubuntu14:~# whereis mysql mysql: /usr/bin/mysql--- ...
- Python3 Iterator and Generator
Python3 Iterator and Generator iterator 主要是利用 iter 函数 >>> list=[1,2,3,4] >>> it = ...
- KPI 私有CA
openssl总结及私有CA的搭建 搭建CA服务器 CA(证书颁发机构)服务器配置图解过程(1) 私有CA服务器的搭建 搭建CA服务器 使用OpenSSL搭建CA Linux加密和解密.openssl ...
- update与select关联执行效率问题
UPDATE fl_user_space u SET u.`course_count` = (SELECT COUNT(*) FROM fl_course c WHERE c.uid = u.uid) ...
- PHP 重置数组为连续数字索引的几种方式
原文链接:https://blog.csdn.net/zhang197093/article/details/78606916 推荐的方式 array_values 方法 这样方式无论对普通数组还是 ...
- WIN10安装和使用MySql5.6中遇到的一些问题与解决
WIN10安装和使用MySql5.6中遇到的一些问题与解决 提示一下,安装前需要安装python环境. MySql安装缺少组件MySQL for Excel 如图(转载别人的图,自己的安装时没有截图) ...
- Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) Problem E (Codeforces 831E) - 线段树 - 树状数组
Vasily has a deck of cards consisting of n cards. There is an integer on each of the cards, this int ...
- Bootstrap3基础 btn-xs/sm... 按钮的四种大小
内容 参数 OS Windows 10 x64 browser Firefox 65.0.2 framework Bootstrap 3.3.7 editor ...
- CSS的再深入(更新中···)
在上一章我们提到了一个新的概念,叫做块级样式,讲到这里就要科普一下: 标签又分为两种: (1)块级标签 元素特征:会独占一行,无论内容多少,可以设置宽高··· (2)内敛标签(又叫做行内标签) 元素特 ...