AIX 5.3环境下搭建ArcIMS92+Apache2.0.63+Tomcat5.5.25全工略

12 篇文章 0 订阅
9 篇文章 0 订阅
 
AIX 5.3 环境下搭建ArcIMS92+Apache2.0.63+Tomcat5.5.25全工略
前言
在Windows下配置ArcIMS91、92都非常简单,一般从网上下载Apache2.0.*、Tomcat5.5.25、JDK1.5就可以非常顺利的安装成功,不会遇到什么问题。
但是在AIX环境下,因为初次使用该操作系统,虽然熟悉些Linux命令,但是毕竟这两种环境还是存在很多的不同。
因为项目需要,不得不在AIX环境下安装ArcIMS92,在全部安装成功前,走了很多的弯路,也解决了很多的问题,在此做一下总结,希望对各位能有所帮助。
 
JDK1.5 的安装
在AIX环境下已经安装了,一般目录为 /usr/java5,在此不多涉及,一般通过网上的方法就能安装成功。
在Linux下,可以参考以下方式:
# chmod u+x ./j2sdk-1_4_2_04-linux-i586.bin
# ./j2sdk-1_4_2_04-linux-i586.bin
在按提示输入 yes 后, jdk 被解压到 ./j2sdk1.5.2_04 目录下。为与下面 2 JDK 安装路径一致,我们进行下列操作 , /usr/java5 下建立安装路径,并将文件考到该路径下:
# mkdir /usr/java5
# cp -fr ./j2sdk1.4.2_04 /usr/java5
修改所有用户的环境变量
# vi /etc/profile
在该文件最后加入 :
export JAVA_HOME=/usr/java5
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin
一定要在 CLASSPATH 路径中加入 $CLASSPATH:
 
Tomcat5.5.25 的安装
#gzip –d apache-tomcat-5.5.25.tar.gz
#tar –xvf apache-tomcat-5.5.25.tar
#mv apache-tomcat-5.5.25 tomcat55
设置路径:
#vi /etc/profile
在该文件的最后加入:
export TOMCAT_HOME=/usr/ tomcat5
退出后执行
#./etc/profile
或者退出重新登录使环境变量生效
修改 Tomcat 管理员密码
然后在 $TOMCAT_HOME/conf/tomcat-users.xml 修改成如下形式:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>
这样在启动 Tomcat 是,就可以在首页的 Tomcat Manager 中用 admin/admin 登录,查看各发布程序的状态了。
到此为止,如果在 Linux 下, Tomcat 的安装就算大功告成了,但是在 AIX5.3 下却不是这样,错误出在 Tomcat 不能解析 Servlet ,最简单的就是自身带的 Servlets-examples 不能运行。需要将几个包考到 Tomcat/common/lib 下。
进入 Tomcat webapps/jsp-examples/WEB-INF/classes ,将下列文件打包:
#jar cvf compressionFilters.jar compressionFilters
#jar cvf filters.jar filters
然后将这两个 jar 拷贝到 Tomcat/common/lib
再重启 tomcat 就可以了。
另外,还可以在这里修改 tomcat 的虚拟内存:
$TOMCAT_HOME/bin/catalina.sh 的前面,增加如下设置:
   JAVA_OPTS='-Xms 【初始化内存大小】 -Xmx 【可以使用的最大内存】 '
  需要把这个两个参数值调大。例如:
   JAVA_OPTS='-Xms256m -Xmx512m'
  表示初始化内存为 256MB ,可以使用的最大内存为 512MB
Apache2.0.63 的安装
Apache 的安装不算麻烦,一般装完就能用,但是最为复杂的是与 tomcat jk 安装,从网上找了很多很多的资料,但是基本没有找到能配置成功的。最后,又看了 apache 的介绍文档,终于找到了解决办法:
AIX 下一般没有 Linux 的编译工具,需要自己安装:
gcc g++ for aix5.3 install guide
1 bos.adt fileset is required
 check:   lslpp -l| grep bos.adt
 if there is nothing output, install bos.adt( it's in first install cd, installp/ppc/bos.adt ),use command "smit install_latest" to install.
2 download and install rpms from http://www-03.ibm.com/servers/aix/products/aixos/linux/download.html
 install rpm, you jutst need type: rpm -ivh *.rpm (the rpms you want install)
 you may reuire these:
autoconf213-2.13-1.aix5.1.noarch.rpm
autoconf-2.59-1.aix5.1.noarch.rpm
automake-1.8.5-1.aix5.1.noarch.rpm
gcc-4.0.0-1.aix5.3.ppc.rpm
gcc-cplusplus-4.0.0-1.aix5.3.ppc.rpm
gdb-6.0-1.aix5.1.ppc.rpm
indent-2.2.7-2.aix4.3.ppc.rpm
libgcc-4.0.0-1.aix5.3.ppc.rpm
libstdcplusplus-4.0.0-1.aix5.3.ppc.rpm
libstdcplusplus-devel-4.0.0-1.aix5.3.ppc.rpm
libtool-1.5.8-2.aix5.1.ppc.rpm
m4-1.4.1-1.aix5.1.ppc.rpm
make-3.80-1.aix5.1.ppc.rpm
vim-common-6.3-1.aix5.1.ppc.rpm
vim-enhanced-6.3-1.aix5.1.ppc.rpm
vim-minimal-6.3-1.aix5.1.ppc.rpm
Apache 的安装:
#gzip –d httpd-2.0.63.tar.gz
#tar -zxvf httpd-2.0.63.tar
#mv httpd-2.0.59 apache
#cd apache
# 配置 (prefix 是安装路径 ,enable-mods-shared=all 表示编译配置所有 so 文件 )
#./configure --prefix=/usr/local/apache --enable-mods-shared=all
(/usr/local/apache 为安装目录 )
#make
#make install
配置 httpd.conf
vi /usr/local/apache/conf/httpd.conf
ServerName 配置为 127.0.0.1,服务器IP 或域名
DirectoryIndex 中添加 index.htm index.jsp default.htm default.html
Group nobody 必须要改,否则 apache 不能启动
#cd /usr/local/apache/bin
#./apachectl start
Mod_jk 的安装:
A. 在此下载编译好的 mod_jk.so(AIX)
B. If the connector file has a different name than 'mod_jk.so', then rename it to 'mod_jk.so'. For example, if the connector file is named 'mod_jk-1.x.xx-apache-2.x.xx-solaris-sparc.so'. To rename it, type the following command:
#mv mod_jk-1.x.xx-apache-2.x.xx-solaris-sparc.so mod_jk.so
C. Copy the mod-jk.so file to the $APACHE_HOME/modules directory and grant it executable permissions.
#cp mod_jk.so $APACHE_HOME/modules
#cd $APACHE_HOME/modules
#chmod 755 mod_jk.so
D. workers.properties file
# Define 1 real worker using ajp13
worker.list=worker1
#
# ESRI IMS 9.2 Properties
#
worker.tomcat_home=/usr/tomcat55
worker.java_home=/usr/java5
worker.ajp13.host=localhost
#
# Set properties for worker1 (ajp13)
#
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.reclycle_timeout=300
E. 修改上面的: worker.tomcat_home worker.java_home
F. Copy the workers.properties file to the $APACHE_HOME/conf directory.
#cp workers.properties $APACHE_HOME/conf
G. Navigate to $APACHE_HOME/conf and open httpd.conf with a text editor. Add the following lines to the bottom of the httpd.conf file and save.
Set JkWorkersFile to the location of the workers.properties file. In our example, it would be:
JkWorkersFile /usr/local/apache/conf/workers.properties

Set JkLogFile to the the location of the mod_jk.log file. For example:
JkLogFile /usr/local/apache2058/logs/mod_jk.log

Set JkLogLevel, for example:
JkLogLevel info

The following lines will add the mapping for servlets-examples to test the communication between Apache and Tomcat:
JkMount /servlets-examples worker1
JKMount /servlets-examples/* worker1
d. While editing httpd.conf file, include these lines at the bottom of the file for the ArcIMS web applications:
JkMount /servlet worker1
JKMount /servlet/* worker1
JKMount /esriadmin worker1
JKMount /esriadmin/* worker1
JKMount /metadataexplorer worker1
JKMount /metadataexplorer/* worker1
JKMount /wmsconnector worker1
JKMount /wmsconnector/* worker1
JKMount /wfsconnector worker1
JKMount /wfsconnector/* worker1
JKMount /aimscsw worker1
JKMount /aimscsw/* worker1
JKMount /aimsharvester worker1
JKMount /aimsharvester/* worker1
JKMount /jspsamples worker1
JKMount /jspsamples/* worker1
JKMount /jspviewer worker1
JKMount /jspviewer/* worker1
H. Please follow the instructions below to enable Apache Web Server to communicate with Tomcat.
a. Edit the $APACHE_HOME/conf/httpd.conf file.
b. Find the last LoadModule statement and add the following line:
LoadModule jk_module modules/mod_jk.so
c. Start Tomcat and the Apache Web Server as follows:
$CATALINA_HOME/bin/startup.sh
$APACHE_HOME/bin/apachectl start
I. Verify that the Apache Web Server and Tomcat are communicating. Open a Web browser and navigate to the following URL:
http://<server_name>/servlets-examples/servlet/HelloWorldExample
If a response containing "Hello World" is returned, Apache and tomcat are communicating as expected.
ArcIMS92 的安装
新建 arcims 用户,用来安装 ArcIMS92
建立安装目录:
# cd /opt                                                -- 创建安装目标目录
# mkdir arcims
# chown arcims arcims/                                  -- 改变目录的所有者,使创建的用户具有该目录完全
安装 ArcIMS92
(因为地图中的图层信息含有中文,所以需要对 AIX 安装中文环境,并对 java 添加中文字体,如宋体)
1)         用新建立的用户 arcims 进入图形界面;
2)         进入 ArcIMS 的安装文件夹,运行 $./SetupArcIMS
3)         根据选项选择,一步一步安装,比较简单,一般都能成功;
4)         安装 PostInstall ,需要注意, 选择 'I will manually configure my Web server / servlet engine' 手动配置 webserver servlet engine.
(如果需要重新进行 Post Install, 可以执行 ./usr/arcims/tools/SetupArcIMS_PostInstall 脚本文件  $ ./SetupArcIMS_PostInstall
5)         验证系统变量配置
ArcIMS  配置中将 $JAVA_HOME 指向了 ArcIMS 自带的 jre 安装目录 , 此时应该手工修改过来 .
    
编辑 .profile  将下面两行注释或删除
      #JAVA_HOME=/opt/arcgis/arcims/jre
      #export JAVA_HOME
     重新加载系统变量
    $ . /.bash_profile
6)         部署 ArcIMS servlet 连接器
a)         运行下面命令:
$ cd /opt/arcgis/arcims/Middleware/servlet_connector/
$ cp arcimsservletconnector.war servlet.war
$ mkdir build
$ cd build/
$ jar -xvf ../servlet.war       #
解包
$ cd WEB-INF/classes
$ vi Esrimap_prop
b)         修改 Esrimap_prop 文件
appServerMachine=mymachine 修改为 appServerMachine={serverhost-name} 
{serverhost-name}
为实际的服务器名 .
c)         回到命令行 , 执行以下命令
[arcims@yxgt-ims classes]$ cd ..
  [arcims@yxgt-ims WEB-INF]$ cd ..
  [arcims@yxgt-ims build]$ jar cvf servlet.war *            #
重新打包,解压后 war 文件好像删除了,此处出错
$ mv servlet.war /usr/tomcat55/webapps/servlet.war        # 部署到 Tomcat
d)         重启 Tomcat
./shutdown.sh
./startup.sh
7)         测试 ArcIMS 是否安装成功
root 下启动 apache tomcat
arcims 的身份登录到系统的图形界面,然后在命令窗口中输入:
一般需要先配置几个变量:
$export AIMSHOME=/usr/local/arcims/arcgis/arcims
$export JAVA_HOME=/usr/java5
$export LIBPATH=” 具体内容参考 /home/arcims/.profile 中的内容
进入 arcims 目录中:
为减少出错几率,可以重启服务:
$cd Xenv
$./aims_shutdown
$./aims_bootup
$./aimsappsrvr start
$cd ../Xenv
$./manage_arcims
选择 3 ,再选择 2 ,进入 administrator 管理界面
一般可以成功,输入用户名、密码,然后就可以新建服务了。
如果出现没有虚拟主机的问题,可以重新 PostInstall 一次,记得中间有个选择是否安装 ArcIMS administrator 管理的一个界面,这里一定要选 yes ,否则会出问题。
如果上面选择系统自动配置 Apache Tomcat ,我试了很多遍,都失败了,有错误。但是用 Apache+ServletExec 倒是可以成功。
另外,发布的地图文件,可以将 windows 下的地图文件和 axl 拷贝到 arcims AXL 下继续使用,需要注意的就是,要通过 ultraEdit 编辑一下 AXL ,选择 UNIX 输出,及 UTF8 编码。
通过以上一系列的配置,就可以成功启动地图服务程序了。
 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值