`

安装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

    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.

    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安装包 for windows.zip

    ice for windows 安装包。 包含ice3.7.0.msi ice3.7.2.msi 3.7.3.msi 3.7.4.msi 以及相关lib 和 tools

    Ice-3.6.5.msi

    Internet Communications Engine,或Ice,是ZeroC开发的一个面向对象的中间件平台。

    ICE安装及使用示例

    ICE安装及使用示例.pdf

    zeroc_ice-3.7.6 for python Windows32

    python安装ice: pip install zeroc-ice

    Ice-3.3.1 依赖

    Ice-3.3.1 编译依赖第三方软件,安装Ice-3.3.1中间件必下载。

    ICE的安装说明

    ICE的安装以及环境的配置,ICE入门的好文档

    Ubuntu-zeroc-ice 环境安装

    本文主要介绍如何在Ubuntu 下安装 ice服务器,方便大家入门,同时也方便后面自己查看

    zeroc ice3.4安装2

    zeroc ice3.4安装2 Ice is a modern object-oriented toolkit that enables you to build distributed applications with minimal effort. Ice allows you to focus your efforts on your application logic while ...

    ICE安装说明书.doc

    详细介绍了ice中间件在linux平台和windows平台上的安装,包括jdk6.0安装

    zeroc ice3.4安装1

    zeroc ice3.4安装1 Ice is a modern object-oriented toolkit that enables you to build distributed applications with minimal effort. Ice allows you to focus your efforts on your application logic while ...

    ice-builder-visualstudio:从Visual Studio为MSBuild配置Ice Builder

    适用于Visual Studio的Ice Builder与Visual Studio 2015、2017或2019兼容,并且最适合以下Ice安装: 适用于Ice 3.7或更高版本的Ice NuGet软件包 内容 从Ice Builder 4.x升级项目 从Ice Add-in迁移 从源头建造制冰...

    Ice-3.7.4.msi for windows版

    ICE-3.7.4 最新安装文件msi文件,windows版 ICE常见报错 Exception in thread Ice.ConnectionRefusedException error = 0 at IceInternal.Network.doFinishConnect(Network.java:417) at IceInternal....

    zeroc-icejs:用于 JavaScript 运行时的 Ice

    您可以使用npm或bower安装 Ice for JavaScript。 新产品经理 $ npm install zeroc-icejs --save 该模块还包括用于 JavaScript 的 Ice 浏览器版本。 凉亭 $ bower install zeroc-icejs --save 用法 新产品经理 var ...

    ice教程和ice中文版手册

    里面有关于ice的教程以及ice中文版的手册,对ice的安装运行等都有很大的帮助,费尽了千辛万苦找来的资料。

    ICE-3.7.1最新安装文件msi文件

    ICE-3.7.1最新安装文件msi文件,绝对官方。 RPC王者。

    docker-iceberg-flink

    docker-iceberg-flink 声明 相关镜像参考了 的 和 docker-compose.yml中使用的镜像已上传到docker hub,可直接下载使用 版本 kafka:2.7.0 hadoop:3.2.1 flink:1.11.3 iceberg:0.11.0 scala:2.12 管理端口 hadoop: ...

    ice3.7.3安装及c#库

    将ice的安装包及c#库保存,可以直接使用开发,3.7.3版本的库;包括所有服务,主要是的c#版本的ice库。

Global site tag (gtag.js) - Google Analytics