`

安装ice

 
阅读更多

Linux环境下make编译安装ICE-3.3.0

环境:

Linux+lnmp

PHP5.2.17

1、下载安装包:

 

#wget http://www.zeroc.com/download/Ice/3.3/Ice-3.3.1.zip

#wget http://www.zeroc.com/download/Ice/3.3/ThirdParty-Sources-3.3.1.tar.gz

这里提醒一下,安装PHP ICE需要注意PHP版本和ICE版本,PHP 5.2只能用 ICE-3.3.X版本。

 

2、安装步骤

    1)、解压安装包

 

#tar zxvf ThirdParty-Sources-3.3.1.tar.gz

    2)、安装mcpp

 

 

#tar zxvf mcpp-2.7.2.tar.gz

#cd mcpp-2.7.2

#./configure --prefix=/usr/local/ICE-3.3.0/mcpp-2.7.2/ CFLAGS=-fPIC -enable-mcpplib -disable-shared

#make

#make install

    3)、安装Berkeley DB

 

# tar zxvf db-4.6.21.NC.tar.gz

# cd db-4.6.21.NC

# cd build_unix/

# ../dist/configure --prefix=/usr/local/ICE-3.3.0/BerkeleyDB.4.6/ -enable-cxx

# make

# make install

    4)、安装bzip2

 

 

# tar zxvf bzip2-1.0.5.tar.gz

# cd bzip2-1.0.5

修改Makefile文件:

 

 

# vim Makefile
#修改PREFIX指向
# Where you want it installed when you do 'make install'
# PREFIX=/usr/local
PREFIX=/usr/local/ICE-3.3.0/bzip2-1.0.5
# make

# make install

    5)、安装expat

 

 

# tar zxvf expat-2.0.1.tar.gz

# cd expat-2.0.1

# ./configure --prefix=/usr/local/ICE-3.3.0/expat-2.0.1/

# make

# make install

    6)、安装openssl

 

 

# tar zxvf openssl-0.9.8g.tar.gz

# cd openssl-0.9.8g

# ./config --prefix=/usr/local/ICE-3.3.0/openssl

# make

# make install


问题:

make[2]: *** [md5-x86_64.o] Error 1

make[2]: Leaving directory `/root/lamp/openssl-0.9.8e/crypto/md5'

make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/root/lamp/openssl-0.9.8e/crypto'
make: *** [build_crypto] Error 1
 
解决方法:
下载更高的版本可以解决以上问题,这里我下的是openssl-1.0.1j.tar.gz
 
wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz
安装此版本的Openssl即可

    7)、安装ICE-3.3.1

 

 

# uzip zxvf Ice-3.3.1.zip

# cd Ice-3.3.1/cpp/

# vim config/Make.rules

修改:

 

 

#
# Select an installation base directory. The directory will be created
# if it does not exist.
#
prefix                   ?= /usr/local/ICE-3.3.0/Ice-$(VERSION)

#
# The "root directory" for runpath embedded in executables. Can be unset
# to avoid adding a runpath to Ice executables.
#
embedded_runpath_prefix  ?= /usr/local/ICE-3.3.0/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)

# If libbzip2 is not installed in a standard location where the
# compiler can find it, set BZIP2_HOME to the bzip2 installation
# directory.
#
BZIP2_HOME              ?= /usr/local/ICE-3.3.0/bzip2-1.0.5

# If Berkeley DB is not installed in a standard location where the
# compiler can find it, set DB_HOME to the Berkeley DB installation
# directory.
#
DB_HOME         ?= /usr/local/ICE-3.3.0/BerkeleyDB.4.6

# If expat is not installed in a standard location where the compiler
# can find it, set EXPAT_HOME to the expat installation directory.
#
EXPAT_HOME              ?= /usr/local/ICE-3.3.0/expat-2.0.1

#
# If OpenSSL is not installed in a standard location where the
# compiler can find it, set OPENSSL_HOME to the OpenSSL installation
# directory.
#
OPENSSL_HOME            ?= /usr/local/ICE-3.3.0/openssl

#
# If Mcpp is not installed in a standard location where the  compiler 
# can find it, set MCPP_HOME to the Mcpp installation directory.
#
MCPP_HOME               ?= /usr/local/ICE-3.3.0/mcpp-2.7.2

修改:(如果直接make可以成功,则忽略该修改)

 

 


编译安装:

 

 

# make

# make install


问题:
/usr/bin/ld: cannot find -lmcpp
collect2: ld returned 1 exit 
status
make[2]: *** [../../lib/libSlice.so.3.3.1] Error 1
make[2]: Leaving 
directory `/usr/local/Ice-3.3.1/cpp/src/Slice'
make[1]: *** [all] Error 
1
make[1]: Leaving directory `/usr/local/Ice-3.3.1/cpp/src'
make: *** 
[all] Error 1
解决方法:

 通常在软件编译时出现的usr/bin/ld: cannot find -lxxx的错误,主要的原因是库文件并没有导入的ld检索目录中

    解决方式:

    1.  确认库文件是否存在,比如-l123, 在/usr/lib, /usr/local/lib,或者其他自定义的lib下有无lib123.so, 如果只是存在lib123.so.1,那么可以通过ln -sv lib123.so.1   lib123.so,建立一个连接重建lib123.so.

    2.  检查/etc/ld.so.conf中的库文件路径是否正确,如果库文件不是使用系统路径,/usr/lib, /usr/local/lib, 那么必须在文件中加入.

    3.  ldconfig 重建ld.so.cache文件,ld的库文件检索目录存放文件。尤其刚刚编译安装的软件,必须运行ldconfig,才能将新安装的库文件导入ld.so.cache.

 

若此方法不行,且该软件已安装,也已在自定义或安装目录中找到lib123.so.1文件,则可以直接进入/usr/lib文件夹,执行  ln -sv /usr/local/software/lib123.so.1 lib123.so 

    8)、编译安装 PHP 版本

 

 

# cd ../php

# vim config/Make.rules

参照ICE修改相应配置,并修改PHP_HOME路径:

 

 

#
# Select an installation base directory. The directory will be created
# if it does not exist.
#

prefix                  ?= /usr/local/ICE-3.3.0/Ice-$(VERSION)

#
# The "root directory" for runpath embedded in executables. Can be unset
# to avoid adding a runpath to Ice executables.
#
embedded_runpath_prefix  ?= /usr/local/ICE-3.3.0/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)


# If you've installed a distribution, or PHP was included with
# your system, then you likely need to review the values of
# PHP_INCLUDE_DIR and PHP_LIB_DIR.
#

PHP_HOME                ?= /usr/local/php

编译安装:

 

 

# make

# make install

复制 IcePHP.so到PHP extension_dir目录:

 

 

# cp -p /usr/local/ICE-3.3.0/Ice-3.3.1/lib/IcePHP.so /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/

修改PHP配置文件php.ini,添加IcePHP.so

 

 

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
extension = "memcache.so"
extension = "pdo_mysql.so"
extension = "IcePHP.so"


     9)、重启服务,查看php -m或phpinfo

 

 

# /usr/local/php/bin/php -m


filter
ftp
gd
gettext
hash
ice
iconv
json
libxml
分享到:
评论

相关推荐

    Linux下安装ICE包

    在Linux操作系统中,安装ICE(Integration and Communication Environment)包是一个重要的任务,特别是在开发分布式系统或者进行跨平台通信时。ICE是一种高性能、灵活且易于使用的中间件,它允许应用程序通过网络...

    ICE安装及使用示例

    为了安装ICE,需要先安装一系列必要的依赖库: 1. **GCC和G++**:用于编译ICE源码的基本编译器。 - `yum install gcc` - `yum install gcc-c++` 2. **Mcpp**:ICE编译过程中的预处理器。 - `yum install mcpp....

    ice安装包 for windows.zip

    首先,安装包中包含了多个版本的ICE MSI安装程序,如ice3.7.0.msi、ice3.7.2.msi、3.7.3.msi和3.7.4.msi。这些MSI文件是Windows Installer包,主要用于在Windows系统上进行ICE框架的安装。每个版本的差异主要体现在...

    Ice-3.7.0 下载地址、安装及源码

    Ice Ice-3.7.0 linux windows mac os docker java js python ruby source Download Ice 3.7 Version: 3.7.0 - July 21, 2017 You are licensing Ice under GPLv2 unless you purchase a commercial license.

    ice3.7.3安装及c#库

    首先,让我们来看看如何安装ICE 3.7.3。安装过程通常包括以下步骤: 1. 下载:你可以从官方Zeroc公司网站上下载ICE 3.7.3的安装包。这个压缩包文件名为"ice3.7.3",包含了所有必要的组件和文档。 2. 解压:将下载...

    ice_3.7.0_linux版

    Zero ICE,Zeroc ICE,ice,linux,2017年最新版的Zero ICE版本3.7.0,linux版本 Zero ICE,Zeroc ICE,ice,linux,2017年最新版的Zero ICE版本3.7.0,linux版本

    ICE+vs2015的安装文件

    这通常是一个Windows Installer包,用户可以通过双击运行来安装ICE框架及其相关的库和开发工具。该版本经过测试,证明是稳定且兼容的,能够正常工作。 “iceBuilder”是ICE在Visual Studio 2015中的一个扩展插件,...

    ICE 的安装及在vs2013里面的配置

    接下来,请按照以下步骤安装ICE: 1. **下载ICE安装包**:访问ICE官方网站或其他可信来源下载ICE 3.5.1的安装包。 2. **运行安装程序**:双击下载好的安装文件,按照提示完成安装过程。 3. **确认安装路径**:默认...

    ice3.7.3安装包 for windows.zip

    安装ICE时,用户通常会按照以下步骤操作: 1. 解压下载的“ice3.7.3 for windows.zip”文件。 2. 运行相应的MSI文件,按照安装向导的提示完成安装过程。 3. 在安装过程中,系统会询问安装路径、配置选项等信息,用户...

    Ice_install.rar_ICE_ISCE install_ice lin_ice linux

    首先,安装ICE的前提条件是拥有一个稳定且兼容的Linux操作系统。Ubuntu或CentOS等Linux发行版通常是开发环境的首选。确保系统已更新至最新版本,以获取最新的库和安全补丁。 步骤一:安装基本依赖 在Linux环境下...

    ICE3.3版安装及配置。

    在安装ICE 3.3时,首先需要从官方网站或者指定的链接下载对应平台的安装包。安装过程中,需要注意选择正确的操作系统版本,并根据系统环境配置相应的路径。对于Windows系统,通常会有一个可执行的安装程序,只需按照...

    分布式编译icecream源码

    在实际使用icecream时,首先需要在所有参与编译的机器上安装icecream的相关软件包,包括icecc、iceccd(调度服务器)以及必要的编译器套件。然后,在主开发机上配置环境变量,使编译命令通过icecream代理。这样,...

    ICE 的聊天demo 含有ICE的配置文档

    - 安装ICE中间件,包括库文件、头文件和编译工具。 - 配置Visual Studio 2013以支持ICE项目,包括添加必要的库路径、编译器选项等。 - 使用`.ice`文件定义服务接口,并生成对应的客户端和服务端代理代码。 - 实现...

    ICE入门 文章集

    《HelloWorld_ICE分布式应用开发入门_MichiHenning.pdf》这篇文章很可能是介绍ICE的基础知识,包括如何安装ICE,以及通过一个简单的"Hello, World!"程序来演示ICE的基本用法。开发者Michi Henning可能会讲解ICE的...

    ice最简单实现 ruby调用ice接口 - Ruby - language - ITeye论坛

    1. 安装ICE库:压缩包中的"Ice-3.3.1-VC60.msi"是一个Windows版本的ICE安装程序,它包含了Ruby所需的绑定库。在其他操作系统上,你可以从ZeroC官方网站下载适合的版本并按照文档安装。 2. 引入库:在Ruby代码中,你...

    ICE通信Demo文档

    #### 一、安装ICE生成工具 为了开始ICE通信的开发,首先需要安装必要的工具。具体包括以下三个安装包: 1. **Ice-3.4.2.msi**:这是ICE核心组件的安装包,包含了ICE的基本运行环境。 2. **Ice-3.4.2-ThirdParty.msi*...

    Ice-3.3.1 依赖

    《Ice-3.3.1 依赖:构建与...开发者在安装Ice时,需确保这些依赖项已正确安装并配置,以充分利用Ice的功能,构建高效、安全的分布式系统。理解这些依赖关系对于任何希望在项目中使用Ice的开发者来说都是至关重要的。

    python模块——ICE协议

    1. **安装ICE**: 首先,你需要通过官方的下载页面获取最新版本的ICE,并按照文档指示安装到你的系统中。安装完成后,需要将ICE的库路径添加到PYTHONPATH环境变量中。 2. **导入ICE库**: 在Python脚本中,使用`...

Global site tag (gtag.js) - Google Analytics