21.1半自动化安装centos6,centos7

红帽官方安装指导文档链接
说明:半自动化安装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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值