Centos6.6 ks
2015-09-01 10:55
579 查看
Data:2015/3/29 6:02:27
适用于pxe+kickstart环境
#platform=x86, AMD64, or Intel EM64T #version=DEVEL # Firewall configuration firewall --disabled # Install OS instead of upgrade install # Use network installation url --url="http://192.168.1.106/cobbler/ks_mirror/centos6.6-x86_64" # Root password rootpw --plaintext centos # System authorization information auth --useshadow --passalgo=sha512 # Use text mode install text # System keyboard keyboard us # System language lang en_US # SELinux configuration selinux --disabled # Do not configure the X Window System skipx # Installation logging level logging --level=info # Reboot after installation reboot # System timezone timezone Asia/Shanghai # Network information network --bootproto=dhcp --onboot=on --noipv6 # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --fstype="ext4" --size=431 part / --fstype="ext4" --size=18000 part swap --fstype="swap" --size=2048 %packages @base @console-internet @core @debugging @directory-client @hardware-monitoring @large-systems @network-file-system-client @performance @perl-runtime @server-platform @server-policy @workstation-policy pax oddjob sgpio device-mapper-persistent-data samba-winbind certmonger pam_krb5 krb5-workstation perl-DBD-SQLite %end %post --interpreter /bin/bash IP=`ifconfig eth0 | grep inet | grep -v inet6 | awk -F[' ':]+ '{print $4}'` MASK=`ifconfig eth0 | grep inet | grep -v inet6 | awk -F[' ':]+ '{print $8}'` GATE=`route -n | grep UG | awk '{print $2}'` sed -i "s@\(^H.*=\).*@\1server-$IP@g" /etc/sysconfig/network sed -i "s@\(^BOOT.*=\).*@\1static@g" /etc/sysconfig/network-scripts/ifcfg-eth0 echo "IPADDR=$IP" >> /etc/sysconfig/network-scripts/ifcfg-eth0 echo "NETMASK=$MASK" >> /etc/sysconfig/network-scripts/ifcfg-eth0 echo "GATEWAY=$GATE" >> /etc/sysconfig/network-scripts/ifcfg-eth0 %end
相关文章推荐
- linux命令基础(3)
- linux查看文件和文件夹大小
- linux工具问题,tail -f 失效
- linux下makefile的基本语法
- Linux/Unix 怎样找出并删除某一时间点的文件(转)
- linux yum 安装 配置 使用 mysql
- Linux常用命令大全
- linux命令之grep
- Linux下mount 远程Windows的文件夹
- Kail Linux渗透测试教程之在Metasploit中扫描
- Kail Linux渗透测试教程之在Metasploit中扫描
- Linux内核的学习总结(一)
- linux下常用mysql命令(3)
- Linux文件系统相关权限及正则表达式相关命令grep、egrep的使用说明
- linux下常用mysql命令(2)
- Linux文件系统的特殊权限
- linux中touch命令参数修改文件的时间戳(转)
- linux下常用mysql命令(1)
- linux之cp/scp命令+scp命令详解(转)
- TQ2440 学习笔记—— 9、嵌入式编程基础知识【arm-linux-gcc 选项】