Skip to content

天楚锐齿

人工智能 云计算 大数据 物联网 IT 通信 嵌入式

天楚锐齿

  • 下载
  • 物联网
  • 云计算
  • 大数据
  • 人工智能
  • Linux&Android
  • 网络
  • 通信
  • 嵌入式
  • 杂七杂八

RHEL5.x的KichStart配置文件

2018-03-12

ks.cfg文件,支持Centos5.x(rhel5.x):

install
#upgrade

autostep

url –url ftp://10.24.1.5/tftpd_v5/OS_iso
#nfs –server=192.168.9.20 –dir=/media/cdrom

# skip keynumber input.
key –skip

lang en_US
#langsupport en_US zh_CN –default=en_US

keyboard us
#mouse
timezone Asia/Shanghai

#auth  –useshadow  –enablemd5
authconfig –enableshadow –passalgo=sha512 –enablefingerprint
rootpw borqs123

clearpart –all

bootloader –location=mbr

#skipx

zerombr yes

# <<<<<<<<<<< if you use U disk to boot, you must plugout U disk before partition. >>>>>>>>>>>>
part swap –recommended –asprimary –ondisk sda
part /boot –fstype ext3 –size 128 –asprimary –ondisk sda
part / –fstype ext3 –size 102400 –asprimary –ondisk sda
# others should be non-asprimary partition.
#part /d –fstype ext3 –size 819200 –ondisk sda
part /data1 –fstype ext3 –size 1 –grow –ondisk sda

# <<<<<<<< modify IP and HOSTNAME >>>>>>>>
network –device=eth0 –onboot yes –bootproto=static –ip=10.24.1.240 –netmask=255.255.255.0 –gateway=10.24.1.1 –hostname=nd0-rack2-cloud –nameserver=211.162.78.1
firewall –disabled

reboot

####################################################################################
##################################### packages #####################################
####################################################################################

repo –name=”Red Hat Enterprise Linux”  –baseurl=ftp://10.24.1.5/tftpd_v5/OS_iso/

# @ means group id, other means package id
%packages –resolvedeps
@Administration Tools
@Base
@Chinese Support
@Core
@Development
@Development Libraries
@Development Tools
@Editors
@Java
@Java Development
@Miscellaneous Included Packages
@MySQL Database
@Network Servers
@OpenFabrics Enterprise Distribution
@Ruby
@Server Configuration Tools
@System Tools
@Text-based Internet
@Web Server

####################################################################################
##################################### POST –nochroot ##############################
####################################################################################
%post –nochroot
#!/bin/bash
# Uncomment the next line if you want to see what’s happening behind the scenes, or use Ctrl+Alt+F1/F2/F3/F4/F5/F6 to check.
#chvt 3
ls /mnt/sysimage
mkdir /mnt/sysimage/root/ganglia
cd /mnt/sysimage/ganglia/
wget -r ftp://10.24.1.5/ganglia/*
ls /mnt/sysimage/ganglia

mkdir /mnt/sysimage/root/linux_tools
cd /mnt/sysimage/linux_tools/
wget -r ftp://10.24.1.5/linux_tools/*
ls /mnt/sysimage/linux_tools

mkdir /mnt/sysimage/LINUX_DVD
cd /mnt/sysimage/LINUX_DVD/
# Centos5.x and RHEL5.x don’t support “wget -r” operation, need you to copy the DVD to target.
wget -r ftp://10.24.1.5/tftpd_v5/OS_iso/*
ls /mnt/sysimage/LINUX_DVD

####################################################################################
##################################### POST #########################################
####################################################################################

%post
#!/bin/bash
cat /proc/cmdline
ls /
echo ls /mnt/
echo ls /media/

# For testing, comment out the next section to save time.
# For production, uncomment the section to ensure all updates are installed.
# If you uncomment this section, make sure you uncomment
# chvt 3 (above) and chvt 7 (below) so that you can see what’s going on.
# If you are behind an HTTP proxy, uncomment and adjust the http_proxy line.
#export http_proxy=http://your_proxy_username:your_proxy_password@your_proxy_hostname:your_proxy_port
#yum -y update

chkconfig sendmail off
chkconfig iptables off
chkconfig ip6tables off
chkconfig ntpd on
echo “session    required     pam_limits.so” >> /etc/pam.d/login
echo “*               soft    nproc           1000000” >> /etc/security/limits.conf
echo “*               hard    nproc           1000000” >> /etc/security/limits.conf
echo “*               soft    nofile          1000000” >> /etc/security/limits.conf
echo “*               hard    nofile          1000000” >> /etc/security/limits.conf
echo “*               soft    core            1024000” >> /etc/security/limits.conf
echo “*               hard    core            1024000” >> /etc/security/limits.conf
echo “*               soft    memlock         32000” >> /etc/security/limits.conf
echo “*               hard    memlock         32000” >> /etc/security/limits.conf
echo “*               soft    stack           102400” >> /etc/security/limits.conf
echo “*               hard    memlock         32000” >> /etc/security/limits.conf
echo “*               hard    stack           102400” >> /etc/security/limits.conf
echo “*               soft    msgqueue        8192000” >> /etc/security/limits.conf
echo “*               hard    msgqueue        8192000” >> /etc/security/limits.conf

############ Modify ntp.conf #################
cat << EOF >> /etc/ntp.conf

# —————————————————————–
# Modified /etc/ntp.conf by kickStart.
# —————————————————————–
server ntp.fudan.edu.cn prefer

EOF

############ Modify rc.local for normal running #################
cat << EOF >> /etc/rc.local

echo
echo —————————————————————–
echo Modified /etc/rc.d/rc.local by kickStart.
echo —————————————————————–

# do anything you want to do for normal running.

EOF

############ Modify rc.local for first time running#################
cp /etc/rc.d/rc.local /etc/rc.d/rc.local.orig
cat << EOF >> /etc/rc.local

# do anything you want to do for first time running.
cd /root/ganglia
wget -r ftp://10.24.1.5/ganglia/*
cd /root/linux_tools
wget -r ftp://10.24.1.5/linux_tools/*
cd /LINUX_DVD
wget -r ftp://10.24.1.5/tftpd_v5/OS_iso/*

echo
echo —————————————————————–
echo Fixing /etc/rc.d/rc.local.
echo —————————————————————–
rm -f /etc/rc.d/rc.local
cp /etc/rc.d/rc.local.orig /etc/rc.d/rc.local

EOF

# Uncomment the next section if you uncommented the
# chvt 3 line near the top of this file
sleep 10s
#chvt 7
%end

1,390次阅读

Post navigation

前一篇:

简单化的ganglia安装脚本

后一篇:

RHEL6.x的kickstart配置文件ks.cfg

发表回复 取消回复

要发表评论,您必须先登录。

个人介绍

需要么,有事情这里找联系方式:关于天楚锐齿

=== 美女同欣赏,好酒共品尝 ===

微信扫描二维码赞赏该文章:

扫描二维码分享该文章:

分类

  • Linux&Android (81)
  • Uncategorized (1)
  • 下载 (28)
  • 云计算 (38)
  • 人工智能 (9)
  • 大数据 (35)
  • 嵌入式 (34)
  • 杂七杂八 (35)
  • 物联网 (65)
  • 网络 (25)
  • 通信 (22)

归档

近期文章

  • 飞书机器人发送卡片interactive消息
  • Springboot JPA实现对数据库表统一的增删改查
  • WEB的内容安全策略CSP(Content-Security-Policy)
  • CSS利用@media和viewport实现响应式布局自动适配手机电脑等
  • VUE前端增加国际化支持

近期评论

  • linux爱好者 发表在《Linux策略路由及iptables mangle、ip rule、ip route关系及一种Network is unreachable错误》
  • maxshu 发表在《使用Android的HIDL+AIDL方式编写从HAL层到APP层的程序》
  • Ambition 发表在《使用Android的HIDL+AIDL方式编写从HAL层到APP层的程序》
  • Ambition 发表在《使用Android的HIDL+AIDL方式编写从HAL层到APP层的程序》
  • maxshu 发表在《Android9下用ethernet 的Tether模式来做路由器功能》

阅读量

  • 使用Android的HIDL+AIDL方式编写从HAL层到APP层的程序 - 23,810次阅读
  • 卸载深信服Ingress、SecurityDesktop客户端 - 18,519次阅读
  • 车机技术之车规级Linux-Automotive Grade Linux(AGL) - 10,570次阅读
  • linux下的unbound DNS服务器设置详解 - 9,323次阅读
  • 在Android9下用ndk编译vSomeIP和CommonAPI以及使用例子 - 9,136次阅读
  • linux的tee命令导致ssh客户端下的shell卡住不动 - 8,639次阅读
  • Linux策略路由及iptables mangle、ip rule、ip route关系及一种Network is unreachable错误 - 8,126次阅读
  • 车机技术之360°全景影像(环视)系统 - 8,088次阅读
  • 车机技术之Android Automotive - 7,941次阅读
  • Windows下安装QEMU并在qemu上安装ubuntu和debian - 7,840次阅读

其他操作

  • 注册
  • 登录
  • 条目 feed
  • 评论 feed
  • WordPress.org

联系方式

地址
深圳市科技园

时间
周一至周五:  9:00~12:00,14:00~18:00
周六和周日:10:00~12:00

标签

android AT命令 CAN centos docker Hadoop hdfs ip java kickstart linux mapreduce mini6410 modem nova OAuth openstack os python socket ssh uboot 内核 协议 安装 嵌入式 性能 报表 授权 操作系统 数据 数据库 月报 模型 汽车 深信服 源代码 统计 编译 脚本 虚拟机 调制解调器 车机 金融 鉴权
© 2025 天楚锐齿