centos6.6 Kickstart無人值守安裝(二):配置篇 A 中,試驗成功的你會發現:只不過是自動的到達了安裝界面的,還要本身選擇語言,時區,等等交互界面,爲了避免進行交互界面。 因此纔有了 centos6.6 Kickstart無人值守安裝(三):配置篇 B kickstart上場。node
咱們這裏用到的是kickstart的配置文本——ks.cfg,手寫的,更自由,可是也難,細節不少。kickstart也有界面版的,經過界面配置ks.cfg ,最終仍是生成一個ks.cfg文件,只不過界面簡單。 ##界面配置方式: 可參照 這篇文章 ##文字配置方式: 完徹底全寫一個ks.cfg文件很麻煩,易出錯。其實在咱們安裝好一個完整的linux操做系統後,系統會自動生成一個ks.cfg文件,該文件位於/root/anaconda-ks.cfg 咱們能夠將其複製到咱們須要的地方,順便貼一下個人ks.cfg cp /root/anaconda-ks.cfg /mnt/install/ks.cfg chmod 777 /mnt/install/ks.cfg [root@localhost ~]# cat /mnt/install/ks.cfg # Kickstart file automatically generated by anaconda.linux
#version=DEVEL install nfs --server=172.100.11.231 --dir=/mnt/install lang en_US.UTF-8 zerombr yes key --skip keyboard us network --device eth0 --bootproto dhcp --onboot on rootpw bocom123 firewall --enabled --port=22:tcp authconfig --enableshadow --enablemd5 selinux --disabled timezone Asia/Shanghai bootloader --location=mbr --driveorder=sda clearpart --all --initlabel part / --bytes-per-inode=4096 --fstype="ext3" --size=2048 part /boot --bytes-per-inode=4096 --fstype="ext3" --size=128 part swap --bytes-per-inode=4096 --fstype="swap" --size=500 part /data --bytes-per-inode=4096 --fstype="ext3" --grow --size=1 reboot %packages expect @base @core @dialup @editors @text-internet keyutils trousers fipscheck device-mapper-multipath %post hwclock --systohc service sshd restart chkconfig acpid off chkconfig atd off chkconfig autofs off chkconfig bluetooth off chkconfig cpuspeed off chkconfig firstboot off chkconfig gpm off chkconfig haldaemon off chkconfig hidd off chkconfig ip6tables off chkconfig isdn off chkconfig messagebus off chkconfig nfslock off chkconfig pcscd off chkconfig portmap off chkconfig rpcgssd off chkconfig rpcidmapd off chkconfig yum-updatesd off chkconfig sendmail off #......... chkconfig crond on chkconfig kudzu on chkconfig network on chkconfig readahead_early on chkconfig sshd on chkconfig syslog on #....Ctrl+Alt+Del........ #...... echo -e "ulimit -c unlimited" >> /etc/profile echo -e "ulimit -s unlimited" >> /etc/profile echo -e "ulimit -SHn 65535" >> /etc/profile source /etc/profile sed -i "s/net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/g" '/etc/sysctl.conf' echo -e "net.core.somaxconn = 262144" >> /etc/sysctl.conf echo -e "net.core.netdev_max_backlog = 262144" >> /etc/sysctl.conf echo -e "net.core.wmem_default = 8388608" >> /etc/sysctl.conf echo -e "net.core.rmem_default = 8388608" >> /etc/sysctl.conf echo -e "net.core.rmem_max = 16777216" >> /etc/sysctl.conf echo -e "net.core.wmem_max = 16777216" >> /etc/sysctl.conf echo -e "net.ipv4.netfilter.ip_conntrack_max = 131072" >> /etc/sysctl.conf echo -e "net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 180" >> /etc/sysctl.conf echo -e "net.ipv4.route.gc_timeout = 20" >> /etc/sysctl.conf echo -e "net.ipv4.ip_conntrack_max = 819200" >> /etc/sysctl.conf echo -e "net.ipv4.ip_local_port_range = 10024 65535" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_retries2 = 5" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_fin_timeout = 30" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_syn_retries = 1" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_synack_retries = 1" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_timestamps = 0" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_tw_recycle = 1" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_tw_len = 1" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_tw_reuse = 1" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_keepalive_time = 120" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_keepalive_probes = 3" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_keepalive_intvl = 15" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_max_tw_buckets = 36000" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_max_orphans = 3276800" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_max_syn_backlog = 262144" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_wmem = 8192 131072 16777216" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_rmem = 32768 131072 16777216" >> /etc/sysctl.conf echo -e "net.ipv4.tcp_mem = 94500000 915000000 927000000" >> /etc/sysctl.conf
好了 ,如今是全自動安裝了。不會彈出界面了。不截圖了。 中途可能會遇到麻煩,細心,先看清報錯信息,嘗試看懂更改,實在不懂去google。centos