当前位置: 首页 > 图文教程 > 操作系统 > Solaris > Solaris 10 x86系统下安装gcc过程

Solaris
Solaris系统硬盘分区知识
Solaris9系统上安装Oracle10g RAC
solaris/linux 增加swap交换空间的方法
Solaris系统上Mount(挂载) NTFS / FAT32 / FAT16 / EXT2 / EXT3文件系统
solaris系统配置文件说明
Solaris系统使用小技巧
Solaris 10 x86系统上添加新硬盘
Solaris 10 x86系统下安装gcc过程
改变Solaris 系统运行级别 init
Solaris10.0 文件系统备份和恢复
Solaris系统多用户模式下系统备份和多分区写入磁带
Solaris系统下配置MPXIO
Solaris10.0下挂载光驱
Solaris系统维护经验的几点总结
Solaris10之加载Windows/EXT等分区数据
手工设置Solaris 10.0 上网
详细Solaris 11 安装图解教程
Solaris 远程磁带备份步骤
Solaris 命令 小结

Solaris 10 x86系统下安装gcc过程


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 221 ::
收藏到网摘: n/a

1.  系统环境准备

a.       由于系统默认的shell使用不太方便,所以将系统shell更改为bash。

# which bash

           usr/bin/bash

# usermod  -s  /usr/bin/bash   root   

b.       建立系统 .profile文件:

         # cp  /etc/skel/local.profile   /.profile

c.       在.profile文件中添加如下内容

PATH=/usr/bin:/usr/local/bin:/usr/ucb:/etc:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:.

export PATH

export PS1='\u:\w#'

d.       从Solaris 10安装光盘中安装如下工具包

        # pkgadd –d /cdrom/Solaris_10/Product  SUNWwgetr
        # pkgadd –d /cdrom/Solaris_10/Product  SUNWwgetu
        # pkgadd –d /cdrom/Solaris_10/Product  SUNWwgetS
        # pkgadd –d /cdrom/Solaris_10/Product  SUNWgcmn

2.  下载gcc软件

# wget    ftp://ftp.sunfreeware.com/pub/freeware/intel/10/gcc-3.4.6-sol10-x86-local.gz

# wget        ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libiconv-1.11-sol10-x86-local.gz

# wget        ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libgcc-3.4.6-sol10-x86-local.gz

# wget        ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libintl-3.4.0-sol10-x86-local.gz

注:第一个为gcc的应用程序,下面3个为gcc的库文件包

3.  解压和安装

# gunzip  gcc-3.4.6-sol10-x86-local.gz

# gunzip  libiconv-1.11-sol10-x86-local.gz

# gunzip  libgcc-3.4.6-sol10-x86-local.gz

# gunzip  libintl-3.4.0-sol10-x86-local.gz

#pkgadd  -d  gcc-3.4.6-sol10-x86-local

#pkgadd  -d  libiconv-1.11-sol10-x86-local.gz

#pkgadd  -d  libgcc-3.4.6-sol10-x86-local.gz

#pkgadd  -d  libintl-3.4.0-sol10-x86-local.gz

4.  修改 .profile文件

在 .profile文件中增加如下内容

export LD_LIBRAEY_PATH=/usr/local/lib:.

export CC=gcc