一、下载:
Ice-3.4.2.tar.gz源码安装包 : wget
第三方依赖库:wget
二、解压:
将第三方依赖库解压后,得到如下一个文件:
mcpp-2.7.2.tar.gz
db-4.8.30.NC.tar.gz
bzip2-1.0.6.tar.gz
expat-2.0.1.tar.gz
openssl-0.9.8r.tar.gz
二、准备:
本文将演示在linux下安装Ice-3.4.2的全过程,安装目录如下:
/usr/local/ice/ice-3.4.2 #ice的安装目录
/usr/local/ice/mcpp #依赖库mcpp的安装目录
/usr/local/ice/db #依赖库BerkeleyDB 的安装目录
/usr/local/ice/bzip2 #依赖库bzip2的安装目录
/usr/local/ice/expat #依赖库expat的安装目录
/usr/local/ice/openssl #依赖库openssl的安装目录
三、安装步骤:
1、安装mcpp :
# tar -zxvf mcpp-2.7.2.tar.gz
# cd mcpp-2.7.2
# ./configure –prefix=/usr/local/ice/mcpp CFLAGS=-fPIC -enable-mcpplib -disable-shared
# make
# make install
2、安装 BerkeleyDB:
# tar -zxvf db-4.8.30.NC.tar.gz
# cd db-4.8.30.NC/build_unix
# ../dist/configure –prefix=/usr/local/ice/db –enable-cxx
# make
# make install
3、安装bzip2:
# tar -zxvf bzip2-1.0.6.tar.gz
# cd bzip2-1.0.6
# vi Makefile //编辑Makefile,
1)将其中的PREFIX修改成 /usr/local/ice/bzip2
2)在其中的CFLAGS参数的值后添加 -fPIC
# make
# make install
4、安装expat:
# tar -zxvf expat-2.0.1.tar.gz
# cd expat-2.0.1
# ./configure –prefix=/usr/local/ice/expat
# make
# make install
5、安装openssl:
# tar -zxvf openssl-0.9.8r.tar.gz
# cd openssl-0.9.8r
# ./config –prefix=/usr/local/ice/openssl enable-shared -fPIC
# make
# make install
6、建立 lib64 到各依赖库的lib软连接
ln -s /usr/local/ice/mcpp/lib /usr/local/ice/mcpp/lib64
ln -s /usr/local/ice/db/lib /usr/local/ice/db/lib64
ln -s /usr/local/ice/bzip2/lib /usr/local/ice/bzip2/lib64
ln -s /usr/local/ice/expat/lib /usr/local/ice/expat/lib64
ln -s /usr/local/ice/openssl/lib /usr/local/ice/openssl/lib64
7、安装Ice-3.4.2
# tar -zxvf Ice-3.4.2.tar.gz
# cd Ice-3.4.2/cpp
# vi config/Make.rules // 编辑Make.rules文件,具体修改内容参看附录1
# make
# make install
# vi /etc/profile //设置Ice-3.4.2的环境变量,具体添加内容参看附录2
# source /etc/profile
至此,基本安装完成,测试一下吧^_^
附录1:
# prefix ?= /opt/Ice-$(VERSION)
prefix
?=
/
usr
/
local
/
ice
/
Ice
–
3.4.2
# embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)
embedded_runpath_prefix
?=
/
usr
/
local
/ice/Ice-3.4.2
BZIP2_HOME ?=
/
usr
/
local
/ice/bzip2
DB_HOME
?=
/
usr
/
local
/ice/db
EXPAT_HOME
?=
/
usr
/
local
/ice/expat
OPENSSL_HOME
?=
/
usr
/
local
/
ice/openssl
MCPP_HOME
?=
/
usr
/
local
/ice/mcpp
附录2:
ICEJ_HOME=/usr/local/ice/Ice-3.4.2
PATH=$ICEJ_HOME/bin:$PATH export ICEJ_HOME PATH