kickstart 最小化安装centos8
admin
2023-02-25 20:00:04
0

centos8 发布尝鲜,先改个ks 安装

# Kickstart file automatically generated by anaconda.

#version=RHEL8
#use text install
text

# Use NFS installation media
nfs --server=192.168.1.253 --dir=/ct80_64

# System language
lang en_US.UTF-8

# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'

#add root password
rootpw  --iscrypted xxxxxxxxxxx

# System authorization information
authconfig --enableshadow --enablemd5

# SELinux configuration
selinux --disabled

firstboot --disable

# Do not configure the X Window System
skipx

# firewall configuration
firewall --disabled

# System services
services --enabled="chronyd"

# System timezone
timezone Asia/Shanghai

#修改这样可以定义网卡名称为ethx
# System bootloader configuration
bootloader --location=mbr --append="net.ifnames=0 biosdevname=0 rhgb quiet"

# Partition clearing information
clearpart --all --initlabel

# create 1MB biosboot type partition, centos7 and centos8 .
part biosboot --fstype=biosboot --size=1

# Disk partitioning information
part /boot --fstype=xfs --size=300

part pv.122 --fstype="lvmpv" --grow
volgroup VolGroup00  --pesize=16384 pv.122
logvol / --fstype="xfs" --size=10000 --name=LogVol00 --vgname=VolGroup00

%packages
@Base
@Core
@development
@network-tools
gettext-devel
sysstat
zlib-devel
psmisc
%end

%post --erroronfail --log=/root/ks-post.log

echo "nameserver 114.114.114.114">/etc/resolv.conf
echo "nameserver 202.106.46.151">>/etc/resolv.conf
echo "search localdomain">>/etc/resolv.conf

#安装docker repo #####
#######docker repo ##########
sudo tee /etc/yum.repos.d/docker-ce.repo <<-'EOF'
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/7/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg
EOF

date >> /root/install.log 
echo "network configing " >> /data/install.log

cat >/etc/sysconfig/network-scripts/ifcfg-eth0 <>/etc/NetworkManager/NetworkManager.conf

cat >> /etc/sysctl.conf <> /etc/rc.local
echo "ulimit -n 655350" >> /etc/rc.local
echo "ulimit -s 102400" >> /etc/rc.local
echo "ulimit -n 655350" >> /etc/profile

echo "root       soft    nproc     unlimited
*          soft    nproc      655350
*          hard    nproc      655350
*          soft    nofile     655350
*          hard    nofile     655350
" >/etc/security/limits.d/20-nproc.conf

# Do not update kerner 
sed -i '/\[main\]'/a\exclude=kernel\* /etc/yum.conf

#这里可以添加用户key

#禁用密码认证
sed  -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config

# Reboot after installation
reboot

相关内容

热门资讯

终于懂了“微信小程序麻将.辅助... 家人们!今天小编来为大家解答微信小程序麻将透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪...
玩家攻略科普“决战卡五星.怎么... 有 亲,根据资深记者爆料决战卡五星是可以开挂的,确实有挂(咨询软件无需打...
终于懂了“神殿娱乐.开挂器?”... 家人们!今天小编来为大家解答神殿娱乐透视挂怎么安装这个问题咨询软件客服徽9752949的挂在哪里买很...
玩家攻略科普“YY棋牌.开挂神... 家人们!今天小编来为大家解答YY棋牌透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里买很...
我来教教您“微竞棋牌.怎么开挂... 网上科普关于“微竞棋牌有没有挂”话题很是火热,小编也是针对微竞棋牌作*弊开挂的方法以及开挂对应的知识...
今日重大消息“新圣游炸金花.是... 您好:新圣游炸金花这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款...
玩家分享攻略“同城游跑胡子.辅... 网上科普关于“同城游跑胡子有没有挂”话题很是火热,小编也是针对同城游跑胡子作*弊开挂的方法以及开挂对...
蓝白阵营联合提案“弹劾”赖清德... 中国台湾网12月21日讯 台湾地区民意机构中国国民党党团和台湾民众党党团(蓝白阵营)19日在台北举行...
最新引进“全民牛牛.辅助器?”... 您好:全民牛牛这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这款游戏...
旧金山假日季惊魂:大规模停电波... 当地时间20日,美国加利福尼亚州旧金山市发生大规模停电事故,影响约13万家庭和商户,繁忙的假日购物季...