40-1 インストール
今まで WFS-T(Web Feature Service - Transactions)を実行するのに GeoServer を使用しましたが、TinyOWS は軽量で、 WFS-Tを素速く実行できます。
TinyOWS(http://mapserver.org/trunk/tinyows/index.html)を参考に試してみます。
40-1-1 必要なもの
「Requires(TinyOWS Installation
http://mapserver.org/trunk/tinyows/serverinstallation.html)」にある次のものは Debian wheezy でサポートされています。
Synaptic パッケージマネージャでインストールを 確認してください。
LibXML2 (2.8 version or later)
PostGIS (1.5.x version or later)
PostgreSQL (with libpq headers)
cgi-bin をサポートする Web サーバ
Fast-CGI(推奨)私は使用しませんでした。
40-1-2 インストール
「Installing from a stable source release」に従って、tinyows をインストールしましたが、バイナリファイルが作成されませんでした。
その過程で追加インストールするパッケージがありました。一番下に示しておきます。
「“tinyows” 1.1.0-4 source package in Debian “unstable”(https://launchpad.net/debian/sid/+source/tinyows/1.1.0-4)」にある「tinyows_1.1.0.orig.tar.gz 」を使用してインストールします。
user@debian7-vmw:~/ダウンロード$ ls
---
tinyows_1.1.0.orig.tar.gz
---
user@debian7-vmw:~/ダウンロード$ tar xvzf tinyows_1.1.0.orig.tar.gz
user@debian7-vmw:~/ダウンロード$ cd tinyows-1.1.0/
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for X... no
checking for $CC... no
checking for -c... no
checking for $CFLAGS... no
checking for $CPPFLAGS... no
checking for conftest.$ac_ext... no
checking for >&5... no
checking for xml2-config... /usr/bin/xml2-config
checking for libxml2 version... 2.8.0
checking for git... yes
checking for pg_config... /usr/bin/pg_config
checking for PostgreSQL version... PostgreSQL 9.1.12
checking for shp2pgsql... /usr/bin/shp2pgsql
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for FCGI_Accept in -lfcgi... no
checking now FCGI in alternate fastcgi include dir
checking for FCGI_Accept in -lfcgi... (cached) no
configure: WARNING: \n\nNo FastCGI support. Performances will be strongly reduced !\n
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/ows_define.h
config.status: creating demo/tinyows.xml
config.status: creating demo/install.sh
config.status: creating test/wfs_100/config_wfs_100.xml
config.status: creating test/wfs_110/config_wfs_110.xml
config.status: creating test/wfs_100/install_wfs_100.sh
config.status: creating test/wfs_110/install_wfs_110.sh
------------------------
NOTA: This TinyOWS version will need at least PostGIS 1.5.x
------------------------
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ make
gcc -o tinyows src/fe/fe_comparison_ops.c src/fe/fe_error.c src/fe/fe_filter.c src/fe/fe_filter_capabilities.c src/fe/fe_function.c src/fe/fe_logical_ops.c src/fe/fe_spatial_ops.c src/mapfile/mapfile.c src/ows/ows_bbox.c src/ows/ows.c src/ows/ows_config.c src/ows/ows_error.c src/ows/ows_geobbox.c src/ows/ows_get_capabilities.c src/ows/ows_layer.c src/ows/ows_metadata.c src/ows/ows_psql.c src/ows/ows_request.c src/ows/ows_srs.c src/ows/ows_storage.c src/ows/ows_version.c src/struct/alist.c src/struct/array.c src/struct/buffer.c src/struct/cgi_request.c src/struct/list.c src/struct/mlist.c src/struct/regexp.c src/wfs/wfs_describe.c src/wfs/wfs_error.c src/wfs/wfs_get_capabilities.c src/wfs/wfs_get_feature.c src/wfs/wfs_request.c src/wfs/wfs_transaction.c src/ows/ows_libxml.c -I/usr/include/libxml2 -L/usr/lib -lxml2 -g -O2 -std=c99 -pedantic -Wall -I/usr/include/postgresql -L/usr/lib -lpq -I/usr/include/fastcgi -lfl
src/struct/cgi_request.c: In function ‘cgi_getback_query’:
src/struct/cgi_request.c:72:10: warning: variable ‘s’ set but not used [-Wunused-but-set-variable]
src/wfs/wfs_transaction.c: In function ‘wfs_insert_xml’:
src/wfs/wfs_transaction.c:319:42: warning: variable ‘layer_ns_prefix’ set but not used [-Wunused-but-set-variable]
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ su
パスワード:
root@debian7-vmw:/home/user/ダウンロード/tinyows-1.1.0# make install
-----
TinyOWS Schema install dir in /usr/local/share/tinyows/schema
mkdir -p /usr/local/share/tinyows
rm -rf /usr/local/share/tinyows/schema
cp -rf schema /usr/local/share/tinyows/
-----
Now:
1) copy 'tinyows' binary to cgi-bin directory
2) - put a workable tinyows.xml file in /etc dir
- OR launch 'make install-demo' as a superuser
root@debian7-vmw:/home/user/ダウンロード/tinyows-1.1.0# ls
LICENSE Makefile.vc VERSION demo nmake.opt test
Makefile NEWS configure doc schema tinyows
Makefile.in README configure.in ms4w src
root@debian7-vmw:/home/user/ダウンロード/tinyows-1.1.0# make install-demo
次に、tinyows バイナリを cgi-bin にコピーします。
root@debian7-vmw:/home/user/ダウンロード/tinyows-1.1.0# cp tinyows /usr/lib/cgi-bin/
参考:
user@debian7-vmw:~$ cd ダウンロード
user@debian7-vmw:~/ダウンロード$ wget http://download.osgeo.org/mapserver/tinyows-1.1.0.tar.bz2
--2014-03-14 20:46:11-- http://download.osgeo.org/mapserver/tinyows-1.1.0.tar.bz2
download.osgeo.org (download.osgeo.org) をDNSに問いあわせています... 140.211.15.132
download.osgeo.org (download.osgeo.org)|140.211.15.132|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 1182951 (1.1M) [application/x-bzip2]
`tinyows-1.1.0.tar.bz2' に保存中
100%[======================================>] 1,182,951 366K/s 時間 3.2s
2014-03-14 20:46:20 (366 KB/s) - `tinyows-1.1.0.tar.bz2' へ保存完了 [1182951/1182951]
user@debian7-vmw:~/ダウンロード$ ls
---
tinyows-1.1.0.tar.bz2
---
user@debian7-vmw:~/ダウンロード$ tar xvjf tinyows-1.1.0.tar.bz2
user@debian7-vmw:~/ダウンロード$ cd tinyows-1.1.0/
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for X... no
checking for $CC... no
checking for -c... no
checking for $CFLAGS... no
checking for $CPPFLAGS... no
checking for conftest.$ac_ext... no
checking for >&5... no
checking for xml2-config... no
configure: error: couldn't find xml2-config, try using --with-xml2-config=PATH
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ make
make: *** ターゲットが指定されておらず, makefile も見つかりません. 中止.
"Debian xml2-config" で検索すると 「libxml2-dev」のパッケージに含まれているようです。
Synaptic パッケージマネージャで「libxml2-dev」をインストールします。
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for X... no
checking for $CC... no
checking for -c... no
checking for $CFLAGS... no
checking for $CPPFLAGS... no
checking for conftest.$ac_ext... no
checking for >&5... no
checking for xml2-config... /usr/bin/xml2-config
checking for libxml2 version... 2.8.0
checking for git... yes
checking for pg_config... /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
checking for PostgreSQL version...
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
./configure: line 3095: test: : integer expression expected
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
checking for shp2pgsql... /usr/bin/shp2pgsql
checking for flex... no
checking for lex... no
configure: error: "TinyOWS: Need flex to compile"
Synaptic パッケージマネージャで「postgresql-server-dev-9.1」をインストールします。(依存関係のあるパッケージもインストールします。)
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for X... no
checking for $CC... no
checking for -c... no
checking for $CFLAGS... no
checking for $CPPFLAGS... no
checking for conftest.$ac_ext... no
checking for >&5... no
checking for xml2-config... /usr/bin/xml2-config
checking for libxml2 version... 2.8.0
checking for git... yes
checking for pg_config... /usr/bin/pg_config
checking for PostgreSQL version... PostgreSQL 9.1.12
checking for shp2pgsql... /usr/bin/shp2pgsql
checking for flex... no
checking for lex... no
configure: error: "TinyOWS: Need flex to compile"
Synaptic パッケージマネージャで「flex」をインストールします。
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for X... no
checking for $CC... no
checking for -c... no
checking for $CFLAGS... no
checking for $CPPFLAGS... no
checking for conftest.$ac_ext... no
checking for >&5... no
checking for xml2-config... /usr/bin/xml2-config
checking for libxml2 version... 2.8.0
checking for git... yes
checking for pg_config... /usr/bin/pg_config
checking for PostgreSQL version... PostgreSQL 9.1.12
checking for shp2pgsql... /usr/bin/shp2pgsql
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for FCGI_Accept in -lfcgi... no
checking now FCGI in alternate fastcgi include dir
checking for FCGI_Accept in -lfcgi... (cached) no
configure: WARNING: \n\nNo FastCGI support. Performances will be strongly reduced !\n
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/ows_define.h
config.status: creating demo/tinyows.xml
config.status: creating demo/install.sh
config.status: creating test/wfs_100/config_wfs_100.xml
config.status: creating test/wfs_110/config_wfs_110.xml
config.status: creating test/wfs_100/install_wfs_100.sh
config.status: creating test/wfs_110/install_wfs_110.sh
------------------------
NOTA: This TinyOWS version will need at least PostGIS 1.5.x
------------------------
user@debian7-vmw:~/ダウンロード/tinyows-1.1.0$ su
パスワード:
root@debian7-vmw:/home/user/ダウンロード/tinyows-1.1.0# make install
-----
TinyOWS Schema install dir in /usr/local/share/tinyows/schema
mkdir -p /usr/local/share/tinyows
rm -rf /usr/local/share/tinyows/schema
cp -rf schema /usr/local/share/tinyows/
-----
Now:
1) copy 'tinyows' binary to cgi-bin directory
2) - put a workable tinyows.xml file in /etc dir
- OR launch 'make install-demo' as a superuser
root@debian7-vmw:/home/user/ダウンロード/tinyows-1.1.0# make install-demo
0 件のコメント:
コメントを投稿