centOS 5.5安装intel自家的超强编译器(ICC 11.1.073)
在intel网站 http://software.intel.com/en-us/articles/non-commercial-software-download/ 可以申请到非商用版的序列号
下面开始安装
#使用root权限 #selinux 设置为disabled 至少也要设置为 permissive 一般centos默认设置为SELINUX=enforcing 这里设置为premissive sed -i 's/^SELINUX=.*$/SELINUX=permissive/' /etc/selinux/config #不重启对selinux 进行设置 setenforce permissive #如果直接关闭 SELINUX 则使用如下命令 并且需要重启 #sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config #reboot #安装需要的库 yum -y install man which gcc gcc-c++ compat-libstdc++-33 #下载解压 wget -Nc http://registrationcenter-download.intel.com/akdlm/irc_nas/1924/l_cproc_p_11.1.073.tgz tar zxvf ./l_cproc_p_11.1.073.tgz cd ./l_cproc_p_11.1.073 ./install.sh #然后就是按照向导一步步进行安装了
你也可以选择静默安装
#使用 --duplicate 参数可以在安装的同时生成静默安装配置文件 ./install.sh --duplicate ./silent.conf #使用 --silent 参数静默安装 ./install.sh --silent ./silent.conf
最后添加相关的环境变量
cat >> ~/.bash_profile <<EOF #set the ICC environment variables source /opt/intel/Compiler/11.1/073/bin/iccvars.sh intel64 EOF
这个是静默安装的 配置文件./silent.conf 例子 可以直接修改这个文件进行静默安装也可以
具体教程看这里 http://software.intel.com/en-us/articles/intel-compilers-for-linux-version-111-silent-installation-guide/
PSET_SERIAL_NUMBER=序列号 可以申请非商用的 ACTIVATION=serial_number CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes CONTINUE_WITH_OPTIONAL_ERROR=yes PSET_INSTALL_DIR=/opt/intel/Compiler/11.1/073 INSTALL_MODE=RPM ACCEPT_EULA=accept
有点凌乱 整理一个一键安装脚本 本着对系统修改最小的原则 按照ICC默认设置静默安装 SELinux暂时设置为permissive 不需要重启 不过强烈建议设置为 disable 并且在安装后重启一下 去掉相关注释即可 序列号请自己去上面提到的网站申请
#selinux 设置为disabled 至少也要设置为 permissive 一般centos默认设置为SELINUX=enforcing #设置SELINUX为premissive #sed -i 's/^SELINUX=.*$/SELINUX=permissive/' /etc/selinux/config #直接关闭 SELINUX 最后需要重启 #sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config #不重启对selinux 进行设置 保证安装顺利 setenforce permissive #安装需要的库 yum -y install man which gcc gcc-c++ compat-libstdc++-33 #下载ICC并解压 wget -Nc http://registrationcenter-download.intel.com/akdlm/irc_nas/1924/l_cproc_p_11.1.073.tgz tar zxvf ./l_cproc_p_11.1.073.tgz cd ./l_cproc_p_11.1.073 #按照向导一步步进行安装 #./install.sh #生成静默安装配置文件 cat >> ./silent.conf <<EOF PSET_SERIAL_NUMBER=你自己的序列号 ACTIVATION=serial_number CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes CONTINUE_WITH_OPTIONAL_ERROR=yes PSET_INSTALL_DIR=/opt/intel/Compiler/11.1/073 INSTALL_MODE=RPM ACCEPT_EULA=accept EOF #静默安装 ./install.sh --silent ./silent.conf #添加环境变量 cat >> ~/.bash_profile <<EOF #set the ICC environment variables source /opt/intel/Compiler/11.1/073/bin/iccvars.sh intel64 EOF #立刻启用这些环境变量 source /opt/intel/Compiler/11.1/073/bin/iccvars.sh intel64 #重启linux #reboot
具体编译什么的 请待续