日期:2014-05-16  浏览次数:20404 次

本地虚拟机的相关部署(jdk tomcat 等)
安装linux64遇到的问题

1. 查看linux的版本是否为64位:

   getconf  LONG_BIT


2. 拷贝jdk linux 64 到 /usr/local/ 里面

   chmod +x jdk-6u31-linux-x64.bin
   ./jdk-6u31-linux-x64.bin
   jdk 已经被安装到:/usr/local/jdk1.6.0_31/bin ,,,,,,


3.  修改环境变量: vi /etc/profile

JAVA_HOME=/usr/local/jdk1.6.0_31/
JRE_HOME=/usr/local/jdk1.6.0_31/jre
CLASSPATH=/usr/local/jdk1.6.0_31/lib/dt.jar:/usr/local/jdk1.6.0_31/lib/tools.jar
PATH=/usr/local/jdk1.6.0_31/bin:$PATH
export PATH JAVA_HOME JRE_HOME CLASSPATH 

4.  拷贝一个tomcat上去 写个index.html 测试一下
    修改setenv.sh  server.xml   8882

    chmod +x *.sh
    http://192.168.111.128:8882/demo/index.html

5. 拷贝 data  index 的基础数据 到虚拟机 共 8.8g 数据

6. 拷贝licence

7. 修改licence 里面的路径

8. 上传tomcat_route route程序

http://192.168.111.128:8882/route/getDriveByLatLon.jsp?orig=HESJIWXVVHERV&dest=HERSWEXVVHDSU&width=600&height=400&style=2

http://192.168.111.128:8882/route/getDriveByLatLon.jsp?orig=120.14913,30.24923&dest=120.30033,30.37917&width=600&height=400&style=2&customer=2

因本地启动后访问太卡 调整tomcat的内存

访问不了: 防火墙的问题  service iptables stop
乱码问题:
==============================================
linux中文: /etc/sysconfig/i18n

LANG="zh_CN.GB18030"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"



catalina.sh:

CATALINA_OPTS="$CATALINA_OPTS -verbose:gc -Xloggc:/mapbar/logs/web_gc.vgc  -Xms3000M -Xmx3000M -DLOCALE=UTF-16LE -XX:+UseConcMarkSweepGC -DROUTE_PATH=/data/route_mapx/ -DMAP_DATA_PATH=/data/navinfo2010win/
-DRAMDISK=/ -DCTMR=6F6A5L5M6YSM2J6F192Z1Y368M6BNM5B -DCTMRD=272Z4R5W3O3E3266395K5L6X476F4CVM  -DRAM_DISK=false"

startup.sh , run.sh: 需要增加:
export LANG="zh_CN.GB18030"

=======================================


9. 安装apache  详细参见apache.txt


10. 测试search 接口 tomcat server.xml search程序:licence目录  data,index 目录
    run.sh startup.sh 中文
http://192.168.111.128:8803/search/getPoiByKeyword.jsp?keyword=天坛&city=北京市


11. 测试bus 接口: tomcat server.xml search程序:licence目录  data,index 目录
    run.sh startup.sh 中文
 
http://192.168.111.128:8884/bus/getBusBigCity.jsp?city=%B1%B1%BE%A9%C%D0&orig=HEJTWEXVVGWIJ&dest=HETACTWVVIHAJ&width=680&height=450&all=1

http://192.168.111.128:8884/bus/getRouteNamesByKeyword.jsp?keyword=1&city=%B1%B1%BE%A9%CA%D0


http://192.168.111.128:8884/bus/getRouteByRouteName.jsp?keyword=地铁1号线上行(苹果园-四惠东)&city=%B1%B1%BE%A9%CA%D0&width=900&height=530


12.  测试decode的经纬度接口   8885

CTMR= 偏移
CTMRD= 偏正
WGSK= 84转02
WGSD= 02转84

IP=192.168.111.128 CTMR=2O5Z6W2K1S3N643V551A6C3Y3O444R14 CTMRD=6E621U3FZMFM1T1J414O6Q3A4E6I5L60

IP=192.168.111.128 WGSK=224Q244M205K1G5R5E1M562K1Z4B5A5W WGSD=1Q26696B1E384FTM4T1C53581K5A4ICM

客户使用这个:
http://192.168.111.128:8885/decode/getLatLon.jsp?latlon=116.35873,39.94442;116.35873,39.94442;116.35873,39.94442;116.35873,39.94442;116.35873,39.94442;116.35873,39.94442;116.35873,39.94442&customer=2

如果key没有生效:
vi /etc/hosts
修改ip127.0.0.1  ::1 注释   为使用的ip
查看hostname  是否一致

最后记得重启tomcat

测试经纬度:
84 真实  116.35873,39.94442

http://geocode.mapbar.com/Decode/encode_xml.jsp?lonlat=116.35873,39.94442

02 真实:  116.36493,39.94578  HERIITXVVICUW

02 偏移: 116.36033 39.94642


13. 测试叠加层接口