Ubuntu14.04 Server安装iServer

最近接到一个任务,需要在ubuntu14.04 Server 环境下安装SuperMap的iServer,在部署过程中遇到了比较多的问题,现在把相关问题记录下来。


环境:

服务器1:SuperMap iDesktop+IntantClient

服务器2:Ubuntu14.04 LTS Server+iServer+InstantClient 

服务器3:RedHat 6.5+Oracle11.2.0.4


声明:在安装之前需要保证操作系统、GIS软件、数据库客户端、数据库服务器端的位数保持一致,本环境都为64Bit


系统需求

查看超图的官方网站,iServer是可以安装在Ubuntu操作系统上的,但是需要安装额外的包。


Ubuntu

在 Ubuntu 14 Server操作系统安装使用iServer时,需要依赖某些库才能正常使用iServer,如 libx11-dev、xinit、gcc等,以及中文语言包。您可以加载系统安装盘补充安装相关库,或在Ubuntu官网获取相关库来手动安装。 如果加载了系统安装盘,或在外网环境下,您可以通过 apt-get install 命令安装相关的库。

  • 安装 libx11-dev、xinit、gcc等,依次执行以下命令:

sudo apt-get install libx11-dev

sudo apt-get install xinit

sudo apt-get install gcc

sudo apt-get install libgomp1

sudo apt-get install libxtst6

sudo apt-get install libxi6

  • 安装许可驱动依赖的 32bit 支持库 libc6-i386 和 ia32-libs,依次执行以下命令:

sudo apt-get install libc6-i386

sudo apt-get install ia32-libs

  • 安装中文语言包

简体中文版 iServer 需要依赖中文环境。如果您在安装Ubuntu系统的时候,没有安装中文语言包,可以执行如下命令为系统安装中文语言包:

sudo apt-get install language-pack-zh-hans

 


安装部署


由于需要考虑到整个环境的存储大小的限制,本次安装为iServer的部署版本,该tar包将近200多MB,直接进行解压即可

supermap@controller:~$ tar -zxvf supermap_iserver_7.1.0a_linux64_deploy.tar.gz 

解压成功后,系统会看到一个新建的SuperMapiServer7C目录。

a:解压完毕之后,我们需要安装许可驱动,前面已经介绍了,这个许可驱动需要额外的操作系统32Bit包

supermap@controller:~/SuperMapiServer7C/support/SuperMap_License/Support$ pwd
/home/supermap/SuperMapiServer7C/support/SuperMap_License/Support
supermap@controller:~/SuperMapiServer7C/support/SuperMap_License/Support$ tar -xvf aksusbd_2.4.1-i386.tar 

解压之后,进入aksusbd-2.4.1-i386文件夹,使用root权限执行dinst文件,安装相关的驱动程序。

supermap@controller:~/SuperMapiServer7C/support/SuperMap_License/Support/aksusbd-2.4.1-i386$ ls
aksusbd     dunst       hasp_update                  winehasp
aksusbd.rc  hasplmd     haspvlib_99235.so
dinst       hasp.rules  SuperMap Trial License .v2c
supermap@controller:~/SuperMapiServer7C/support/SuperMap_License/Support/aksusbd-2.4.1-i386$ sudo ./dinst
dpkg-query: no packages found matching aksusbd
Copy AKSUSB daemon to /usr/sbin ...
Copy WINEHASP daemon to /usr/sbin ...
Copy HASPLMD daemon to /usr/sbin ...
Copy start-up script to /etc/init.d ...
Link HASP SRM runtime environment startup script to system startup folder
Starting HASP SRM runtime environment...
Starting AKSUSB daemon: .
Starting WINEHASP daemon: .
Starting HASPLM daemon: .
Coping VLIB...
Installing v2c...
hasp_update failed with status 65
Done
supermap@controller:~/SuperMapiServer7C/support/SuperMap_License/Support/aksusbd-2.4.1-i386$

b:安装Oracle Instant Client,配置环境变量

直接在Oracle官网下载64Bit的IntantClient,本次测试环境为Oracle10.2.0.5版本,包含sqlplus包,SSH上传到指定目录,配置环境变量即可。


需要注意的是,需要在setenv.sh文件里面添加Oracle的环境变量

supermap@controller:~/SuperMapiServer7C/bin$ ls
bootstrap.jar                 service.bat
catalina.bat                  setclasspath.bat
catalina.sh                   setclasspath.sh
catalina-tasks.xml            setenv.bat
commons-daemon.jar            setenv.sh
commons-daemon-native.tar.gz  shutdown.bat
configtest.bat                shutdown.sh
configtest.sh                 startup.bat
daemon.sh                     startup.sh
digest.bat                    tomcat-juli.jar
digest.sh                     tomcat-native.tar.gz
iserver.bat                   tool-wrapper.bat
iserver-info.jar              tool-wrapper.sh
iserver.sh                    version.bat
passwordreset.bat             version.sh
passwordreset.sh
supermap@controller:~/SuperMapiServer7C/bin$ sudo vi setenv.sh

添加内容如下

export ORACLE_HOME=/home/supermap/instantclient_10_2
export PATH=$ORACLE_HOME:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME
export TNS_ADMIN=$ORACLE_HOME/NETWORK/ADMIN

添加完毕之后,重新启动iserver服务即可。

supermap@controller:~$ cd SuperMapiServer7C/bin/
supermap@controller:~/SuperMapiServer7C/bin$ sudo ./startup.shUsing ISERVER_HOME:    /home/supermap/SuperMapiServer7C/webapps/iserver
Using ISERVER_CONFIG:  /home/supermap/SuperMapiServer7C/webapps/iserver/WEB-INF
Using UGO_HOME:        /home/supermap/SuperMapiServer7C/support/objectsjava/bin
Using CATALINA_BASE:   /home/supermap/SuperMapiServer7C
Using CATALINA_HOME:   /home/supermap/SuperMapiServer7C
Using CATALINA_TMPDIR: /home/supermap/SuperMapiServer7C/temp
Using JRE_HOME:        /home/supermap/SuperMapiServer7C/support/jre
Using CLASSPATH:       /home/supermap/SuperMapiServer7C/bin/bootstrap.jar:/home/supermap/SuperMapiServer7C/bin/tomcat-juli.jar
Tomcat started.


发布服务测试

通过iDesktop,加载Oracle里面的数据,保存相关的工作空间到Oracle数据库中,然后在iServer的manager里面快速发布,提示错误。
Ubuntu14.04 Server安装iServer_第1张图片

查看iServer的后台日志的catalina.out文件
supermap@controller:~/SuperMapiServer7C/logs$ ls
accessrecords.db             iserver.log
catalina.2015-04-04.log      iserverOperation.log
catalina.2015-04-07.log      localhost.2015-04-04.log
catalina.2015-04-11.log      localhost.2015-04-07.log
catalina.2015-04-13.log      localhost.2015-04-11.log
catalina.2015-04-14.log      localhost.2015-04-13.log
catalina.out                 localhost.2015-04-14.log
host-manager.2015-04-04.log  manager.2015-04-04.log
host-manager.2015-04-07.log  manager.2015-04-07.log
host-manager.2015-04-11.log  manager.2015-04-11.log
host-manager.2015-04-13.log  manager.2015-04-13.log
host-manager.2015-04-14.log  manager.2015-04-14.log
supermap@controller:~/SuperMapiServer7C/logs$ pwd
/home/supermap/SuperMapiServer7C/logs


里面报如下内容,libmawt.so的问题
java.lang.UnsatisfiedLinkError: /home/supermap/SuperMapiServer7C/support/objectsjava/bin/libWrapj.so: /home/supermap/SuperMapiServer7C/support/objectsjava/bin/libjawt.so: symbol awt_FreeDrawingSurface, version SUNWprivate_1.1 not defined in file libmawt.so with link time reference
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
	at java.lang.Runtime.loadLibrary0(Runtime.java:849)
	at java.lang.System.loadLibrary(System.java:1088)
	at com.supermap.data.Environment.LoadWrapJ(Unknown Source)
	at com.supermap.data.Environment.<clinit>(Unknown Source)
	at com.supermap.data.InternalHandle.<clinit>(Unknown Source)
	at com.supermap.services.providers.WorkspaceContainer$DefaultWorkspaceConnectionInfoFactory.a(WorkspaceContainer.java:1171)
	at com.supermap.services.providers.WorkspaceContainer$InnerContainer.createUGOConnInfo(WorkspaceContainer.java:864)
	at com.supermap.services.providers.WorkspaceContainer$InnerContainer.get(WorkspaceContainer.java:761)
	at com.supermap.services.providers.WorkspaceContainer$InnerContainer.get(WorkspaceContainer.java:445)
	at com.supermap.services.providers.WorkspaceContainer.get(WorkspaceContainer.java:157)
	at com.supermap.services.rest.resources.impl.ManagementRestUtil.checkWorkspaceValid(ManagementRestUtil.java:1018)
	at com.supermap.services.rest.resources.impl.ValidationResource.checkRequestEntityObjectValid(ValidationResource.java:172)
	at com.supermap.services.rest.DefaultMethodHandler.b(DefaultMethodHandler.java:1416)
	at com.supermap.services.rest.DefaultMethodHandler.a(DefaultMethodHandler.java:1238)
	at com.supermap.services.rest.DefaultMethodHandler.handlePost(DefaultMethodHandler.java:293)
	at com.supermap.services.rest.resources.ResourceBase.handlePost(ResourceBase.java:978)
	at com.supermap.services.rest.resources.ResourceBase.handle(ResourceBase.java:1379)
	at org.restlet.resource.Finder.handle(Finder.java:246)
	at org.restlet.routing.Filter.doHandle(Filter.java:159)
	at org.restlet.routing.Filter.handle(Filter.java:206)
	at org.restlet.routing.Router.doHandle(Router.java:431)
	at org.restlet.routing.Router.handle(Router.java:648)
	at org.restlet.routing.Filter.doHandle(Filter.java:159)
	at org.restlet.routing.Filter.handle(Filter.java:206)
	at org.restlet.routing.Filter.doHandle(Filter.java:159)
	at org.restlet.routing.Filter.handle(Filter.java:206)
	at org.restlet.routing.Filter.doHandle(Filter.java:159)
	at org.restlet.routing.Filter.handle(Filter.java:206)
	at org.restlet.routing.Filter.doHandle(Filter.java:159)
	at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)
	at org.restlet.routing.Filter.handle(Filter.java:206)
	at org.restlet.routing.Filter.doHandle(Filter.java:159)
	at org.restlet.routing.Filter.handle(Filter.java:206)
	at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
	at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
	at org.restlet.Application.handle(Application.java:381)
	at org.restlet.ext.servlet.ServletAdapter.service(ServletAdapter.java:206)
	at com.supermap.services.rest.servlets.ManagementServlet.service(ManagementServlet.java:198)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at com.supermap.server.host.webapp.handlers.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:63)
	at com.supermap.server.host.webapp.handlers.ManagerServiceHandler.handle(ManagerServiceHandler.java:176)
	at com.supermap.server.host.webapp.handlers.AbstractHandler.process(AbstractHandler.java:190)
	at com.supermap.server.host.webapp.handlers.AbstractHandler.a(AbstractHandler.java:216)
	at com.supermap.server.host.webapp.handlers.AbstractHandler.invokeLowerPriorityHandlers(AbstractHandler.java:205)
	at com.supermap.server.host.webapp.handlers.AbstractHandler.process(AbstractHandler.java:192)
	at com.supermap.server.host.webapp.handlers.BasicHandler.process(BasicHandler.java:423)
	at com.supermap.server.host.webapp.ApplicationFilter.doFilter(ApplicationFilter.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)


解决方案

查看SuperMap的iserver的Q&A,有相关的解决方案如下:

  1. 为什么在 Linux 系统上启动 iServer 服务时,报以下类似错误:“Exception in thread "main" java.lang.UnsatisfiedLinkError: 【libWrapj600.so】: home\SuperMapiServer\support\jre\lib\amd64\headless\libmawt.so: symbol awt_FreeDrawingSurface, version SUNWprivate_1.1 not defined in file libmawt.so with link time reference ”?

    答:如果使用 32 位的 iServer,请用$SuperMap iObjects Java_HOME\bin 目录下的 libmawt.so 文件替换 $JRE_HOME\lib\i386\headless 目录中的 libmawt.so 文件;

    如果使用 64 位的 iServer,请用 $SuperMap iObjects Java_HOME\bin 目录下的 libmawt.so 文件替换 $JRE_HOME\lib\amd64\headless 目录中的  libmawt.so 文件。


安装上述方式执行,问题解决,服务顺利发布!
Ubuntu14.04 Server安装iServer_第2张图片


你可能感兴趣的:(Ubuntu14.04 Server安装iServer)