红帽官方安装指导文档链接
说明:半自动化安装centos6,centos7实验步骤
实验1、半自动化安装centos6
实验2、半自动化安装centos7
实验3:制作centos6启动光盘ISO文件
实验4:制作centos6启动光盘ISO完整版
为何我正在写博客,html编辑器还能变,有在下午更新html模块的吗?更新模块不都是在夜晚12点吗???好不容易标注的颜色全都没了,心里怒骂csdn一万遍:你好任性
centos7中的光盘下面有一个isolinux目录
[root@centos7:cd]# file isolinux/boot.cat
isolinux/boot.cat: data
[root@centos7:cd]# hexdump -C isolinux/boot.cat -v
00000000 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 aa 55 55 aa |.............UU.|
55aa是mbr分区中的结束标识
实验1、半自动化安装centos6
centos6提供httpd服务的ip为仅主机模式(192.168.31.6),安装的虚拟机网络模式为仅主机模式
centos6上面配好httpd服务,
yum install httpd
systemctl start httpd
ss -ntl #查看httpd服务 80端口
cd /var/www/html
echo "zhaoliying" > index.html 浏览器打开192.168.31.6可以看到zhaoliying
https://mirrors.aliyun.com 参考目录
并挂载光盘到/var/www/html/centos/6/os/x86_64/ 如图1
图1
centos6
[root@centos6 ~ ]#yum install system-config-kickstart
[root@centos6 ~ ]#system-config-kickstart
安装完成后,在虚拟机本地打开,有时xshell打不开此界面,有时可以(需要设置好才可以打开)
自动化安装应答文件ks.cfg生成
图形界面安装向导,system-config-kickstart,如图2
图2
安装后脚本
rm -rf /etc/yum.repos.d/*
cat > /etc/yum.repos.d/base.repo << EOF
[base]
name=base
baseurl=file:///misc/cd/
gpgcheck=0
EOF
useradd=zhaoli
echo centos|passwd -stdin zhaoli
保存到root下,并且退出
生成的ks.cfg文件的内容如下
[root@centos6 ~ ]#cat ks.cfg
#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.31.6/centos/6/os/x86_64"
# Root password
rootpw --plaintext centos
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0