更新 2016-03-04
update 一下
yum -y update
關閉 selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
關閉不必要啟動的服務
chkconfig abrt-ccpp off chkconfig acpid off chkconfig atd off chkconfig blk-availability off chkconfig cpuspeed off chkconfig haldaemon off chkconfig ip6tables off chkconfig lvm2-monitor off chkconfig mdmonitor off chkconfig messagebus off chkconfig netfs off chkconfig cups off chkconfig portreserve off
開機到數
sed -i 's/timeout=.*/timeout=1/' /etc/grub.conf sed -i 's/timeout=.*/timeout=1/' /boot/grub/grub.conf sed -i 's/timeout=.*/timeout=1/' /boot/efi/EFI/redhat/grub.conf
開機進到 init 3
sed -i 's/id:5:initdefault:/id:3:initdefault:/' /etc/inittab
使用 vim
yum -y install vim-enhanced echo 'alias vi=vim' >> /root/.bashrc # 設定 VIM 是 4 個 spaces echo 'set ts=4 sw=4 et list' > ~/.vimrc ; cat ~/.vimrc
ntpdate
yum -y install ntp echo "ntpdate time.stdtime.gov.tw > /dev/null &" >> /etc/rc.local
show 出開機過程
sed -i 's/rhgb quiet//g' /etc/grub.conf sed -i 's/rhgb quiet//g' /boot/grub/grub.conf sed -i 's/rhgb quiet//g' /boot/efi/EFI/redhat/grub.conf
only for 測試,把防火牆關閉
chkconfig iptables off iptables -F
修改網卡名稱為 eth0
# vi /etc/grub.conf # 或 # vi /boot/grub/grub.conf kernel XXXXXXXXXXXX biosdevname=0
mv /etc/sysconfig/network-scripts/xxx /etc/sysconfig/network-scripts/ifcfg-eth0
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 NAME=eth0
rm -f /etc/udev/rules.d/70-persistent-net.rules
reboot
留言