haiyun.me - centos/debian自动通过网络远程安装系统配置脚本









Search Preview

centos/debian自动通过网络远程安装系统配置脚本 - 海运的博客

haiyun.me
此脚本用于生成ubuntu和centos网络重装引导项,ks和pressed配置文件见前文,上传到http服务器并替换脚本中内容,在centos7和ubuntu18.04上测试安装centos7...
.me > haiyun.me

SEO audit: Content analysis

Language Error! No language localisation is found.
Title centos/debian自动通过网络远程安装系统配置脚本 - 海运的博客
Text / HTML ratio 58 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud fi echo exit wget linux16=vmlinuzfile valid_ip ip bootvmlinuz bootinitrdimg 'print domain= hostname=ubuntuserver interface=auto > linux16 devnull addressawk F'' netcfgdisable_autoconfig=true netcfgget_nameservers=8888
Keywords consistency
Keyword Content Title Description Headings
fi 9
echo 9
exit 8
wget 5
linux16=vmlinuzfile 5
valid_ip 4
Headings
H1 H2 H3 H4 H5 H6
1 1 1 0 3 0
Images We found 2 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
fi 9 0.45 %
echo 9 0.45 %
exit 8 0.40 %
wget 5 0.25 %
linux16=vmlinuzfile 5 0.25 %
valid_ip 4 0.20 %
ip 3 0.15 %
bootvmlinuz 3 0.15 %
bootinitrdimg 3 0.15 %
'print 3 0.15 %
domain= 3 0.15 %
hostname=ubuntuserver 3 0.15 %
interface=auto 3 0.15 %
> 3 0.15 %
linux16 2 0.10 %
devnull 2 0.10 %
addressawk 2 0.10 %
F'' 2 0.10 %
netcfgdisable_autoconfig=true 2 0.10 %
netcfgget_nameservers=8888 2 0.10 %

SEO Keywords (Two Word)

Keyword Occurrence Density
if then 7 0.35 %
255 255 4 0.20 %
exit if 3 0.15 %
hostname=ubuntuserver interface=auto 3 0.15 %
domain= hostname=ubuntuserver 3 0.15 %
rou echo 2 0.10 %
netcfgget_netmask=mask netcfgget_gateway=rou 2 0.10 %
1 8 2 0.10 %
8 255 2 0.10 %
netcfgget_nameservers=8888 netcfgdisable_autoconfig=true 2 0.10 %
netcfgget_gateway=rou netcfgget_nameservers=8888 2 0.10 %
interface=auto netcfgget_ipaddress=ip 2 0.10 %
bootinitrdimg exit 2 0.10 %
O bootinitrdimg 2 0.10 %
mask valid_ip 2 0.10 %
exit wget 2 0.10 %
bootvmlinuz exit 2 0.10 %
else linux16=vmlinuzfile 2 0.10 %
netcfgget_ipaddress=ip netcfgget_netmask=mask 2 0.10 %
fi if 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
exit if then 3 0.15 % No
domain= hostname=ubuntuserver interface=auto 3 0.15 % No
255 255 255 3 0.15 % No
bootinitrdimg exit if 2 0.10 % No
addressawk F'' 'print 2 0.10 % No
netcfgget_netmask=mask netcfgget_gateway=rou netcfgget_nameservers=8888 2 0.10 % No
netcfgget_gateway=rou netcfgget_nameservers=8888 netcfgdisable_autoconfig=true 2 0.10 % No
if then linux16=vmlinuzfile 2 0.10 % No
hostname=ubuntuserver interface=auto netcfgget_ipaddress=ip 2 0.10 % No
ks=httpwwwhaiyunmeubuntukscfg domain= hostname=ubuntuserver 2 0.10 % No
linux16=vmlinuzfile ks=httpwwwhaiyunmeubuntukscfg domain= 2 0.10 % No
1 8 255 2 0.10 % No
interface=auto netcfgget_ipaddress=ip netcfgget_netmask=mask 2 0.10 % No
netcfgget_ipaddress=ip netcfgget_netmask=mask netcfgget_gateway=rou 2 0.10 % No
linux16=vmlinuzfile instks=httpwwwhaiyunmecentos7cfg netifnames=0 2 0.10 % No
instks=httpwwwhaiyunmecentos7cfg netifnames=0 biosdevname=0 2 0.10 % No
netifnames=0 biosdevname=0 instheadless 2 0.10 % No
O bootvmlinuz exit 2 0.10 % No
O bootinitrdimg exit 2 0.10 % No
bootvmlinuz exit wget 2 0.10 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
instks=httpwwwhaiyunmecentos7cfg netifnames=0 biosdevname=0 instheadless 2 0.10 % No
255 255 255 255 2 0.10 % No
exit if then linux16=vmlinuzfile 2 0.10 % No
linux16=vmlinuzfile instks=httpwwwhaiyunmecentos7cfg netifnames=0 biosdevname=0 2 0.10 % No
O bootvmlinuz exit wget 2 0.10 % No
linux16=vmlinuzfile ks=httpwwwhaiyunmeubuntukscfg domain= hostname=ubuntuserver 2 0.10 % No
O bootinitrdimg exit if 2 0.10 % No
domain= hostname=ubuntuserver interface=auto netcfgget_ipaddress=ip 2 0.10 % No
hostname=ubuntuserver interface=auto netcfgget_ipaddress=ip netcfgget_netmask=mask 2 0.10 % No
interface=auto netcfgget_ipaddress=ip netcfgget_netmask=mask netcfgget_gateway=rou 2 0.10 % No
netcfgget_ipaddress=ip netcfgget_netmask=mask netcfgget_gateway=rou netcfgget_nameservers=8888 2 0.10 % No
netcfgget_netmask=mask netcfgget_gateway=rou netcfgget_nameservers=8888 netcfgdisable_autoconfig=true 2 0.10 % No
ks=httpwwwhaiyunmeubuntukscfg domain= hostname=ubuntuserver interface=auto 2 0.10 % No
bootinitrdimg exit if then 2 0.10 % No
备份存储 11 常用软件 20 1 0.05 % No
Linux服务 18 系统监控 4 1 0.05 % No
2 Linux服务 18 系统监控 1 0.05 % No
欧诺代理 2 Linux服务 18 1 0.05 % No
18 欧诺代理 2 Linux服务 1 0.05 % No
Linux基础 18 欧诺代理 2 1 0.05 % No

Internal links in - haiyun.me

关于
关于 - 海运的博客
分析网站
分析网站 - 海运的博客
文章归档
文章归档 - 海运的博客
参考手册
参考手册 - 海运的博客
在线工具
在线工具 - 海运的博客
常用命令
常用命令 - 海运的博客
centos repo管理使用
centos repo管理使用 - 海运的博客
centos/debian自动通过网络远程安装系统配置脚本
centos/debian自动通过网络远程安装系统配置脚本 - 海运的博客
https://www.haiyun.me/archives/1246.html
IPXE网络引导通过kickstart和preseed自动安装centos/ubuntu/debian系统 - 海运的博客
https://www.haiyun.me/archives/1249.html
使用kickstart安装ubuntu - 海运的博客
Centos/linux ipv4优先
Centos/linux ipv4优先 - 海运的博客
1
海运的博客
2
海运的博客
3
海运的博客
4
海运的博客
153
海运的博客
PHP
PHP - 海运的博客
IIS
IIS - 海运的博客
Mail
Mail - 海运的博客
DNS
DNS - 海运的博客
Cacti
Cacti - 海运的博客
Squid
Squid - 海运的博客
Nagios
Nagios - 海运的博客
Puppet
Puppet - 海运的博客
CentOS
CentOS - 海运的博客
Iptables
Iptables - 海运的博客
RADIUS
RADIUS - 海运的博客
OpenWrt
OpenWrt - 海运的博客
DD-WRT
DD-WRT - 海运的博客
VMware
VMware - 海运的博客
网站程序
网站程序 - 海运的博客
备份存储
备份存储 - 海运的博客
常用软件
常用软件 - 海运的博客
日记分析
日记分析 - 海运的博客
Linux基础
Linux基础 - 海运的博客
欧诺代理
欧诺代理 - 海运的博客
Linux服务
Linux服务 - 海运的博客
系统监控
系统监控 - 海运的博客
流量监控
流量监控 - 海运的博客
虚拟化
虚拟化 - 海运的博客
伪静态
伪静态 - 海运的博客
LVM
LVM - 海运的博客
Shell
Shell - 海运的博客
高可用
高可用 - 海运的博客
数据库
数据库 - 海运的博客
FreeBSD
FreeBSD - 海运的博客
网络安全
网络安全 - 海运的博客
Windows
Windows - 海运的博客
网络工具
网络工具 - 海运的博客
控制面板
控制面板 - 海运的博客
系统调优
系统调优 - 海运的博客
Cisco
Cisco - 海运的博客
VPN
VPN - 海运的博客
ROS
ROS - 海运的博客
Vim
Vim - 海运的博客
KMS
KMS - 海运的博客
PXE
PXE - 海运的博客
Mac
Mac - 海运的博客
Git
Git - 海运的博客
PE
PE - 海运的博客
LNS
LNS - 海运的博客
Xshell
Xshell - 海运的博客
Firefox
Firefox - 海运的博客
Cygwin
Cygwin - 海运的博客
OpenSSL
OpenSSL - 海运的博客
Sandboxie
Sandboxie - 海运的博客
StrokesPlus
StrokesPlus - 海运的博客
AutoHotKey
AutoHotKey - 海运的博客
Total Commander
Total Commander - 海运的博客
WordPress
WordPress - 海运的博客
iMacros
iMacros - 海运的博客
Typecho
Typecho - 海运的博客
Ollydbg
Ollydbg - 海运的博客
Photoshop
Photoshop - 海运的博客
正则
正则 - 海运的博客
Debian
Debian - 海运的博客
Python
Python - 海运的博客
NoSQL
NoSQL - 海运的博客
消息队列
消息队列 - 海运的博客
JS
JS - 海运的博客
Tmux
Tmux - 海运的博客
GO
GO - 海运的博客
HHVM
HHVM - 海运的博客
算法
算法 - 海运的博客
Docker
Docker - 海运的博客
initrd.img解压与打包
initrd.img解压与打包 - 海运的博客
qq smtp 465/587端口区别
qq smtp 465/587端口区别 - 海运的博客

Haiyun.me Spined HTML


centos/debian自动通过网络远程安装系统配置脚本 - 海运的博客 海运的博客 首页 关于 分析网站 文章归档 参考手册 在线工具 常用命令 centos/debian自动通过网络远程安装系统配置脚本 发布时间:September 30, 2018 // 分类: // No Comments 此脚本用于生成ubuntu和centos网络重装引导项,ks和pressed配置文件见前文,上传到http服务器并替换脚本中内容,在centos7和ubuntu18.04上测试安装centos7和ubuntu18.04通过。#!/bin/bash install=centos network=dhcp stage2="nfs:nfsvers=4:www.haiyun.me:/" cidr2mask () { set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0 [ $1 -gt 1 ] && shift $1 || shift reverberate ${1-0}.${2-0}.${3-0}.${4-0} } function valid_ip() { local ip=$1 local stat=1 if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then OIFS=$IFS IFS='.'; ip=($ip); IFS=$OIFS [[ ${ip[0]} -le 255 && ${ip[1]} -le 255 && ${ip[2]} -le 255 && ${ip[3]} -le 255 ]] stat=$? fi return $stat } which wget &> /dev/null && which ip &> /dev/null || { reverberate '请先安装wget和ip' exit; } if [ "$network" == 'static' ]; then address=`ip -o -f inet addr show | awk '/scope global/ {print $4}'` ip=`echo $address|awk -F'/' '{print $1}'` cidr=`echo $address|awk -F'/' '{print $2}'` rou=`ip rou|awk '/default via/ {print $3}'` mask=`cidr2mask $cidr` reverberate 'ip:' $ip reverberate 'route:' $rou reverberate 'netmask:' $mask valid_ip "$ip" && valid_ip "$mask" && valid_ip "$rou" || { reverberate '获取网络信息失败' exit; } reverberate '请核对以上IP信息是否正确' fi if [ -f "/etc/redhat-release" ]; then dist="centos" grubfile=/boot/grub2/grub.cfg grubcmd=grub2-mkconfig else grubfile=/boot/grub/grub.cfg grubcmd=grub-mkconfig dist="ubuntu" fi root=`grep "set root" $grubfile|sed -e 's/^[ \t]*//'|head -n 1` if mount|grep -q /boot; then dir=/ else dir=/boot/ fi vmlinuzfile=${dir}vmlinuz initrdfile=${dir}initrd.img rm -rf /boot/vmlinuz rm -rf /boot/initrd.img if [ "$install" == 'centos' ]; then mem=`free -m | grep Mem | awk '{print $2}'` if [ ! -n $stage2 ] && (($mem < 1500)); then reverberate '内存小于1.5G要通过网络安装centos7可能会失败' exit; fi base=https://mirrors.aliyun.com/centos/7/os/x86_64 wget ${base}/isolinux/vmlinuz -O /boot/vmlinuz || exit; wget ${base}/isolinux/initrd.img -O /boot/initrd.img || exit; if [ "$network" == 'static' ]; then linux16="$vmlinuzfile inst.ks=http://www.haiyun.me/centos7.cfg net.ifnames=0 biosdevname=0 inst.headless ip=${ip}::${rou}:${mask}::eth0:none nameserver=8.8.8.8" else linux16="$vmlinuzfile inst.ks=http://www.haiyun.me/centos7.cfg net.ifnames=0 biosdevname=0 inst.headless ip=dhcp" fi if [ -n $stage2 ]; then linux16="$linux16 inst.stage2=$stage2" fi else base=https://mirrors.aliyun.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64 wget ${base}/linux -O /boot/vmlinuz || exit; wget ${base}/initrd.gz -O /boot/initrd.img exit; if [ "$network" == 'static' ]; then linux16="$vmlinuzfile ks=http://www.haiyun.me/ubuntu-ks.cfg domain= hostname=ubuntu-server interface=auto netcfg/get_ipaddress=${ip} netcfg/get_netmask=${mask} netcfg/get_gateway=${rou} netcfg/get_nameservers=8.8.8.8 netcfg/disable_autoconfig=true" #linux16="$vmlinuzfile auto=true url=http://www.haiyun.me/ubuntu.cfg keymap=us domain= hostname=ubuntu-server interface=auto netcfg/get_ipaddress=${ip} netcfg/get_netmask=${mask} netcfg/get_gateway=${rou} netcfg/get_nameservers=8.8.8.8 netcfg/disable_autoconfig=true" else linux16="$vmlinuzfile ks=http://www.haiyun.me/ubuntu-ks.cfg domain= hostname=ubuntu-server interface=auto" fi fi [[ -f /boot/vmlinuz ]] && [[ -f /boot/initrd.img ]] || { reverberate '引导文件不存在' exit; } cat > /etc/grub.d/40_custom <<EOF #!/bin/sh exec tail -n +3 \$0 menuentry 'netinstall' { $root linux16 $linux16 initrd16 $initrdfile } EOF sed -i 's/GRUB_DEFAULT=.*/GRUB_DEFAULT="netinstall"/' /etc/default/grub $grubcmd -o $grubfilehttps://www.haiyun.me/archives/1246.htmlhttps://www.haiyun.me/archives/1249.html 标签:none 取消回复 发表评论 姓名 (必填) 邮箱 (必填) 网站 (选填) 请输入验证码 (不区分大小写,点击图片刷新) 分类 Apache (13)Nginx (42)PHP (83)IIS (8)Mail (17)DNS (14)Cacti (14)Squid (5)Nagios (4)Puppet (7)CentOS (13)Iptables (23)RADIUS (3)OpenWrt (40)DD-WRT (1)VMware (9)网站程序 (3)备份存储 (11)常用软件 (20)日记分析 (10)Linux基础 (18)欧诺代理 (2)Linux服务 (18)系统监控 (4)流量监控 (7)虚拟化 (28)伪静态 (2)LVM (3)Shell (18)高可用 (2)数据库 (16)FreeBSD (3)网络安全 (25)Windows (35)网络工具 (22)控制面板 (3)系统调优 (10)Cisco (3)VPN (5)ROS (20)Vim (14)KMS (4)PXE (2)Mac (1)Git (1)PE (1)LNS (2)Xshell (7)Firefox (13)Cygwin (4)OpenSSL (9)Sandboxie (3)StrokesPlus (1)AutoHotKey (4)Total Commander (2)WordPress (3)iMacros (6)Typecho (2)Ollydbg (1)Photoshop (1)正则 (3)Debian (3)Python (8)NoSQL (6)消息队列 (4)JS (7)Tmux (3)GO (7)HHVM (2)算法 (1)Docker (2) 最新文章 centos repo管理使用centos/debian自动通过网络远程安装系统配置脚本使用kickstart安装ubuntuCentos/linux ipv4优先BT/utorrent连接加密及标志IPXE网络引导通过kickstart和preseed自动安装centos/ubuntu/debian系统ubuntu 通过ppa源安装最新版qbittorrentinitrd.img解压与打包libtorrent提高上传速度qq smtp 465/587端口区别 最近回复 404NTF: 交叉编译的作用是? 404NTF: 请教一下 CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go ... 小智: 安利个PHP开发以太坊区块链的教程: http://xc.hubwiz.com/course/... 陈浩南: 您好,您教程中的 dev.openwrt.org.cn 现在似乎不可用了。请问现在应该在哪里下... 斑马斑马: 怎么查看虚拟机CPU 内存使用情况 zzg: http://downloads.openwrt.org.cn/PandoraBox/rali... xiongrui: 看图 傻狍子: filebrowser好像和这功能一样? https://github.com/filebro... 陶国文: 想看看能不能安装 傻狍子: 服务端设置了用户名密码认证的话,在openwrt的openvpn客户端的配置文件当中该如何更改... Copyright © 2011 海运的博客 / 文章归档 / Archives Rss / Comments Rss / Powered By Typecho 页面执行耗时:0.033秒。-->