Menu
  Help
Google Search
 
www.sopac.org
WWW
SOPAC Secretariat > Projects > ISM
print PDF
MapServer Software Installation



Installing on Mandriva 2007

All the packages are now part of the distribution but you may want to install the following updated packages
Follow the instructions for Mandriva 2006 but use the updated packages:
mapserver-4.10.0-2mdv2007.0.i586.rpm
mapserver-php-4.10.0-2mdv2007.0.i586.rpm
gdal-1.4.0-0mdv2007.0.i586.rpm
libgdal1-1.4.0-0mdv2007.0.i586.rpm
This package is part of the distribution but may not be included in the CDs.
libcfitsio-2.490-2mdv2007.0.i586.rpm

Don't forget to Install also:
tikiwiki-1.9.2-1mdk.noarch.rpm
tikiwiki-mapdata-0.1-1mdk.noarch.rpm

And then follow the instructions in "Mapserver Install" in the next chapter.

If you are missing a package you can find them on the Sunet Archiveexternal link.

Installing on Mandriva 2006

The procedure has beopme more simplified since the availablility of all the packages in the contrib section of Mandriva 2006.

Here is the list of the packages you can find in contrib with a local copy if you want to download from here. The lastest version of tikiwiki for mandriva 2006 is here as the contrib contains only the version 1.9.1 of tikiwiki and should not be used due to security issues.

You need php, php-gd, mysql, php-mysql, libpq and apache installed and running on your system (from the standard Mandriva 2006 distribution)

gdal-1.3.2-5.1.20060mdk.i586.rpm New
libgdal1-1.3.2-5.1.20060mdk.i586.rpm New
libgeos2-2.1.4-1mdk.i586.rpm
libgeotiff1-1.2.2-6mdk.i586.rpm
libgrass5_0-1.0.0-2mdk.i586.rpm
libogdi-3.1.2-1mdk.i586.rpm
libproj0-4.4.9-1mdk.i586.rpm
mapserver-php-4.10.0-2mdk.i586.rpm New
mapserver-4.10.0-2mdk.i586.rpm New
tikiwiki-1.9.2-1mdk.noarch.rpm (not in mdv2006 contrib)
tikiwiki-mapdata-0.1-1mdk.noarch.rpm (not in mdv2006 contrib)

Mapserver Install


Download all the required packages in a directory and then as root type:
rpm -Uvh *.rpm

When done point your browser to:
http://127.0.0.1/tikiwiki-1.9.2/

You will be told to run the tikiwiki install script
http://127.0.0.1/tikiwiki-1.9.2/tiki-install.php

You need a mysql database called for instance tikidb with a user/password credential that has all permission over this database. You can use phpMyAdmin to create such database or run the following commands:
mysqladmin create tikidb
mysql -u root mysql
grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
on tikidb.* to tikiuser@localhost identified by 'tikipassword';

The user tikiuser with the password tikipassword has full access to the tikidb database.

Follow the instructions on the tiki-install form. You need to populate the database and then proceed to tikiwiki while removing the install script.

The default admin login is admin/admin, you will be prompted to change the password. When done, click on admin->admin home and selecte features. Enable the maps feature and then click on the maps icon which has just been enabled or go again in admin->admin home.
Enter the following:
default map: world.map
path to ogr2ogr: /usr/bin/ogr2ogr
path to gdaltindex: /usr/bin/gdaltindex

When done you can click on the left menu, the menu item maps and should appear a world map!

For additional documentation:

Adding kamap to the mapserver

The Kamapexternal link interface for the mapserver/tikiwiki is provided as a mod to tikiwiki. It is compatible with tikiwiki 1.9.x and 1.10.x.

To install the interface, go to admin -> admin mods select mods configuration and enter in the mods server repository http://mods.tikiwiki.org//, leave the other options as is. Save your changes and go back to the admin mods page. Rebuild the local list and you will see in the features section the kamap mod. Download it and install it.

The installation may fail, because you your webserver (apache) may not have the right permission to create directories and files under the tikiwiki directory on the server file system. Ensure that the user under which your server runs as the sufficient permissions.

When the kamap interface is installed, you need to enable at least one mapfile to be kamap aware. Edit one working mapfile and create the following example entry in the WEB/END section of your mapfile:

WEB
  ...
  METADATA
    KAMAP "mymap,1000000,500000"
    VERSION "1"
    ...
  END
END


This will create a kamap enabled map, named mymap with the available scales of 1,000,000 and 500,000. The Version number allows kamap to know when all the tiles need to be regenerated. Increase the version number each time you change the mapfile. The KAMAP keyword is specific to tikiwiki, it allows tikiwiki to know which mapfiles are kamap ready.

Usually layers are sorted by GROUP in kamap, so add the GROUP keyword in the LAYER section to group the layers into visible units.

For other options and more information of the kamap syntax inside a mapfile see the kamap reference page.external link

When you have a mapfile kamap enabled, point your browser to the tiki-kamap.php page like here on this site http://www.sopac.org/tiki/tiki-kamap.php

It is advised to configure your mapfiles using the standard interface and then to kamap enable them, as kamap will not provide any error message. Same if you have an error with kamap check that the mapfile is displayable using the old interface.

MySQL web based manager phpMyAdmin

You may want to install phpMyAdmin for easy database creation to be used by tikiwiki but this is not required.

phpMyAdmin-2.6.4-2mdk.noarch.rpm
php-bcmath-5.0.4-1mdk.i586.rpm
php-pear-Net_DIME-0.3-7mdk.noarch.rpm
php-pear-Net_POP3-1.3.6-6mdk.noarch.rpm
php-pear-OLE-0.5-6mdk.noarch.rpm
php-pear-SOAP-0.8.1-8mdk.noarch.rpm
php-pear-Spreadsheet_Excel_Writer-0.8-7mdk.noarch.rpm

If you need other packages, they are in the main distribution of Mandriva 2006.

Installing on Mandrake Linux 9.1 or 9.2

Installing the Linux 9.1 Operating System

About the Operating System

  • Mandrake Linux Ver 9.1
  • 6 Installation CDs

Preparation for Installing Linux 9.1

Use the SmartStart? CD or press F9 to access the RBSU option. The SmartStart? CD does not support an assisted installation for Linux however the RBSU option provided on the SmartStart? CD can be used instead to select the prefered OS. When using the RBSU option from the SmartStart? CD, a System reboot will be required and the system will present a BIOS similar type of menu to the RBSU menu.

  • The first item on the menu is the System Option which by default is highlighted.
  • Press Enter to select the default selection.
  • The next sub menu is the OS selection option which by default is also highlighted.
  • Again press Enter Key to select the default selection

A list of Operating Systems will be given, choose the Linux Operating System

  • Press Enter to accept the selection. A small window will popup at the bottom left hand corner of the screen displaying the OS selected. If it is the right one then
  • Press ESC twice to quit the RBSU menu
  • Finally press the F10 key to save the changes.


Installing Linux from the CD is easy when you are familiar with Linux however when installing more than one Server, the best option would be to use a floppy disk with the autoconfig.cfg files to automate the installation.

Installing from the Automated Install Floppy Disk

  • Insert the floppy into the floppy drive
  • Reboot the Server and let the system boot from the Floppy disk
  • Let the system extract the files from the floppy and wait until the system ask for the Mandrake Linux Install CD1(X86).
  • Insert the Install CD1 (x86) into the CD-ROM Drive and click Ok
  • Follow the instructions on the screen until successfully completing the installation.


The whole installation will only require 3 CDs; CD1(x86), CD2 (x86) and the International CD (X86), chances are that the system will ask for some other installations CDs when installing additional features but for this exercise only 3 are required.

If you are familiar with installation of Windows system then you need to be very carefull when installing Linux as it turns out to be somewhat different hardly any reboot for a start.

Configuring Linux


Installing Webmin

Check if Webmin has been installed
# service webmin status

If webmin has already been installed and up running;

  • the result should be webmin running otherwise
  • the webmin not installed

Need to install webmin if not installed:

# urpmi webmin

Follow the instructions on the screen
After completing the installation then run these commands:
# service webmin start
# chkconfig webmin on

To access the webmin: Run the Gnome web browser and type the URL below
https://localhost:10000/external link
If webmin been installed correctly you should be able to have access to a login window prompting for a user name and password

Network cards

The server comes with two preinstalled NIC so no need to install any network cards

Password ageing

If you want to remove password ageing add this file /etc/security/msec/level.local

from mseclib import *
password_aging(99999)



Installing Tiki 1.8

What is TikiWiki? Anyway?


Tiki CMS/Groupware (aka TikiWiki) is a powerful open-source (cache) Content Management System (cache) (CMS) and Groupware (cache) that can be used to create all sorts of Web applications, Sites, Portals, Intranets and Extranets. Tikiwiki also works great as a Web-based collaboration tool. Tikiwiki is a multi-purpose package with a lot of native options and sections that you can enable/disable as you need them. It is designed to be international, clean and extensible. Tikiwiki incorporates all the features present in several excellent wiki systems available today plus a lot of new features and options, allowing your wiki application to be whatever you want it to be from a simple wiki to a complex site for a whole user community with many intermediate steps. You can use Tikiwiki as a forums site, a chatroom, for poll taking, and much more! The possibilities are endless. You can see some Tiki sites in action.

TikiWiki’s? major features include: article, forum, newsletter, blog, file/image gallery, wiki, drawing, tracker, directory, poll/survey, quiz, FAQ, chat, banner, webmail, calendar, category, ACL, and more.

For more information visit the Tikiwiki site: TikiWiki?

How much Tiki 1.8 Costs?


Well the cool thing about this Tikiwiki tool is that you can download it for free from this site: http://SourceForge.net/external link. This link will automatically download Tiki-1.8 for you. Just specify where you want to save the rpm file.

The current version of Tiki 1.8 has been installed on the Fiji and Kiribati Mapservers and we will be employing the same version for other Pacific Islands Mapservers.

Packages to use for mdk9.2

  • gdal-1.1.9-3mdk.i586.rpm
  • libgdal0-1.1.9-3mdk.i586.rpm
  • mapserver-mapscript-4.0.1-1mdk.i586.rpm
  • tikiwiki-1.8-1mdk.noarch.rpm


These packages should be soon available for mandrake cooker

Here are the source packages:

  • gdal-1.1.9-3mdk.src.rpm
  • mapserver-4.0.1-1mdk.src.rpm
  • tikiwiki-1.8-1mdk.src.rpm



Install Tiki 1.8.rpm file on the Linux Server


After downloading Tiki-1.8, then

  • Start the installation by first logging into your Linux Server
  • Locate the Tiki 1.8 RC2-1.rpm file, then
  • Run it by using the example shown below:


e.g # rpm -Uvh tiki-1.8.RC2-1.noarch.rpm

You need the following packages installed:
you could install it from the mdk cds using :

# urpmi mysql
# urpmi phpmyadmin
# urpmi php-cgi


php-ini


You need to edit /etc/php.ini to increase exeution time and size of file uploads and remove display errors.

phpmyadmin allows you to create a database
make sure you first change the root password
then create a new user apache allowed to connect to localhost with a password
create a database tikidb
give all permissions to user apache on the database tikidb

create a symlink from tiki to tiki18

run in a browser

http://localhost/tiki/tiki-install.phpexternal link

Install TikiMap?


you need the following packages
gdal
libgd2 >= 2.0.15

install:
/etc/php/40_mapscript.ini

extension = php_mapscript.so

/etc/httpd/conf.d/41_mapserver.conf

AddHandler phtml-script .phtml
Action phtml-script /cgi-bin/php.cgi
  
#protect mapserver against downloads
<Directory /var/www/html/map>
    AllowOverride All
    Options -Indexes FollowSymLinks MultiViews ExecCGI
    <IfModule mod_access.c>
         Order allow,deny
         Deny from all
    </IfModule>
</Directory>
<Directory /var/www/html/map/images>
    AllowOverride All
    Options -Indexes FollowSymLinks MultiViews ExecCGI
    <IfModule mod_access.c>
         Order allow,deny
         Allow from all
    </IfModule>
</Directory>
<Directory /var/www/html/map/graphics>
    AllowOverride All
    Options -Indexes FollowSymLinks MultiViews ExecCGI
    <IfModule mod_access.c>
         Order allow,deny
         Allow from all
    </IfModule>
</Directory>
<Location /tiki/files>
    AllowOverride All
    Options -Indexes FollowSymLinks MultiViews ExecCGI
    <IfModule mod_access.c>
         Order allow,deny
         Allow from all
    </IfModule>
    <IfModule mod_mime.c>
         SetHandler default-handler
    </IfModule>
</Location>



copy php-cgi to /var/www/cgi-bin/php.cgi

copy php_mapscript.so to /usr/lib/php/extensions

note:
It seems on newest version of php-cgi you must add:
# cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
# previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
# what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
# this to 1 will cause PHP CGI to fix it's paths to conform to the spec.  A setting
# of zero causes PHP to behave as before.  Default is zero.  You should fix your scripts
# to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
cgi.fix_pathinfo = 1

to php.ini for php-cgi to work as a cgi script


enable maps feature in tiki

create directories owned by apache.apache

/var/www/html/tiki/files
/var/www/html/map
/var/www/html/map/data
/var/www/html/map/graphics
/var/www/html/map/images
/var/www/html/map/fonts

To create these directories use the mkdir command

Example; To create the map directory under html use: 'root$html# mkdir map

add a fontset.txt file with arial.ttf file to fonts/


add gdaltindex to /usr/bin
This file is installed by default so no need to installed it

restart httpd

Contributors to this page: Franck1445 points  and sakaio11693 points  .
Page last modified on Wednesday 16 of May, 2007 [21:08:46 UTC] by Franck1445 points .


Tel: +679 338 1377
Fax: +679 337 0040
director@sopac.org
Webmaster: webmaster@sopac.org
My status
SOPAC Secretariat
Private Mail Bag, GPO
Suva, Fiji Islands