LoginSignup
4
2

More than 5 years have passed since last update.

MacへMapserverをインストールする際のメモ

Posted at

mapserverがパッケージとして提供されているかを確認する。

$ brew search mapserver
mapserver 

インストールするmapserverのバージョンを念のため確認しておく。

$ brew info mapserver
mapserver: stable 6.2.2 (bottled)
Publish spatial data and interactive
mapping apps to the web
http://mapserver.org/
Not installed
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/mapserver.rb
==> Dependencies
Build: swig ✘
Required: freetype ✘, libpng ✘, giflib ✘, gd ✘, proj ✘, gdal ✘
Optional: geos ✔, cairo ✘
==> Options
--with-cairo
    Build with cairo support
--with-fastcgi
    Build with fastcgi support
--with-geos
    Build support for GEOS spatial operations
--with-php
    Build PHP MapScript module
--with-postgresql
    Build support for PostgreSQL as a data source
==> Caveats
The Mapserver CGI executable is /usr/local/Cellar/mapserver/6.2.2/bin/mapserv

If you built the PHP option:
* Add the following line to php.ini:
extension="/usr/local/Cellar/mapserver/6.2.2/php_mapscript.so"
* Execute "php -m"
* You should see MapScript in the module list

ここで、気に留めておいたほうがよさそうな情報として、
- 依存関係(Dependencies)で必要なモジュールがインストールされていないので、各種(freetypeとか)インストールされること。
- PHP Mapscriptをビルドしたときは、php.iniに拡張モジュールの設定追加をしておく必要があるということ。

If you built the PHP option:
* Add the following line to php.ini:
  extension="/usr/local/Cellar/mapserver/6.2.2/php_mapscript.so"
* Execute "php -m"
* You should see MapScript in the module list

mapseverのインストール

$ brew install mapserver --with-cairo --with-fastcgi --with-geos --with-php --with-postgresql

今回のインストールでは、すべてのオプションを適用した。

なお、このインストール時に以下のようなエラーが発生した場合は、ここを参考にしてほしい。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2