1. System Environment Preparation
A. Change the system shell to bash because the system default shell is not easy to use.
# which bash
Usr/bin/bash
# usermod-s/usr/bin/bash Root
B. Create a System. Profile file:
# Cp/etc/skel/local.profile/.profile
C. Add the following in the. profile file
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. Install the following toolkit from the Solaris 10 installation CD
# 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. Download gcc software
# 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
Note: The first GCC application, the following 3 library packages for GCC
3. Decompression and Installation
# 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. Modify the. Profile file
Add the following in the. profile file
Export Ld_libraey_path=/usr/local/lib:.
Export CC=GCC
Detailed source reference: http://www.jb51.net/os/Solaris/1701.html