Warning: Missing argument 2 for wp_widget() in /www/users/haoxm.net/wp-includes/widgets.php on line 76
孤独小客 » Blog Archive » linux下禁用ipv6、selinux及设置语言脚本

linux下禁用ipv6、selinux及设置语言脚本

#welcome
#disable ipv6
cat << EOF
+--------------------------------------------------------------+
| === Welcome to Disable IPV6 === |
+--------------------------------------------------------------+
EOF
echo "alias net-pf-10 off" >> /etc/mod probe.conf
echo “alias ipv6 off” >> /etc/modprobe.conf
/sbin/chkconfig –level 35 ip6tables off
echo “ipv6 is disabled!”

#disable selinux
sed -i ‘/SELINUX/s/enforcing/disabled/’ /etc/selinux/config
echo “selinux is disabled,you must reboot!”

#vim
sed -i “8 s/^/alias vi=’vim’/” /root/.bashrc
echo ‘syntax on’ > /root/.vimrc

#zh_cn
sed -i -e ‘s/^LANG=.*/LANG=”zh_CN.GB18030″/’ /etc/sysconfig/i18n

注:把以上保存为init.sh,名字可随便取,然后在Linux执行后,重启就行。

Leave a comment

Your comment