如日方升键优化CentOS系统,Linux下IE6安装注意事项

10.04安装IEs4linux及相关问题的解决,适用于CentOS6.x系统最小化安装执行

在install.sh 426行左右
subsection $MSG_CREATING_PREFIX
set_wine_prefix “$BASEDIR/ie1/”
wineprefixcreate &> /dev/null
clean_tmp

|                    system optimization                            |

EOF
 
#close unimportant system services
echo “===Close unimportant system services,it will take serval
mintinues===”
for s in `chkconfig –list|grep 3:on|awk ‘{print $1}’|grep -Ev
“crond|sshd|sysstat|rsyslog|network”`
do
  chkconfig $s off
done
check_ok
action “Close unimportant system services” /bin/true
 
 
#close selinux
echo “===close SELINUX===”
if [ `getenforce` != “Disabled” ]
then
 sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config
 echo “selinux is disabled,you must reboot!”
else
 action “SELINUX is closed” /bin/true
fi
check_ok
action “Close SELINUX” /bin/true
 
 
#close ctrl+alt+del
mv /etc/init/control-alt-delete.conf
/etc/init/control-alt-delete.conf.bak
 
 
#close iptables
echo “===close iptables===”
iptables-save >/etc/sysconfig/iptables_$(date +%s)
iptables -F
service iptables save
check_ok
action “iptables is closed” /bin/true
 
 
#set ulimit
echo “ulimit -SHn 65535” >>/etc/rc.local
 
#set SSH
sed -i ‘s/#UseDNS yes/UseDNS no/g’ /etc/ssh/sshd_config
sed -i ‘s/#Port 22/Port 65500/g’ /etc/ssh/sshd_config
service sshd restart
 
 
#set system files permission
88bifa必发唯一官网,chmod 600 /etc/passwd
chmod 600 /etc/group
chmod 600 /etc/shadow
chmod 600 /etc/gshadow
 
 
#set ntp
yum install ntpdate -y
ntpdate ntp.fudan.edu.cn
echo “* 3 * * * /usr/sbin/ntpdate ntp.fudan.edu.cn >/dev/null
2>&1” >>/etc/crontab
service crond restart
check_ok
action “ntpdate is installed and add in crontab” /bin/true
 
 
#set vim
echo “===install vim,it will take serval mintinues===”
yum install vim-enhanced -y &>/dev/null
alias vi=vim
echo “alias vi=vim” >>/root/.bashrc
check_ok
action “vim is installed” /bin/true
 
 
#set yum repos
echo “===update yum repos,it will take serval mintinues===”
yum install wget -y
mv /etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo
&>/dev/null
wget -O /etc/yum.repos.d/epel.repo
&>/dev/null
yum clean all &>/dev/null
yum makecache &>/dev/null
check_ok
action  “yum repos update is ok” /bin/true

更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-11/125322.htm

88bifa必发唯一官网 1

88bifa必发唯一官网 2

关闭系统不必要的服务;关闭selinux,关闭iptables;关闭ctrl+alt+del重启;设置ssh端口,关闭DNS解析;设置系统最大文件描述符;设置系统关键文件权限;配置安装ntp;安装vim;配置安装阿里云yum源和epel源;

在functions.sh 242行左右
function create_wine_prefix {
if which wineprefixcreate &> /dev/null; then
( wineprefixcreate 2>&1 ) | debugPipe
else
error $MSG_ERROR_NO_WINEPREFIXCREATE
fi
}

cat<<EOF

改为:
subsection $MSG_CREATING_PREFIX
set_wine_prefix “$BASEDIR/ie1/”
winepath &> /dev/null
clean_tmp

[root@localhost ~]# cat youhua.sh
#!/bin/bash
#written by mofansheng@2015-11-03
#system optimization script
#The fllow apply to CentOS 6.x
. /etc/init.d/functions
 
function check_ok(){
  if [ $? -eq 0 ]
  then
    echo “”
    continue
  else
    echo “pls check error”
    exit
  fi
}
 

改为:
function create_wine_prefix {
if which winepath &> /dev/null; then
( winepath 2>&1 ) | debugPipe
else
error $MSG_ERROR_NO_WINEPREFIXCREATE
fi
}

脚本如下:

相关阅读:经典重现 Ubuntu
10.04安装IEs4linux及相关问题的解决

主要优化内容有:

由于wine
1.3使用了winepath代替wineprefixcreate,所以安装ies4linux的时候,会提示wine版本太旧,wineprefixcreate有误。可以通过修改ies4linux
2.99.0.1/lib的functions.sh、install.sh来简单解决ie6的安装问题。

自己参考了系统优化的点,写了一个一键优化脚本,适用于CentOS6.x版本,各个项已经单独进行测试通过。适用于CentOS6.x系统最小化安装执行,可以根据自己的需求进行添加或修改完善。

保存后重新运行./ies4linux安装即可。
可能会卡住,你到~/bin/里看有没有ie6。
有就运行 ~/bin/ie6。