1.安装如下软件
libiconv-1.14-sol10-x86-local.gz
gcc-3.4.6-sol10-x86-local.gz
libgcc-3.4.6-sol10-x86-local.gz
libintl-3.4.0-sol10-x86-local.gz
flex-2.5.35-sol10-x86-local.gz
gd-2.0.35-sol10-x86-local.gz
zlib-1.2.7-sol10-x86-local.gz
freetype-2.4.2-sol10-x86-local.gz
jpeg-8d-sol10-x86-local.gz
libpng-1.2.49-sol10-x86-local.gz
openssl-1.0.1c-sol10-x86-local.gz
libtool-2.4.2-sol10-x86-local.gz
expat-2.0.1-sol10-sparc-local.gz
fontconfig-2.8.0-sol10-x86-local.gz
libmcrypt-2.5.7.tar.gz
下载地址
http://www.sunfreeware.com/indexintel10.html
http://sourceforge.net/projects/mcrypt/files/Libmcrypt/Production/libmcrypt-2.5.7.tar.gz
2.安装GCC
# gunzip gcc-3.4.6-sol10-x86-local.gz
# pkgadd –d gcc-3.4.6-sol10-x86-local
# gunzip libiconv-1.14-sol10-x86-local.gz
# pkgadd –d libiconv-1.14-sol10-x86-local
# gunzip libgcc-3.4.6-sol10-x86-local.gz
# pkgadd –d libgcc-3.4.6-sol10-x86-local
# gunzip libintl-3.4.0-sol10-x86-local.gz
# pkgadd –d libintl-3.4.0-sol10-x86-local
3.修改设定文件
# cp /etc/skel/local.profile /.profile
/.profile加入以下内容
PATH=/usr/bin:/usr/local/bin:/usr/ucb:/etc:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:.
export Path
export LD_LIBRARY_PATH=/usr/local/lib:.
export CC=gcc
4.重启Solaris,键入以下命令,确认GCC安装完毕
# gcc -v
5.安装其他软件
# gunzip flex-2.5.35-sol10-x86-local.gz
# pkgadd –d flex-2.5.35-sol10-x86-local
# gunzip gd-2.0.35-sol10-x86-local.gz
# pkgadd –d gd-2.0.35-sol10-x86-local
# gunzip zlib-1.2.7-sol10-x86-local.gz
# pkgadd –d zlib-1.2.7-sol10-x86-local
# gunzip freetype-2.4.2-sol10-x86-local.gz
# pkgadd –d freetype-2.4.2-sol10-x86-local
# gunzip jpeg-8d-sol10-x86-local.gz
# pkgadd –d jpeg-8d-sol10-x86-local
# gunzip libpng-1.2.49-sol10-x86-local.gz
# pkgadd –d libpng-1.2.49-sol10-x86-local
# gunzip openssl-1.0.1c-sol10-x86-local.gz
# pkgadd –d openssl-1.0.1c-sol10-x86-local
# gunzip libtool-2.4.2-sol10-x86-local.gz
# pkgadd –d libtool-2.4.2-sol10-x86-local
# gunzip expat-2.0.1-sol10-sparc-local.gz
# pkgadd –d expat-2.0.1-sol10-sparc-local
# gunzip fontconfig-2.8.0-sol10-x86-local.gz
# pkgadd –d fontconfig-2.8.0-sol10-x86-local
# gzip -dc libmcrypt-2.5.7.tar.gz | tar xf -
# cd libmcrypt-2.5.7
# ./configure –prefix=/usr/local/libmcrypt --disable-posix-threads --enable-dynamic-loading
# make
# make install
6.下载Apache2
http://httpd.apache.org/download.cgi
7.安装
# gzip -dc httpd-2.2.23.tar.gz | tar xf -
# cd httpd-2.2.23
# ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all
> --enable-proxy --enable-proxy-connect --enable-ssl=shared --enable-ssl --with-ssl=/usr/local/ssl \
> --enable-proxy-ftp --enable-proxy-http --with-ldap --enable-ldap --enable-authnz-ldap --enable-so --enable-module=so
# make
# make install
8.修改设定文件
# cp /etc/apache2/httpd.conf-sample /etc/apache2/httpd.conf
编辑/etc/apache2/httpd.conf
修改内容:
DocumentRoot "[WEB 发布目录]"
<Directory "[WEB 发布目录]">
如果起始页不是index.html或者index.html.var 必须修改下面的内容:
DocumentIndex index.html index.html.var [Your start Page]
根据需要,添加PHP支持:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
9.根据需要安装PHP,请查照其他文档
10.重新启动apache2
# svcadm disable apache2
# svcadm enable apache2
11.确认Apache2运行状态
#svcs –l apache2
※如果不是online,则配置有误,进入/var/log的network-apache2.XXX.log查看错误原因