Skip to content

Quick and dirty install of GeoMoose from source on FreeBSD 10.1

Jim Klassen edited this page Feb 23, 2016 · 1 revision

Edit to suit your local environment. YMMV.

Pull in the packages we need.

# GeoMoose Runtime Deps
pkg install \
	apache24 mod_php56
mapserver proj gdal \
php56-mbstring php56-gd php56-curl php56-sqlite3 php56-dom
#    php5-mapscript may need to build this from ports, also no wms,wfs server

# GeoMoose Build Deps
pkg install \
    git \
    openjdk8-jre \
bash

# Install Build Deps for docs (big)
pkg install \
    py27-sphinx texlive-full \
    naturaldocs

Configure Apache 2.4 and PHP 5.6

echo "apache24_enable=YES" >> /etc/rc.conf cat > /usr/local/apache24/modules.d/080_mod_php.conf <<EOF <FilesMatch ".php$"> SetHandler application/x-httpd-php <FilesMatch ".phps$"> SetHandler application/x-httpd-php-source EOF apachectl restart

JRE needs /proc and /dev/fd, proc was there already

cat >> /etc/fstab <<EOF fdesc /dev/fd fdescfs rw 0 0 EOF

Instructions assume bash

bash

Get the GeoMoose source.

git clone --recursive https://github.com/geomoose/geomoose.git /usr/local/www/geomoose

Setup some symbolic links.

cd /usr/local/www/geomoose/js
ln -s ../services/php .
ln -s geomoose.html index.html

Build the JavaScript code.

# Needed for GeoMoose build (make sure this isn't overwriting something important!)
ln -s /usr/local/bin/bash /bin/bash
# Needed for OpenLayers build
ln -s /usr/local/bin/python2.7 /usr/local/bin/python

cd /usr/local/www/geomoose/js/libs
./build_js.sh

# Cleanup (Make sure this isn't removing something important!)
rm -i /bin/bash
rm -i /usr/local/bin/python

Setup local config files.

cat > /usr/local/www/geomoose/conf/local_settings.ini <<EOF
[paths]
root=/usr/local/www/geomoose/maps/
mapserver_url=/cgi-bin/mapserv
temp=/tmp/
EOF

cat > /usr/local/www/geomoose/maps/temp_directory.map <<EOF
# This file is used to configure temporary directories for Mapserver Mapfile
IMAGEPATH "/tmp/"
EOF

Build the Docs.

cd /usr/local/www/geomoose/docs
make html

Build the API Reference Docs.

cd /usr/local/www/geomoose/js
mkdir -p ../docs/build/html/apidocs
NaturalDocs -i geomoose -o html ../docs/build/html/apidocs -p ntdocs

Make things available in the apache document root.

ln -s /usr/local/www/geomoose/js /usr/local/www/apache24/data/geomoose
ln -s /usr/local/www/geomoose/docs/build/html /usr/local/www/apache24/data/geomoose-docs
cp /usr/local/bin/mapserv /usr/local/www/apache24/cgi-bin/mapserv

Restart apache.

apachectl restart

alias module cgid module

<IfModule !mpm_prefork_module> #LoadModule cgid_module libexec/apache24/mod_cgid.so #LoadModule cgi_module libexec/apache24/mod_cgi.so

Clone this wiki locally