Install or upgrade an existing system 安裝或升級html
Install system with basic video driver 在安裝過程當中發現顯卡驅動不支持,形成屏幕沒法顯示,這時選擇第二項,加載最基本的顯卡驅動,這樣讓界面可以顯示出來linux
Rescue installed system 救援模式express
Boot from local drive 從本地硬盤啓動vim
Memory test 內存的檢查centos
這幾項的區別就在於加的參數不一樣bash
選擇一項,按 tab 鍵就可進入編輯模式服務器
按 esc 鍵 ,在這個畫面能夠直接輸入指令,指令爲光盤文件的 isolinux/isolinux.cfg的 label 名app
五個標籤對應光盤開始菜單的五項less
詢問系統安裝源dom
MBR:isolinux/boot.cat
stage2: isolinux/isolinux.bin
配置文件:isolinux/isolinux.cfg
每一個對應的菜單選項:
加載內核:isolinuz/vmlinuz
向內核傳遞參數:append initrd=initrd.img ...
裝載根文件系統,並啓動anaconda
默認啓動GUI接口
如果顯式指定使用TUI接口:向內核傳遞text參數便可
(1)按tab鍵,在後面增長text
(2)按ESC鍵:boot: linux text
system-config-kickstart
ksvalidator ks.cfg //檢測語法
#platform=x86, AMD64, or Intel EM64T #version=DEVEL # Install OS instead of upgrade install # Keyboard layouts keyboard 'us' # Root password rootpw --plaintext centos # Use network installation url --url="http://192.168.209.29/centos/7/os/x86_64/" # System language lang en_US # System authorization information auth --useshadow --passalgo=sha512 # Use text mode install text firstboot --disable # SELinux configuration selinux --disabled # Firewall configuration firewall --disabled # Network information network --bootproto=dhcp --device=eth0 # Reboot after installation reboot # System timezone timezone Asia/Shanghai # System bootloader configuration bootloader --append="net.ifnames=0" --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --fstype="xfs" --size=500 part / --fstype="xfs" --size=20000 part swap --fstype="swap" --size=4000 part /data --fstype="xfs" --size=10000 %packages @^minimal autofs vim-enhanced yum-utils bash-completion net-tools %end %post mkdir /root/.ssh chmod 700 /root/.ssh cat > /root/.ssh/authorized_keys <<EOF ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwpualz/J4IPBCNKKQR4HGa+Ag/dmxCqvouR9skVNUuX4yEoFDBW1gGog4s+a6Yit2XJvKU1jclNDll1VLHOXt2oTD1cUazS8D7lboOZ5gI/LDJ8DswS3VWMBPieejCoR8YsONAxI5/Z7Gyk/lOq53W6n4exr8Xq+H3SJNPRHERFrJknPhGJY2wDkPBCN1+sgcVg20ltQgd8zw1ICb0S6dyafZCjnsHJ4kYj7DXMYyl2wa6idWMWR2/XH+L9ktLgyTjm8FiJvtmcRg0olLIhy44M/D7NdVnsouTNxvTiSPZiBWQMwuOlU7LndQtWxadnEHimva8aJuIkKOIN/E+DNdw== root@centos6.9.localdomain EOF chmod 600 /root/.ssh/authorized_keys mkdir /etc/yum.repos.d/bak mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak cat > /etc/yum.repos.d/base.repo <<EOF [base] baseurl=httpd://192.168.209.29/centos/7/os/x86_64/ gpgcheck=0 EOF %end
# Kickstart file automatically generated by anaconda. #version=DEVEL install text reboot #cdrom url --url="http://192.168.209.29/centos/6/os/x86_64/" lang en_US.UTF-8 keyboard us network --onboot yes --device eth0 --bootproto dhcp --noipv6 rootpw --iscrypted $6$F8VLJCWJurIM9Bph$frrIk5HRMIhdye/0gk4EPAIApMXBjWtH.meW6oFk9/x8xzmYkks1eRrwyrT6IbiZHNsG3VjMjhDWi9fZKpETt/ #firewall --service=ssh firewall --disabled authconfig --enableshadow --passalgo=sha512 selinux --disabled timezone Asia/Shanghai bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here so unless you clear all partitions first, this is # not guaranteed to work #clearpart --none clearpart --all zerombr part /boot --fstype=ext4 --size=500 part / --fstype=ext4 --size=20000 part /data --fstype=ext4 --size=10000 part swap --size=8000 # repo --name="CentOS" --baseurl=cdrom:sr0 --cost=100 %packages @core @server-policy @workstation-policy %end
yum install httpd -y cd /var/www/html/ mkdir centos/{6,7}/os/x86_64 -pv mount /dev/sr0 centos/7/os/x86_64/ mkdir /var/www/html/ksdir mv ks.cfg /var/www/html/ksdir
若是沒有 dhcp 服務,能夠臨時指定一個ip
linux ip=IPADDR ks=http://
可是這樣,還須要用光盤引導,還要敲一條命令才能完成系統的安裝,還須要大力改善
總結:
在服務器上安裝 httpd 服務,將 2 張 光盤設備掛載到 hsttpd 網站的根目錄下
在服務器上生成 ks.cfg 應答文件,將應答文件 ks.cfg 放到 網站的根目錄下
客戶端(須要ip)從光盤引導,輸入相應的應答文件路徑的指令,就能夠自動安裝系統了