电子商务网站建设与电子支付,网站进不去怎么解决,提高wordpress+权重,湖北省住房城乡建设厅网站首页安装系统的话#xff0c;常用方式就是通过U盘#xff0c;光盘#xff0c;kickstart网络自动化安装#xff0c;网络自动化安装固然好#xff0c;但是有时候在现场做项目的话根本就没有kickstart环境#xff0c;甚至连基本的网络建设都没有弄好#xff0c;此时该如何安装系…安装系统的话常用方式就是通过U盘光盘kickstart网络自动化安装网络自动化安装固然好但是有时候在现场做项目的话根本就没有kickstart环境甚至连基本的网络建设都没有弄好此时该如何安装系统呢通过u盘或者光盘手动安装的话需要很多选项要自己填写那么我们能不能把自动化的ks环境做到系统镜像里面去呢答案是很定的接下来我们就来介绍CentOS 7.1全自动安装光盘制作第一步我们挂载原始光盘镜像假如挂载点是/mnt/cdrom,然后做如下操作cp -ar /mnt/cdrom/* /tmp/martin/cp -ar /mnt/cdrom/.treeinfo /tmp/martin/cp -ar /mnt/cdrom/.discinfo /tmp/martin/createrepo -g/tmp/martin/repodata/*-comps.xml /tmp/martin//tmp/martin/isolinuxboot.cat grub.conf isolinux.bin ks_a.cfg ks_raid_ab.cfg memtest TRANS.TBL vesamenu.c32boot.msg initrd.img isolinux.cfg ks_b.cfg ks_raid_bc.cfg splash.png upgrade.img vmlinuz在该目录下面新建四个ks文件其实只要一个即可这里做成四个是为了硬盘不同的分区方案而做的这里我们只介绍一个ks_raid_ab.cfg的配置其实就是一份定义了软raid的分区# platformx86, AMD64, or Intel EM64T# Use text mode install#text# Use graphical installgraphical# Install OS instead of upgradeinstall# Use CDROM mediacdrom# Use NFS installation media#nfs --server172.16.15.10 --dir/centosinstall# Use HTTP installation media#url --url ftp://172.16.15.10/Public/iso/7.1-x64/# Use FTP installation media#url --url ftp://:/#url --url ftp://172.16.15.10/# System languagelang en_US.UTF-8# System keyboardkeyboard us# Network informationnetwork --bootprotodhcp --hostname martin --onbooton#Root passwordrootpw 123456#firewall --enabled --sshfirewall --disable# System authorization informationauthconfig --useshadow --enablemd5# SELinux configurationselinux --disabled# System timezonetimezone Asia/Shanghai# System bootloader configurationbootloader --locationmbr# Partition clearing information#clearpart --all --initlabel --drivessda#part /boot --fstypeext4 --size300 --ondisksda#part pv.01 --size4096 --grow --ondisksda#volgroup VolGroup00 --pesize32768 pv.01#logvol / --fstypeext4 --nameLogVol00 --vgnameVolGroup00 --size1024 --grow#logvol swap --fstype swap --nameLogVol01 --vgnameVolGroup00 --size512# Partition clearing informationclearpart --all --initlabel# Soft RAID1 partitioning informationpart swap --fstypeswap --ondisksda --size4096part raid.01 --fstyperaid --grow --ondisksda --size1part swap --fstypeswap --ondisksdb --size4096part raid.02 --fstyperaid --grow --ondisksdb --size1raid / --devicemd0 --fstypeext4 --level1 raid.01 raid.02# Reboot after installationreboot# Do not configure the X Window System; if to configure it, uncomment following lineskipx# X Window System configuration information#xconfig --defaultdesktopGNOME --depth32 --resolution1024x768%packages additional-devel base core debugging gnome-desktop development mariadb emacs web-server network-file-system-client java-platform platform-devel phpexpectiptraf-nglibaio-devellibpcap-devellksctp-toolslrzsznasmnet-snmp-utilsphp-mysqlphp-pearphp-soapsystem-config-kickstart# Add these system perfomance enhanced toolsvsftpdlogwatchpostfixnmap-ncatnmapftptelnetlsscsi# Update the sysstat version from 9.0.4 to 10.1.6sysstat%end[[email protected] isolinux]# vim isolinux.cfg 修改该文件增加如下内容label ks_amenu label ^Custom ks_a CentOS 7 --This is sinlgle_akernel vmlinuzappend initrdinitrd.img inst.stage2hd:/dev/cdrom inst.kscdrom:/isolinux/ks_a.cfglabel ks_bmenu label ^Custom ks_b CentOS 7 --This is sinlgle_bkernel vmlinuzappend initrdinitrd.img inst.stage2hd:/dev/cdrom inst.kscdrom:/isolinux/ks_b.cfglabel ks_abmenu label ^Custom ks_ab CentOS 7 --This is raid_abkernel vmlinuzappend initrdinitrd.img inst.stage2hd:/dev/cdrom inst.kscdrom:/isolinux/ks_raid_ab.cfglabel ks_bcmenu label ^Custom ks_bc CentOS 7 --This is raid_bckernel vmlinuzappend initrdinitrd.img inst.stage2hd:/dev/cdrom inst.kscdrom:/isolinux/ks_raid_bc.cfg此时我们将该目录/tmp/martin/ 重新生成镜像即可centos7.1原始镜像有7个多G我们可以对其做裁剪方法我们下次介绍本文出自 “martin” 博客谢绝转载