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

Post navigation

Previous Post:

简单化的ganglia安装脚本

Next Post:

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

发表回复 取消回复

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

个人介绍

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

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

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

扫描二维码分享该文章:

分类

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

归档

近期文章

  • 安装JumpServer作为堡垒机
  • xshell通过SOCKS隧道和代理实现ssh登录其他内网服务器
  • 使用stub_status和vts模块进行nginx性能监控
  • 国内使用Google的Gemini AI下AntiGravity的方式
  • 抖店云的虚机用Nginx代理解码抖店订单

近期评论

  • 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层的程序 - 26,027次阅读
  • 卸载深信服Ingress、SecurityDesktop客户端 - 20,243次阅读
  • 车机技术之车规级Linux-Automotive Grade Linux(AGL) - 11,779次阅读
  • 在Android9下用ndk编译vSomeIP和CommonAPI以及使用例子 - 10,154次阅读
  • linux下的unbound DNS服务器设置详解 - 10,032次阅读
  • linux的tee命令导致ssh客户端下的shell卡住不动 - 9,308次阅读
  • Linux策略路由及iptables mangle、ip rule、ip route关系及一种Network is unreachable错误 - 9,071次阅读
  • 车机技术之360°全景影像(环视)系统 - 9,032次阅读
  • Windows下安装QEMU并在qemu上安装ubuntu和debian - 8,596次阅读
  • 车机技术之Android Automotive - 8,507次阅读

其他操作

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

联系方式

地址
深圳市科技园

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

标签

android AT命令 CAN centos Hadoop hdfs ip ipv6 java kickstart linux mapreduce mini6410 modem nova OAuth openstack python socket ssh uboot 使用 内核 协议 安装 嵌入式 性能 报表 授权 数据 数据库 月报 模型 汽车 深度学习 源代码 统计 编译 网络 脚本 虚拟机 调制解调器 车机 迁移 金融
© 2026 天楚锐齿 | Powered by WordPress | Theme by MadeForWriters