Skip to content

Quick and dirty install of GeoMoose from source on Fedora 21

Jim Klassen edited this page Feb 23, 2015 · 2 revisions

Note the title. This is the quick and dirty approach that worked for me. There are probably better ways to do some of this (especially w.r.t. setting up SELinux and making mapserv accessible as /cgi-bin/mapserv). Edit to suit your local environment. YMMV.

Pull in the packages we need.

yum -y install httpd mapserver
yum -y install php php-mbstring php-mapserver php-sqlite3
yum -y install gdal
yum -y install proj proj-epsg proj-nad
yum -y install git-all
yum -y install python-sphinx make texlive texlive-latex-extras

Get the GeoMoose source.

git clone --recursive https://github.com/geomoose/geomoose.git /srv/geomoose

Setup SELinux labels so apache can access our files. (This could be tighter, but I didn't care to mess with it.)

semanage fcontext -a -t httpd_sys_content_t "/srv/geomoose(/.*)?"
restorecon -R -v /srv/geomoose

Setup some symbolic links.

cd /srv/geomoose/js
ln -s ../services/php .
ln -s geomoose.html index.html

Build the JavaScript code.

cd /srv/geomoose/js/libs
./build_js.sh

Setup local config files.

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

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

Build the Docs.

cd /srv/geomoose/docs
make html

Make things available in the apache document root.

cp /usr/libexec/mapserver /var/www/cgi-bin/mapserv
ln -s /srv/geomoose/js /var/www/html/geomoose
ln -s /srv/geomoose/docs/build/html /var/www/html/geomoose-docs

Restart apache.

apachectl restart
Clone this wiki locally