让代码飞
目标: 一阶段:能替代任何人 二阶段:任何人不能替代你

CentOS6.8离线安装GCC

离线安装需要下载的rpm包有

ppl-0.10.2-11.el6.x86_64.rpm
cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
mpfr-2.4.1-6.el6.x86_64.rpm
cpp-4.4.7-17.el6.x86_64.rpm
kernel-headers-2.6.32-642.el6.x86_64.rpm
glibc-headers-2.12-1.192.el6.x86_64.rpm
glibc-devel-2.12-1.192.el6.x86_64.rpm
libgomp-4.4.7-17.el6.x86_64.rpm
gcc-4.4.7-17.el6.x86_64.rpm
libstdc++-devel-4.4.7-17.el6.x86_64.rpm
gcc-c++-4.4.7-17.el6.x86_64.rpm

下载网址:ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.8/x86_64/os/Packages/

Centos6.8安装:

安装命令: rpm -ivh *.rpm
有些是已安装好的会提示已安装无需在意 继续安装
安装顺序:

  1. rpm -ivh kernel-headers-2.6.32-642.el6.x86_64.rpm
  2. rpm -ivh libgomp-4.4.7-17.el6.x86_64.rpm
  3. rpm -ivh libstdc++-devel-4.4.7-17.el6.x86_64.rpm
  4. rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
  5. rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
  6. rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
  7. rpm -ivh cpp-4.4.7-17.el6.x86_64.rpm
  8. rpm -ivh glibc-devel-2.12-1.192.el6.x86_64.rpm
  9. rpm -ivh glibc-headers-2.12-1.192.el6.x86_64.rpm
  10. rpm -ivh gcc-4.4.7-17.el6.x86_64.rpm
  11. rpm -ivh gcc-c++-4.4.7-17.el6.x86_64.rpm

测试

  1. gcc -v
  2. ==================================================

CentOS7 离线安装gcc/pcre-devel/openssl-devel/zlib-devel

  1. 解压CentOS7操作系统安装镜像,进入到CentOS-7.0-1406-x86_64-DVD\Packages目录,这下面存储了很多rpm包。
    地址:ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/
    2. 找到下面列出的rpm包,上传到CentOS机器任意位置。
    离线安装 - 图1
    autogen-libopts-5.18-5.el7.x86_64.rpm
    cpp-4.8.2-16.el7.x86_64.rpm
    gcc-4.8.2-16.el7.x86_64.rpm
    glibc-devel-2.17-55.el7.x86_64.rpm
    glibc-headers-2.17-55.el7.x86_64.rpm
    kernel-headers-3.10.0-123.el7.x86_64.rpm
    keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm
    krb5-devel-1.11.3-49.el7.x86_64.rpm
    libcom_err-devel-1.42.9-4.el7.x86_64.rpm
    libmpc-1.0.1-3.el7.x86_64.rpm
    libselinux-devel-2.2.2-6.el7.x86_64.rpm
    libsepol-devel-2.1.9-3.el7.x86_64.rpm
    libverto-devel-0.2.5-4.el7.x86_64.rpm
    mpfr-3.1.1-4.el7.x86_64.rpm
    ntp-4.2.6p5-18.el7.centos.x86_64.rpm
    ntpdate-4.2.6p5-18.el7.centos.x86_64.rpm
    openssl098e-0.9.8e-29.el7.centos.x86_64.rpm
    openssl-1.0.1e-34.el7.x86_64.rpm
    openssl-devel-1.0.1e-34.el7.x86_64.rpm
    openssl-libs-1.0.1e-34.el7.x86_64.rpm
    pcre-devel-8.32-12.el7.x86_64.rpm
    pkgconfig-0.27.1-4.el7.x86_64.rpm
    tcl-8.5.13-4.el7.x86_64.rpm
    zlib-1.2.7-13.el7.x86_64.rpm
    zlib-devel-1.2.7-13.el7.x86_64.rpm
    离线安装 - 图2
    3. 执行如下命令,安装。
    rpm -Uvh ./*.rpm —nodeps —force

通过上述日志分析,使用rpm命令离线安装openssl-devel包,所需rpm包具体如下:
libcom_err-1.41.12-23.el6.x86_64.rpm
libselinux-2.0.94-7.el6.x86_64.rpm
keyutils-libs-1.4-5.el6.x86_64.rpm
krb5-libs-1.10.3-65.el6.x86_64.rpm
libkadm5-1.10.3-65.el6.x86_64.rpm
libss-1.41.12-23.el6.x86_64.rpm
openssl-1.0.1e-57.el6.x86_64.rpm
keyutils-libs-devel-1.4-5.el6.x86_64.rpm
e2fsprogs-libs-1.41.12-23.el6.x86_64.rpm
libcom_err-devel-1.41.12-23.el6.x86_64.rp
libsepol-devel-2.0.41-4.el6.x86_64.rpm
libselinux-devel-2.0.94-7.el6.x86_64.rpm
krb5-devel-1.10.3-65.el6.x86_64.rpm
zlib-devel-1.2.3-29.el6.x86_64.rpm
openssl-devel-1.0.1e-57.el6.x86_64.rpm
e2fsprogs-1.41.12-23.el6.x86_64.rpm
krb5-workstation-1.10.3-65.el6.x86_64.rpm
keyutils-1.4-5.el6.x86_64.rpm
libselinux-python-2.0.94-7.el6.x86_64.rpm
libselinux-utils-2.0.94-7.el6.x86_64.rpm

作者:路人末
链接:https://www.jianshu.com/p/d1b2d3de22c5
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。