debian 安装mapserver

debian 安装mapserver

1.apt-get install apache2
2.apt-get install cgi-mapserver mapserver-bin perl-mapscript
3.查看并测试是否安装成功
    1.cd /usr/lib/cgi-bin
    2.mapserv -v
    出现如下内容:
    MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

    表示mapserv安装成功。
4.配置apache


httpd.conf中添加配置如下内容:
<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin/"
    ScriptAlias /fcgi-bin/ "/usr/lib/cgi-bin/"

    ##
    ## Alias for MapServer tmp directory
    ##


</IfModule>

5.重启apache,并测试

    1.重启
    apachectl restart
    2.测试
    http://192.168.1.101/cgi-bin/mapserv
    出现如下内容:
    No query information to decode. QUERY_STRING is set, but empty.
    表示配置成功。
6.进一步测试
        1.wget http://www.duif.net/postgis/world.map
        2.测试得到此图层的capabilities
        
        http://192.168.1.101/cgi-bin/mapserv?map=/usr/lib/cgi-bin/world.map&request=getcapabilities&service=wms

7.安装的默认目录及下载目录:
/usr/share/doc/cgi-mapserver
/usr/share/lintian/overrides/cgi-mapserver
/var/cache/apt/archives/cgi-mapserver_5.6.5-2+squeeze2_amd64.deb
/var/lib/dpkg/info/cgi-mapserver.list
/var/lib/dpkg/info/cgi-mapserver.md5sums


        
        
参考网址:
http://trac.osgeo.org/mapserver/wiki/DebianLinux
http://www.duif.net/postgis/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值