CentOS 6.2 x84_64 下安装intel 的icc / ifort 编译器全过程记录

第一步:先安装intel需要的软件包,特别是libstdc++5

可以参照我的另外一篇文章Ubuntu 10.04 下安装Intel Fortran/C++ 编译器(ifort 和 icc) 中介绍的(见 ),安装intel编译器前需要其他软件包。需要注意的ubuntu下使用的是apt-get 工具安装,CentOS下并没有自带apt-get这个工具,但是centos下自带的有yum工具(稍后的一篇博文将写到yum 和apt-get的具体区别),我们可以根据yum进行命令安装。例如:libstdc++5的安装:在centos下必须找到与其对应的软件包的名称,才能用yum进行安装libstdc++.so.5

在root身份下运行命令: yum install libstdc++.so.5

第二步:下载intel编译器安装包到,选择英特尔 Fortran 编译器 Linux* 专业版 ,然后注册,Intel会给用户发一封电子邮件,其中包含一个协议附件。剩下的工作是收取邮件,然后根据邮件中提供的地址下载软件l_ccompxe_intel64_2011.10.319.tgz l_fcompxe_intel64_2011.10.319.tgz

第三步:license设置。

创建 /opt/intel/licenses 目录

  mkdir -p /opt/intel/licenses

把邮件附件中的.lic文件拷贝到/opt/intel/licenses目录下

cp NCOM_L_CMP__N49V-3GP6M9F2.lic /opt/intel/licenses

第四步:cd 到 l_ccompxe_intel64_2011.10.319.tgz 文件所在的目录,然后解压。

  !注:终端下可用命令:

  tar -zxvf l_ccompxe_intel64_2011.10.319.tgz 解压。

进入解压后的文件夹,运行:

    ./install.sh

注:运行./install时,CentOS下可能会出现系统为强制模式,需更改为宽容模式,或将SELinux关闭。下面为不重启电脑的情况下的解决办法:

root用户身份输入如下命令:

[root@localhost l_ccompxe_intel64_2011.10.319]# setenforce 0[root@localhost l_ccompxe_intel64_2011.10.319]# getenforcePermissive

此时,显示为Permissive后,再次运行./install,然后继续以下安装步骤。

第五步:选择1,typical安装

一路enter下去,有yes or no就输入yes,有accept or rejecet就输入accept

选择默认的安装路径即可,一路enter下去

若安装正常,,应会提示安装成功;

第六步: 按照安装成功后的提示路径,将如下语句加入~/.bashrc后保存退出。

将语句  source /opt/intel/composer_xe_2011_sp1.10.319/bin/compilervars.sh intel64

  加入到 ~/.bashrc(其他Linux是~/.bash_profile文件) 文件末尾,保存退出。

  !注:终端下可执行 gedit ~/.bashrc 保存退出后,执行 source ~/.bashrc

测试,which icc,会显示安装路径。

ifort 和icc的安装过程完全相同,依次执行以上几个步骤,便可安装成功。

  下面为安装全过程:

[@localhost ~]$ su root密码:[root@localhost ]# mkdir -p /opt/intel/licenses[root@localhost ]# cp NCOM_L_CMP__N49V-3GP6M9F2.lic /opt/intel/licenses

[@localhost ~]$ tar -zxvf l_ccompxe_intel64_2011.10.319.tgzl_ccompxe_intel64_2011.10.319/l_ccompxe_intel64_2011.10.319/rpms/l_ccompxe_intel64_2011.10.319/rpms/EULA.txtl_ccompxe_intel64_2011.10.319/rpms/intel-compilerpro-common-319-12.1-10.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-compilerpro-devel-319-12.1-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-compilerpro-vars-319-12.1-10.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-compilerproc-319-12.1-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-compilerproc-common-319-12.1-10.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-compilerproc-devel-319-12.1-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-idb-319-12.1-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-idb-common-319-12.1-10.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-idbcdt-319-12.1-10.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-ipp-sp1-319-7.0-7.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-ipp-sp1-common-319-7.0-7.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-ipp-sp1-devel-319-7.0-7.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-mkl-sp1-319-10.3-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-mkl-sp1-common-319-10.3-10.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-mkl-sp1-devel-319-10.3-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-openmp-319-12.1-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-openmp-devel-319-12.1-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-sourcechecker-common-319-12.1-10.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-sourcechecker-devel-319-12.1-10.x86_64.rpml_ccompxe_intel64_2011.10.319/rpms/intel-tbb-sp1-319-4.0-4.noarch.rpml_ccompxe_intel64_2011.10.319/rpms/intel-tbb-sp1-devel-319-4.0-4.noarch.rpml_ccompxe_intel64_2011.10.319/pset/l_ccompxe_intel64_2011.10.319/pset/chklic/l_ccompxe_intel64_2011.10.319/pset/chklic/32/l_ccompxe_intel64_2011.10.319/pset/chklic/32/chklicl_ccompxe_intel64_2011.10.319/pset/chklic/32/chklic_libFNP.sol_ccompxe_intel64_2011.10.319/pset/chklic/32e/l_ccompxe_intel64_2011.10.319/pset/chklic/32e/chklicl_ccompxe_intel64_2011.10.319/pset/chklic/32e/chklic_libFNP.sol_ccompxe_intel64_2011.10.319/pset/chklic/rpm_extract.32l_ccompxe_intel64_2011.10.319/pset/chklic/rpm_extract.32el_ccompxe_intel64_2011.10.319/pset/tools/l_ccompxe_intel64_2011.10.319/pset/tools/ipcheck_x32l_ccompxe_intel64_2011.10.319/pset/tools/ipcheck_x64l_ccompxe_intel64_2011.10.319/pset/activation/l_ccompxe_intel64_2011.10.319/pset/activation/FNPLicensingService/l_ccompxe_intel64_2011.10.319/pset/activation/FNPLicensingService/32/l_ccompxe_intel64_2011.10.319/pset/activation/FNPLicensingService/32/FNPLicensingServicel_ccompxe_intel64_2011.10.319/pset/activation/FNPLicensingService/32e/l_ccompxe_intel64_2011.10.319/pset/activation/FNPLicensingService/32e/FNPLicensingServicel_ccompxe_intel64_2011.10.319/pset/activation/FNPLicensingService/64/l_ccompxe_intel64_2011.10.319/pset/activation/FNPLicensingService/64/FNPLicensingServicel_ccompxe_intel64_2011.10.319/pset/activation/README.txtl_ccompxe_intel64_2011.10.319/pset/activation/install_fnp.shl_ccompxe_intel64_2011.10.319/pset/32/l_ccompxe_intel64_2011.10.319/pset/32/gcc-3.2/l_ccompxe_intel64_2011.10.319/pset/32/gcc-3.2/libstdc++.so.5l_ccompxe_intel64_2011.10.319/pset/32/activation.sol_ccompxe_intel64_2011.10.319/pset/32/activation_libFNP.sol_ccompxe_intel64_2011.10.319/pset/32/install.32l_ccompxe_intel64_2011.10.319/pset/32/libMinAxis.sol_ccompxe_intel64_2011.10.319/pset/32/libares.sol_ccompxe_intel64_2011.10.319/pset/32/libcrypto.sol_ccompxe_intel64_2011.10.319/pset/32/libcrypto.so.0.9.7l_ccompxe_intel64_2011.10.319/pset/32/libcrypto.so.1.0.0l_ccompxe_intel64_2011.10.319/pset/32/libexpat.so.0l_ccompxe_intel64_2011.10.319/pset/32/libssl.sol_ccompxe_intel64_2011.10.319/pset/32/libssl.so.0.9.7l_ccompxe_intel64_2011.10.319/pset/32/libssl.so.1.0.0l_ccompxe_intel64_2011.10.319/pset/32/libxml2.so.2l_ccompxe_intel64_2011.10.319/pset/licenses/l_ccompxe_intel64_2011.10.319/pset/licenses/BigInteger/l_ccompxe_intel64_2011.10.319/pset/licenses/BigInteger/LICENSEl_ccompxe_intel64_2011.10.319/pset/licenses/BigInteger/Readmel_ccompxe_intel64_2011.10.319/pset/licenses/expat/l_ccompxe_intel64_2011.10.319/pset/licenses/expat/COPYINGl_ccompxe_intel64_2011.10.319/pset/licenses/expat/READMEl_ccompxe_intel64_2011.10.319/pset/licenses/openssl/l_ccompxe_intel64_2011.10.319/pset/licenses/openssl/license.txtl_ccompxe_intel64_2011.10.319/pset/licenses/openssl/readme.txtl_ccompxe_intel64_2011.10.319/pset/licenses/axis/l_ccompxe_intel64_2011.10.319/pset/licenses/axis/Copyright.txtl_ccompxe_intel64_2011.10.319/pset/licenses/axis/LICENSEl_ccompxe_intel64_2011.10.319/pset/licenses/libxml/l_ccompxe_intel64_2011.10.319/pset/licenses/libxml/Copyrightl_ccompxe_intel64_2011.10.319/pset/licenses/libxml/READMEl_ccompxe_intel64_2011.10.319/pset/licenses/ares/l_ccompxe_intel64_2011.10.319/pset/licenses/ares/READMEl_ccompxe_intel64_2011.10.319/pset/licenses/ares/licensel_ccompxe_intel64_2011.10.319/pset/licenses/libstdc++/l_ccompxe_intel64_2011.10.319/pset/licenses/libstdc++/readme-libstdc++.txtl_ccompxe_intel64_2011.10.319/pset/32e/l_ccompxe_intel64_2011.10.319/pset/32e/gcc-3.2/l_ccompxe_intel64_2011.10.319/pset/32e/gcc-3.2/libstdc++.so.5l_ccompxe_intel64_2011.10.319/pset/32e/activation.sol_ccompxe_intel64_2011.10.319/pset/32e/activation_libFNP.sol_ccompxe_intel64_2011.10.319/pset/32e/install.32el_ccompxe_intel64_2011.10.319/pset/32e/libMinAxis.sol_ccompxe_intel64_2011.10.319/pset/32e/libares.sol_ccompxe_intel64_2011.10.319/pset/32e/libcrypto.sol_ccompxe_intel64_2011.10.319/pset/32e/libcrypto.so.0.9.7l_ccompxe_intel64_2011.10.319/pset/32e/libcrypto.so.1.0.0l_ccompxe_intel64_2011.10.319/pset/32e/libexpat.so.0l_ccompxe_intel64_2011.10.319/pset/32e/libssl.sol_ccompxe_intel64_2011.10.319/pset/32e/libssl.so.0.9.7l_ccompxe_intel64_2011.10.319/pset/32e/libssl.so.1.0.0l_ccompxe_intel64_2011.10.319/pset/32e/libxml2.so.2l_ccompxe_intel64_2011.10.319/pset/iat/l_ccompxe_intel64_2011.10.319/pset/iat/iat_install.shl_ccompxe_intel64_2011.10.319/pset/iat/intel-iat-2.0.013-1.i686.rpml_ccompxe_intel64_2011.10.319/pset/iat/intel-iat-2.0.013-1.ia64.rpml_ccompxe_intel64_2011.10.319/pset/iat/intel-iat-2.0.013-1.x86_64.rpml_ccompxe_intel64_2011.10.319/pset/iat/rpm_extract.32l_ccompxe_intel64_2011.10.319/pset/iat/rpm_extract.32el_ccompxe_intel64_2011.10.319/pset/iat/rpm_extract.64l_ccompxe_intel64_2011.10.319/pset/check.awkl_ccompxe_intel64_2011.10.319/pset/cpu_checkl_ccompxe_intel64_2011.10.319/pset/install.shl_ccompxe_intel64_2011.10.319/pset/l_cpp_composer_xe.asrl_ccompxe_intel64_2011.10.319/pset/link_install.shl_ccompxe_intel64_2011.10.319/pset/mediaconfig.xmll_ccompxe_intel64_2011.10.319/pset/searc.datl_ccompxe_intel64_2011.10.319/cd_eject.shl_ccompxe_intel64_2011.10.319/install.shl_ccompxe_intel64_2011.10.319/licensel_ccompxe_intel64_2011.10.319/license_jpl_ccompxe_intel64_2011.10.319/support.txt[@localhost ~]$ cd l_ccompxe_intel64_2011.10.319

[@localhost l_ccompxe_intel64_2011.10.319]$ su root密码:******

[root@localhost l_ccompxe_intel64_2011.10.319]# ./install.shYour system is protected with Security-enhanced Linux* (SELinux).

Initial product installation and licensing requires that SELinux be disabledor set to “Permissive” mode. You can temporarily disable SELinux, install theproduct, and then re-enable SELinux. SELinux needs to be disabled only duringinitial product installation and licensing setup. SELinux does not affectrun-time operation of the product.

You may disable SELinux by either: – changing your /etc/sysconfig/selinux file. Change the line containing “SELINUX=enforcing” to “SELINUX=disabled” or to “SELINUX=permissive”. – OR changing your lilo.conf or grub.conf file. Add the “selinux=0” kernel argument.

You will need to reboot your system for these changes to take effect. You can also ask your system administrator to make SELinux mode changes.Remember to enable SELinux again and reboot after successful product installation, if SELinux is required. Please consult your product Release Notes document for more information on how to install in an SELinux-enabled environment.

More information about SELinux can be found at

Quitting! Press “Enter” to terminate install.

[root@localhost l_ccompxe_intel64_2011.10.319]# setenforce 0[root@localhost l_ccompxe_intel64_2011.10.319]# getenforcePermissive

[@localhost l_ccompxe_intel64_2011.10.319]$ sh install.shPlease make your selection by entering an option.Root access is recommended for evaluation.

1. Install as a root for system wide access for all users [default]2. Install to root for system wide access for all users using sudo privileges and password3. Install as current user to limit access to user level

h. Helpq. QuitPlease type a selection [1]: 1Attempting to log in as root…密码:

——————————————————————————–Initializing, please wait…——————————————————————————–

微笑拥抱每一天,做像向日葵般温暖的女子。

CentOS 6.2 x84_64 下安装intel 的icc / ifort 编译器全过程记录

相关文章:

你感兴趣的文章:

标签云: