系统之家 - 系统光盘下载网站!

当前位置:系统之家 > 系统教程 > Linux全自动安装

Linux全自动安装操作实例(2)

时间:2015-02-07 17:03:23 作者:qipeng 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20150207/37599.html 手机查看 评论

  Install Method:安装源

  HTTP Server:安装源的IP

  HTTP Directory:目录

  Boot Loader Options:引导选项

  Install new boot loader安装新的bootloader,下面是使用旧的。

  Use GRUB password:GRUB要不要加密。

  Install boot loader on Master Boot Record(MBR)

  将bootloader装入MBR中

  Install boot loasder on first sector of the boot partition

  将bootloader装入某一个分区中引导。

  kernel parameters:crashkernel=auto rhgb quiet使用静默模式。

  Partition Information定义分区

  Network Configuration网络配置

  Authentication认证,默认sha512就可以

  pre

  post这里不用指定#!/bin/bash

  4,保存kickstart配置文件。

  文件默认保存名字为ks.cfg

  5,检查ks.cfg配置文件的错误。

  # ksvalidator 2ks.cfg

  kscfg配置文件详解:

  命令段:

  #platform=x86, AMD64, 或 Intel EM64T

  #version=DEVEL

  # Firewall configuration

  firewall --disabled禁用防火墙

  # Install OS instead of upgrade

  install默认动作是安装

  # Use network installation

  url --url=“ftp://1.0.0.12/centos/”使用FTP安装源

  repo --name=“CentOS” --baseurl=“ftp://1.0.0.12/centos”

  # Root password

  rootpw --iscrypted $1$dpCtQEn6$pC3UGFPZEJJ5nVftiaScq0

  # System authorization information

  auth --useshadow --passalgo=sha512

  # Use text mode install

  text使用文本安装方式

  # System keyboard

  keyboard us使用美式英语键盘

  # System language

  lang zh_CN设置默认语言

  # SELinux configuration

  selinux --disabled禁用SELINUX

  # Do not configure the X Window System

  skipx

  # Installation logging level

  logging --level=info

  # Reboot after installation

  reboot安装完成时的动作

  # System timezone

  timezone Asia/Shanghai

  # Network information

  network --bootproto=static --device=eth0 --ip=1.0.0.7 --netmask=255.0.0.0 --onboot=on

  # System bootloader configuration

  bootloader --append=“crashkernel=auto rhgb quiet” --location=mbr --driveorder=“sda”

  # Clear the Master Boot Record

  zerombr

  # Partition clearing information

  clearpart --all --initlabel清空磁盘分区

  # Disk partitioning information磁盘分区

  part /boot --asprimary --fstype=“ext4” --ondisk=sda --size=100

  part / --asprimary --fstype=“ext4” --ondisk=sda --size=20480

  part swap --asprimary --fstype=“swap” --ondisk=sda --size=500

  脚本段:

  %post

  touch /tmp/abc.txt

  %end

  软件包段:

  %packages

  @base

  @basic-desktop

  @chinese-support

  @core

  @debugging

  @desktop-debugging

  @desktop-platform

  @desktop-platform-devel

  @development

  @directory-client

  @fonts

  使用引导光盘引导后的选择:

  点击两次“ESC”键,进入命令行模式,然后

  linux ip=1.0.0.7 netmask=255.0.0.0 ks=ftp://1.0.0.12/pub/ks.cfg

  ftp安装源自动安装linux详细步骤:

  1,制作引导光盘:

  # mount /dev/cdrom /media/cdrom/

  # mkdir /root/myboot

  # cp /media/cdrom/isolinux/ /root/myboot/isolinux

  # cd /root/myboot/isolinux

  # chmod +w 。/*

  # chmod +x vmlinuz

  # mkisofs -R -J -T -v -no-emul-boot -boot-load-size 4 -boot-info-table -V “MageEdu Testing Image” (-V跟光盘标签) -b isolinux/isolinux.bin (明确指定isolinux.bin的存放位置) -c isolinux/boot.cat (指定boot.cat的位置) -o /tmp/boot.iso (指定输出位置) /root/myboot/ (指定输入源)

  2,制作ftp安装源

  # yum install vsfptd

  # service vsftpd start

  # mkdir /var/ftp/CentOS

  # mount /media/cdrom /var/ftp/CentOS,

  3,将制作好的ks.cfg文件放到ftp目录

  # cp /root/ks.cfg /var/ftp/pub

  4,将前面的boot.iso挂载到目标主机的光驱,启动后两次“ESC”键,然后就输入:

  linux ip=1.0.0.7 netmask=255.0.0.0 ks=ftp://1.0.0.12/pub/ks.cfg

  5,自动安装启动

  上面就是Linux全自动安装的方法介绍了,本文通过编译脚本实现Linux系统全自动化安装,需要安装anaconda,编译完anaconda后启动即可。

标签

发表评论

0

没有更多评论了

评论就这些咯,让大家也知道你的独特见解

立即评论

以上留言仅代表用户个人观点,不代表系统之家立场

其他版本软件

热门教程

人气教程排行

Linux系统推荐

官方交流群 软件收录