Tuesday, 28 November 2006

MapServer for Windows (MS4W)

Introduction

Welcome to MS4W, the quick and easy installer for setting up MapServer For Windows and its accompanying applications (e.g., Chameleon, MapLab,etc.). The purpose of this package is to allow novice to advanced MapServer users to quickly install a MapServer development environment on their Windows systems. The reasons for needing to do this are diverse but, in general, this package supports: developers who want to get to a stable state quickly, trainers who need an easily-installed configuration identical across multiple installs, and novices who need help just getting all the needed bits and pieces together.

Design

The MS4W package is designed to perform a full installation of Apache, PHP, MapServer CGI, MapScript (CSharp, Java, PHP, Python), and to provide the capability to install additional applications easily and quickly. The simplest way to do this on Windows is to provide a predetermined directory structure and force everything into that mold.

The directory structure, while fixed within itself, is designed to be somewhat portable. While it needs to be installed at the root of a hard drive, it doesn't have to be the C: drive. Moving the package to the root of a different drive is simple - just copy it there. To move it to a subdirectory is more difficult - you'll need to search for /ms4w in all the files and replace it with your new path.

The design also accommodates simple upgrades to the core package and to applications, without affecting the local configuration or the configuration of other installed applications.

Contents

The following are included in the base package:

  • Apache version 2.2.3

  • PHP version 5.2.0 (MS4W 2.x) or 4.4.4 (MS4W 1.x)

  • MapServer 4.10.0 CGI and MapScript (CSharp, Java, PHP, Python)

    • support GD 2.0.33, FreeType 2.1.10, GDAL/OGR 1.3.2, PROJ, WMS/WFS, Flash, PDF, ECW3.1, PostGIS, GEOS, libcurl 7.15.1
  • mapserver utilities

  • gdal/ogr utilities

  • proj.4 utilities

  • shp2tile utility

  • shapelib utilities

  • shpdiff utility

  • PHP_OGR Extension 1.1.1

  • OWTChart 1.2.0

MapServer Version Information

MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG

MapServer Build Environment

Compiled using Howard Butler's MapServer buildkit

Library Versions Used to build this version of MapServer:

curl-7.15.1
fcgi-2.4.0
freetype-2.1.10
gd-2.0.33
gdal-1.3.2
geos-2.2.3
gettext-0.13
jpeg-6b
libecwj2-3.3
libgeotiff-1.2.2
libiconv-1.9.1
libintl-0.11.5
libpng-1.2.8
libxml2-2.6.23.win32
mapserver-4.10.0
ming-0.2a
mrsid-6.0.7.1407
mysql-5.0.18-win32
PDFlib-Lite-6.0.2
php-5.2.0 (MS4W 2.x)
php-4.4.4 (MS4W 1.x)
postgresql-8.1.4
proj-4.4.9
Python-2.4.2
regex-0.12
SWIG-1.3.27
tiff-3.8.0
xerces-c-2.7.0
zlib-1.2.3

MapScript

  • C# MapScript: compiled against .NET 1.1 runtime
  • Java MapScript: compiled against Java 1.5.07
  • PHP MapScript: built for PHP 5 (MS4W 2.x), or PHP 4 (MS4W 1.x)
  • Python MapScript: compiled against Python 2.4.2

Perl, TCL, and Ruby MapScript are not in this MS4W release

Directory Structure

  • ms4w/
    • the main directory, assumed to be at the root of a drive, normally C:
  • ms4w/Apache
    • the Apache installation
  • ms4w/Apache/bin
    • the Apache binaries
  • ms4w/Apache/cgi-bin
    • the location of mapserv.exe and its supporting libraries, and php.ini, php.exe.
  • ms4w/Apache/cgi-bin/ignored-libmap
    • location of the libmap dlls for Oracle and SDE (see the "GDAL/OGR Plugins" section of this document)
  • ms4w/Apache/cgi-bin/mapscript
    • location of CSharp, Java, and Python mapscript files
  • ms4w/Apache/conf
    • the Apache configuration files. These should not be modified. Place all application-specific and local httpd.conf files in /ms4w/httpd.d (see the README.txt in that directory)
  • ms4w/Apache/error
    • error files for Apache to use
  • ms4w/Apache/htdocs
    • the Apache Web root directory, you shouldn't install much in here except perhaps for testing.
  • ms4w/Apache/icons
    • icons used by Apache
  • ms4w/Apache/include
    • include directory for compiling against Apache
  • ms4w/Apache/lib
    • lib files for building against Apache
  • ms4w/Apache/logs
    • log files for Apache are stored here, this should be archived or cleaned every so often.
  • ms4w/Apache/manual
    • the Apache manual pages.
  • ms4w/Apache/modules
    • modules for Apache
  • ms4w/Apache/php
    • the PHP installation
  • ms4w/Apache/php/ext (MS4W 2.x)
    • location of phpmapscript dll
  • ms4w/Apache/php/extensions (MS4W 1.x)
    • location of phpmapscript dll
  • ms4w/Apache/proxy
    • apache proxy configurations, not used by MS4W
  • ms4w/apps
    • put all applications in subdirectories here.
  • ms4w/gdaldata
    • supporting files for GDAL data formats
  • ms4w/gdalplugins
    • place dlls here that are required for gdal plugins e.g. 'oci_OCI.dll'
  • ms4w/httpd.d
    • put all application-specific and local httpd.conf files here (see the README.txt in that directory)
  • ms4w/proj
    • an installation of PROJ.4
    • the epsg file used is /ms4w/proj/nad/epsg
  • ms4w/python
    • associated python files, including gdal bindings and a simple test script
  • ms4w/tmp
    • temporary files go here. This should be cleaned regularly
  • ms4w/tmp/ms_tmp
    • temporary files that need to be Web-accessible go here (i.e. image files created by mapserver). This is available as /ms_tmp/ via URL. Normally this means that your MAP files would have an IMAGEPATH of /ms4w/tmp/ms_tmp/ and a IMAGEURL of /ms_tmp/
  • ms4w/tools
    • contains useful tools such as the gdal/ogr utilities and mapserv utilities (note that before running these you must execute the /ms4w/setenv.bat script in your command window)

How to Install MS4W

A. Upgrading from an older version of MS4W:

If you already have MS4W installed please do the following:

  • open a DOS command window and execute the file '/ms4w/apache-uninstall.bat' at the commandline. This file will stop and uninstall your Apache service. You should see the following message flash in the command window:
The "Apache MS4W Web Server" service is stopping.
The "Apache MS4W Web Server" service has stopped.

Removing the "Apache MS4W Web Server" service
The "Apache MS4W Web Server" service has been removed
successfully.
  • your old apache service has now been removed
  • make sure no files or other services point the your ms4w folder. If your browser is currently open and you are a viewing an ms4w page you will not be able to rename the ms4w folder. Therefore you must close all ms4w documents, all ms4w browser windows...make sure no running files point to the ms4w folder.
  • rename the old ms4w folder to something like 'ms4w-old'
  • extract the ms4w_xx.zip file to the root of a drive on your machine
  • if successful, you should have a new directory named 'ms4w' at the root of the drive you chose (e.g. C:/ms4w or D:/ms4w ).
  • follow the rest of the install instructions in /ms4w/README_INSTALL.txt to start apache...

B. If you are extracting MS4W for the first time:

Please read through the following instructions before starting your installation.

  1. To install the MS4W .zip file, use a compression program (e.g. WinZip) to extract the package at the root of a drive, e.g., drive C:. If successful, you should have a new directory named 'ms4w' at the root of the drive you chose (e.g. C:/ms4w).

  2. Start your MS4W Apache Web Server by running /ms4w/apache-install.bat (at the command line or by double-clicking it). This file installs Apache as a Windows service (called "Apache Web Server") so that it starts whenever your machine is restarted. When executed, a DOS window should pop up with the following message:

    The Apache MS4W Web Server service is starting.

    The Apache MS4W Web Server service was started successfully.

    This means that Apache is running and installed as a service.

    NOTE for Win95,98,ME users:

    You will not be able to install Apache as a service, so instead you will have to manually start Apache each time, by clicking on /ms4w/Apache/bin/httpd.exe. An empty DOS window will open, which means Apache is running. To stop Apache you will have to close this empty DOS window.

  3. To test that Apache is running properly, open your Web browser and find your local host Web service by entering one of the following URLs:

    http://localhost/

    or

    http://127.0.0.1/

    You should now see the main MS4W page in your Web browser. This gives you general information about your install along with configuration information. If this is your first time using MS4W it is very important that you review the listed "Features" installed within MS4W, and test them by selecting each link found on this page.

  4. Technically, at this point, MS4W is installed! However, as you may have noticed from the MS4W main index.html page, there are no applications running. What this means is that there are no Web applications like MapLab or Chameleon found within MS4W's Web-accessible directory, /ms4w/apps/. The MS4W-configured Web applications can be found on http://maptools.org/ms4w/index.phtml?page=downloads.html as separate zip files.

  5. To install these Web application into /ms4w/apps/ all that is required is to unzip the Web application compressed file at the same root directory as MS4W (e.g., C:).

    Two things should happen when uncompressing this file. First, the Web application directory should appear within /ms4w/apps/. Second, a new httpd_*.conf file should be added to /ms4w/httpd.d/httpd_*.conf. (The /httpd.d/ directory contains Apache configuration files that define which files on your computer/server are Web-accessible. For each Web application that you install, a new configuration file will be found.)

  6. The definitions of these Web-accessible directories are called Web Aliases. In order to activate a Web Alias you must restart Apache. To test your latest installed application, go to the MS4W main index.html page (i.e., http://localhost/). In the applications section you should now find a link to the application you just installed. Select the link to the recently installed application to see if it is configured correctly. Another option is find the Web Alias for your application and call it from your Web browser directly. For example, if you have installed the latest MS4W version of MapLab, the chances are the Web Alias is "maplab". To go to the MapLab index page, simply enter http://localhost/maplab/.

    Note: Applications with configuration files (e.g., MapLab and Chameleon) generally do not require any editing of their files in order to work. Just unzip to the appropriate driver root and restart Apache.

    WARNING: It is very possible that you may wish (but not encouraged!) to run multiple versions of the same product. For example, Maplab 2.0 (mapserver_36) vs. MapLab 2.1 (mapserver_4.0). When installing these ms4w MapLab application packages, you will notice when unzipping MapLab that the httpd_maplab.conf file found under ./ms4w/httpd.d/ will be overwritten by the MapLab you are currently installing. The reason for this is that the MapLab Alias stays the same from version to new version of MapLab. So, if you overwrite the httpd_maplab.conf when unzipping and then restart Apache, you will get the latest version of Maplab that you just installed. To run both MapLab simply follow the instructions in Step 7.

  7. You also can create new Web Alias(es). To configure your own personal Web Alias(es), follow the instructions in /ms4w/httpd.d/README_HTTPD.txt

C. GDAL/OGR Plugins

Oracle 10g

For OGR support of Oracle, MS4W >= 1.5.0 includes ogr_OCI.dll in /ms4w/gdalplugins/ignored/, which is built for Oracle 10g.

Steps to Enable Oracle 10g Support in MS4W

  1. Make sure you have Oracle 10g client software installed on your machine (the same machine that you are running MS4W on).
  2. Replace the existing libmap.dll in /ms4w/Apache/cgi-bin/ with the one in the /ms4w/Apache/cgi-bin/ignored-libmap/oracle10g/ folder.
  3. Move the ogr_OCI.dll plugin file up one level from /ms4w/gdalplugins/ignored/ into /ms4w/gdalplugins/
  4. Restart Apache to be safe.
  5. For mapfile configuration see http://mapserver.gis.umn.edu/docs/howto/oracle_spatial_howto

SDE 9.1

For OGR support of ESRI's ArcSDE, MS4W >= 1.5.0 includes ogr_SDE.dll in /ms4w/gdalplugins/ignored/, which is built for ArcSDE 9.1.

Steps to Enable SDE 9.1 Support in MS4W

  1. Make sure the ArcSDE SDK dlls for 9.1 are available on your machine (the same machine that you are running MS4W on)..
  2. Replace the existing libmap.dll in /ms4w/Apache/cgi-bin/ with the one in the /ms4w/Apache/cgi-bin/ignored-libmap/sde9.1/ folder.
  3. Move the ogr_SDE.dll plugin file up one level from /ms4w/gdalplugins/ignored/ into /ms4w/gdalplugins/
  4. Restart Apache to be safe.
  5. For mapfile configuration see http://mapserver.gis.umn.edu/docs/reference/vector_data/arcsde

D. MapScript configuration

MS4W >= 1.5.0 includes pre-built support files for csharp, java, and python mapscript. In order to make use of these, however, they must be installed and configured in the appropriate locations on your system.

CSharp

  1. Files are located in /ms4w/Apache/cgi-bin/mapscript/csharp
  2. See http://mapserver.gis.umn.edu/docs/howto/mapscriptcscompile for installation notes.

Java

  1. Files are located in /ms4w/Apache/cgi-bin/mapscript/java
  2. See http://mapserver.gis.umn.edu/docs/howto/java_mapscript_Tomcat_55 for installation notes.

Python

Obtaining Python

Obviously, in order to run Python mapscript, you need to have a python installed. The Python mapscript support files included in this distribution are built for Python 2.4.x; they will not work with earlier or later Python versions. Windows Python binaries can be obtained free of charge from ActiveState or the Python site.

See the respective sites for Python installation information.

Installing the Python Mapscript Support Files

Quick and dirty (for use with ms4w only)
  1. Unpack /ms4w/Apache/mapscript/python/mapscript*win32.zip in a safe location

  2. In the directory structure that results from the above step, navigate to \Python-2.4.2\Lib\site-packages

  3. You should find three files there:
    • _mapscript.pyd
    • mapscript.py
    • mapscript.pyc
  4. Copy the three files into the /ms4w/Apache/cgi-bin directory.

  5. Place any python cgi scripts that you want to run under ms4w in the /ms4w/Apache/cgi-bin directory, and add a "shebang" line at the top of each script. See the section on Configuring Apache to run Python scripts below for shebang-line details.

More robust (for system-wide access)
  1. Unpack /ms4w/Apache/mapscript/python/mapscript*win32.zip in a safe location

  2. In the directory structure that results from the above step, navigate to \Python-2.4.2\Lib\site-packages

  3. You should find three files there:
    • _mapscript.pyd
    • mapscript.py
    • mapscript.pyc
  4. Copy the three files into the site-packages directory of your Python 2.4.x installation (eg., C:\Python24\Lib\site-packages)

  5. Add :\ms4w\Apache\cgi-bin to your system's PYTHONPATH environment variable.

Configuring Apache to Run Python Scripts

You have a couple of options here:

via shebang lines

This may be the preferred approach if you have multiple Python installations on your machine.

Add a "shebang line" to the top of each python cgi script in /ms4w/apache/cgi-bin. This line must be the first line in the script, and it must begin with #! followed by the path to your systems python executable. For example:

#!c:/python24/python.exe -u

The -u option shown above causes the script to use unbuffered output, which is generally what you need in web-serving contexts.

via Apache directives

This approach obviates the need to edit every python script in your cgi-bin directory; however, it may be problematic if you have multiple Python installations.

Add the following line to the end of ms4w/Apache/conf/httpd.conf:

ScriptInterpreterSource Registry

You may also want to add these:

SetEnv PYTHONUNBUFFERED 1
PassEnv PYTHONPATH

The first of the above lines causes your python scripts to use unbuffered output (which you probably want), while the second passes the value of your system's PYTHONPATH environment variable through to Apache's environment (if set).

Testing the Configuration

Follow these steps to test your Python MapScript installation:

  1. Move the file /ms4w/python/test-cgi-mapscript.py into the /ms4w/Apache/cgi-bin/ folder.

  2. Open the file in a text editor.

  3. Edit the first line of that script to point to your proper Python path.

  4. In your web browser goto http://127.0.0.1/cgi-bin/test-cgi-mapscript.py

  5. The script tests that the Python CGI is working, and that the mapscript module can be successfully imported.

    If successful you will see an HTML page listing several environment settings on your machine, as well a list of the Python MapScript module attributes at the bottom of the page.

Python Troubleshooting:

  • If you get an Internal Server Error check the Apache logs for info.
  • Make sure your script points to a valid Python installation path.
  • Make sure you are using a recent Python version (containing the cgitb module).

D. Troubleshooting

Warning: dl(): Unable to load dynamic library '/ms4w/Apache/php/extensions/php_mapscript_48.dll'

  1. Verify that the dll in question exists in the specified location (/ms4w/Apache/php/extensions/). If this dll is not in that location, you might have to modify the application to point to a different version of the dll (e.g. you might have php_mapscript_48.dll in the extensions directory, and your application might be configured for php_mapscript_46.dll which is not in the extensions directory).

  2. This php_mapscript dll requires several other dlls, and the problem may be that one is missing on your system. In order to hopefully get more information on what dll is missing, go to a command prompt, and do the following:

    cd ms4w\Apache\cgi-bin

    php C:/ms4w/Apache/htdocs/phpinfo_mapscript_**.php

    (replace ** with the mapscript version)

    A windows error window should open with a message like:

    The dynamic link library ***** could not be found in
    the specified path...

    Locate this missing dll and copy it either to /ms4w/Apache/cgi-bin/ or your system32 folder.

  3. If you are still unsure what dll is causing this unable to load dynamic library error, a useful utility to find what associated dlls are missing on your system is Dependency Walker. Download the utility, execute the exe, and open your php_mapscript dll.

The dynamic link library MSVCP71.dll could not be found in the specified path...

This is a microsoft runtime library that is apparently not on all Windows systems by default. Download the dll (possibly from here) and copy it to your System32 directory.

Clicking on apache-install.bat flashes a DOS window and does not install the service

To see the exact error message, open a Command window, and execute the 'apache-install.bat' file from a DOS prompt.

cd ms4w

apache-install.bat

Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down

Apache with MS4W is configured to use port 80. Your system might be already using this port (IIS could cause this for example). If you want to change the port that Apache uses modify the following file:

/ms4w/Apache/conf/httpd.conf

line 120: Listen 80

TCPView is an example of shareware that lets you see how the ports on your machine are being used.

The procedure entry point xxxx could not be located in the dynamic link library xxx.dll

Make sure that MapServer (or the utility that you are trying to use) is actually using the 'xxx.dll' file that is part of the MS4W package. You could be experiencing 'dll hell' (http://en.wikipedia.org/wiki/DLL_hell) where MS4W is actually finding an older dll on your system. Try renaming the other dll(s) of the same name, keeping the one in MS4W as is, and retrying your application/command.

Other Problems...

  1. Search the mailing list archives to see if someone has encountered/solved your same issue.
  1. If your issue has not been brought up on the mailing list and dealt with, submit a question to the MS4W mailing list. Include the steps to reproduce your problem, and state your exact error message. Also specify which version of MS4W you are using.

Password Protection Configuration for Applications

The following section explains how to add password authentication to your MS4W application. However there are many other possible settings in Apache for this, so please consult the Apache HTTP Server documentation.

Here are the minimal step for password protection:

  1. Modify your application's httpd_xxx.conf file, so that "AllowOverride None" is replaced with "AllowOverride AuthConfig", such as:

    Alias /gmap/ "/ms4w/apps/gmap/htdocs/"


    AllowOverride AuthConfig
    Options Indexes FollowSymLinks Multiviews

  2. Create a password file.

    • open a DOS command window, and go to Apache's bin directory

    • enter the following (replace "jeff" with the username you want to create, press ENTER and you will be prompted for a password to create):

      C:/ms4w/Apache/bin> htpasswd -c htpasswd.txt jeff
  3. Create the htaccess file.

    • create a file in your application directory (/ms4w/apps/gmap/htdocs/ in this example) named '.htaccess'

    • the file should contain (you can modify it however you wish though):

      AuthType Basic
      AuthUserFile C:/ms4w/Apache/bin/htpasswd.txt
      AuthName "Password Required"

      require valid-user
  4. Restart Apache

    • run /ms4w/apache-restart.bat
  5. Access your application in a web browser.

Troubleshooting:

  • some Windows versions may have difficulty with the '.htaccess' filename, so you might try naming it something else, but you would have to modify Apache's httpd.conf file (/ms4w/Apache/conf/httpd.conf) and add your filename, such as:

    AccessFileName .htaccess yourfilename

    'htaccess.acl' is recommended, such as:

    AccessFileName .htaccess htaccess.acl
  • a good reference is http://sniptools.com/tutorials/windows-apache-and-htaccess-authentication

MS4W Applications

The following applications come with a pre-configured install package for MS4W. Go to http://www.maptools.org/ms4w/index.phtml?page=downloads.html to find the desired package, and extract the packages to the root of the drive that MS4W is installed on (e.g. C:).

  1. Chameleon
  2. GMap Sample PHP/MapScript Application
  3. ka-Map
  4. MapLab
  5. MapServer Itasca Demo Application
  6. OGC Workshop
  7. FIST - Flexible Internet Spatial Template
  8. p.mapper

Friday, 24 November 2006

Cara Install ArcGIS

Copy CD ArcGIS ke Komputer
Copy Folder Crack Ke C:
Ubah this_host pada file arcgis_tbe menjadi nama komputer(klik kanan My Computer)
Install License
Copy crack ArcGIS dalam folder crack ke folder C:\Program Files\ESRI\License\arcgis9x
Jalankan LMTOOLS
Pada Tab Service/License File : Pilih Configuration using Service : ArcGIS License Manager
Pada Tab Configure Service Pilih Service Name : ArcGIS License Manager
Path to lmgrd.exe file : C:\Program Files\ESRI\License\arcgis9x\lmgrd.exe
Path to license file : C:\crack\arcgis_tbe.lic
Pilih Start Server at Power Up dan Use Service
Pada Tab Start/Stop/Reread Pilih ArcGIS License Manager dan Start Server
Install ArcGIS
Done

Konfigurasi Cartoweb

Get in the projects folder of Cartoweb. Rename the sampleProject directory to the name of your project.

Edit the client.ini.in of this new project, and modify the mapId parameter value with the name of your project:

mapId = your_project_name

Open the server_conf directory and rename the sampleProject directory to the name of your project.

In this folder, two more files need to be renamed ( sampleProject.map and sampleProject.ini) with the name of the new project.

C.2. Setup Your Project

In a command line prompt (DOS, shell), launch the cw3setup.php setup script.

 cw3setup.php --install
--base-url http://localhost/cartoweb3/htdocs/ --profile development
--project

See Chapter 1, Installation for more info on the installation script.

If no error occured, you should be able to access your project by typing http://localhost/cartoweb3/htdocs/client.php in your browser and selecting your project from the projects drop-down menu.

C.3. Project Shortcut

To make development easier, you can create a shortcut file to access your project directly. Go in cartoweb3/htdocs/ and copy the file demoCW3.php.

Rename the file to any name (usually your project name). Edit the file and replace 'demoCW3' by 'your_project_name'. Your project is now directly available with the URL http://localhost/cartoweb3/htdocs/your_project_name.php. (the URL given above depends on your installation, see the previous comments about cartoclientBaseUrl and --base-url).

C.4. Loading Data

As you can see, the project you created is hopelessly empty. Then, we'll load spatial data in it.

Add the following in the mapfile (your_project_name.map) :

  LAYER
NAME "region"
TYPE POLYGON
DATA "reg_france"
TEMPLATE "ttt"
CLASS
NAME "region"
STYLE
COLOR 240 240 240
OUTLINECOLOR 255 165 96
END
END
METADATA
"id_attribute_string" "CODE"
END
END

And in the layers.ini file (server_conf/your_project_name/) add the following :

layers.region.className = Layer
layers.region.label = Régions
layers.region.msLayer = region

And add the new layer id in the root layer children list :

layers.root.children = region

For more details on how to fill the layers.ini file, see Chapter 6, Layers.

Also edit the your_project_name.ini file in a text editor in order to set some initial mapstates such as default selected layers.

Add the following :

mapInfo.initialMapStates.default.layers.region.selected = true

See Section 4.3.3.3, “Initial Mapstates” for more info about initialMapStates.

In your browser, click on the reset_session button and you should now see the France regions.

C.5. Location Parameters

Move the location.ini file you will find in the sampleFiles folder into the server_conf/your_project_name/ one.

This file defines some parameters such as scales or shortcuts. For more details on how to configure those parameters, see Chapter 7, Navigation

Click on the reset_session button in your browser page. New elements should appear. You should be able to choose a scale and a shortcut.

C.6. Your Own Data

After that the next point is to add your own data. You should just have to :

  • get your data available, by default in the data folder or somewhere else on your filesystem,
  • modify the mapfile extent,
  • modify the extent defined in the initialMapstates (your_project_name.ini),
  • add layers definitions in the mapfile (your_project_name.map),
  • add layers definitions in the layers.ini.
  • reset the session in the browser, and get your data displayed.

C.7. Outline

Let's see how to load a plugin. Edit the client.ini.in file (client_conf/) and add the outline plugin in the list of plugins to load:

loadPlugins = outline

Do the same in the your_project_name.ini file on server-side (server_conf/your_project_name/) but also add the mapOverLay plugin :

mapInfo.loadPlugins = outline, mapOverlay

Move the outline.ini file from sampleFiles to server_conf/your_project_name/.

In the mapfile (your_project_name.map), add the following at the bottom of the layers definition section :

  LAYER
NAME "cartoweb_point_outline"
TYPE POINT
CLASS
STYLE
SYMBOL "circle"
COLOR 0 0 205
SIZE 10
END
LABEL
TYPE TRUETYPE
FONT "Vera"
SIZE 7
COLOR 0 0 0
OUTLINECOLOR 255 255 255
POSITION lc
END
END
END

LAYER
NAME "cartoweb_line_outline"
TYPE LINE
TRANSPARENCY 100
CLASS
STYLE
OUTLINECOLOR 255 0 0
SYMBOL "line-dashed"
SIZE 3
END
LABEL
TYPE TRUETYPE
FONT "Vera"
SIZE 7
COLOR 0 0 0
OUTLINECOLOR 255 255 255
ANGLE auto
POSITION uc
END
END
END

LAYER
NAME "cartoweb_polygon_outline"
TYPE POLYGON
TRANSPARENCY 60
CLASS
STYLE
COLOR 255 153 0
OUTLINECOLOR 0 0 0
END
LABEL
TYPE TRUETYPE
FONT "Vera"
SIZE 7
OUTLINECOLOR 255 255 255
COLOR 0 0 0
POSITION cc
END
END
END

Launch the setup script. This step is compulsary to convert .ini.in files into .ini configuration files read by Cartoweb.

By clicking on the reset_session button in the browser window, you should see new buttons in the toolbar and the corresponding folder in the leftbar.

C.8. Pdf Printing

As done for the outline plugin, add "exportPdf" to the list of plugins to load on both client and server-side.

After launching the setup script and refreshing the application (reset_session), you should be able to test the new functionality as a new folder appeared in the interface. But a warning printed in the pdf file advices you to edit your exportPdf.ini file.

So move exportPdf.ini from sampleFiles to client_conf. Take care that this is a client-side configuration file. Try a new print (no need to reset).

For more information on how to edit your exportPdf.ini file, see Chapter 12, PDF Export.

C.9. Templating and Layout

Create a new templates folder in your project directory and move the cartoclient.tpl file from sampleFiles to this new folder.

This file is the main template for CartoWeb.

Refresh the application in your browser (refresh button) and enjoy!

To customize your project even more, you may apply styles sheets. To do so, first create a htdocs folder in your project directory. In this folder, create a new folder named css. Then move cartoweb.css and folders.css from sampleFiles to this new folder.

At this step, you need to launch the setup script so that the new ressources you just created are copied or linked (depending on your OS) in a web reachable folder.

You can now refresh the browser and see the new colors and styles.

Thursday, 23 November 2006

HowTo build UMN on Ubuntu DepperDrake within a few minutes

Installation of "GIS-system" UbuntuGIS Benjamin Thelen & Lars-Hendrik Schneider

Workshop FOSSGIS 2006 Installation des "GIS-Betriebssystems" UbuntuGIS Benjamin Thelen & Lars-Hendrik Schneider Bonn, den 29.03.2006

Mini-Howto Installation Ubuntu 5.10 „Breezy Badger“ mit PostgreSQL 8.1 und PostGIS 1.1.1 (optional MySQL 4.1) UMN Mapserver 4.8.2

  1. ) Vorbereitung der Installation System bootet von CD/DVD, Monitor und Tastatur anschließen, Netzwerkkabel angeschlossen (DHCP) ...
  2. ) Installation des Basissystems Installation vom Datenträger starten, am Bootprompt boot: server eingeben (für erweiterte Optionen ''server-expert''). Dies startet die Installation des Grundsystems ohne X.

Sprache wählen/Choose language: Choose a language: German – Deutsch Sprache wählen/Choose: Land wählen: Deutschland Ihre Tastatur ist: Deutsch Netzwerk einrichten: Bitte geben Sie den Namen des Rechners an: webgis Festplatte partitionieren: Partitionstabelle von Hand eingeben: z.B. 200MB /boot (Boot-Flag: EIN), 1GB SWAP (Auslagerungsdatei), 2GB /, Rest /var, u.U. noch /tmp auf eigene Partition. Alle Dateisysteme Ext3-Journaling-Dateisystem.

Zeitzone konfigurieren: Europe/Berlin: Ja User und Passwörter einrichten: Voller Name für den neuen Benutzer: www-User User und Passwörter einrichten: Benutzername für ihr Konto: www User und Passwörter einrichten: Passwort für den neuen Benutzer: (-Bestätigen) Installation beenden: Erste Stufe abgeschlossen: Weiter (-Reboot)

  1. ) Grundkonfiguration des Systems Netzwerkeinstellungen: /etc/network/interfaces (IP, Gateway, Broadcast ...) /etc/resolv.conf (DNS)

Root-Account aktivieren: # sudo passwd root # su

anderen Usern sudo-Rechte entziehen: # visudo %admin ALL=(ALL) ALL ändern in #%admin ALL=(ALL) ALL

apt-Quellen einrichten: # vi /etc/apt/sources.list Erste Zeile mit cdrom löschen, bei anderen # entfernen. TIP: Der vi ändert nicht die Eigentümerrechte einer Datei!

Erstes Mal Paketquellen einlesen & updaten: # apt-get update && apt-get upgrade

SSH-Server installieren: # apt-get install openssh-server

Basispakete für Entwicklung installieren: # apt-get install build-essential

Lokale anlegen: # dpkg-reconfigure locales de_utf-8 auswählen, andere abwählen, de_utf-8 als Standard wählen.

Umgebungsvariable LC_ALL exportieren: # echo LC_ALL=de_DE.UTF-8 >> /etc/environment # export LC_ALL=de_DE.UTF-8

  1. ) Apache2-Webserver mit PHP5 installieren Verzeichnisse: /etc/apache2/sites-available – Verzeichnis für vHosts-Dateien /etc/apache2/sites-enabled – Verzeichnis für vHosts-Dateien, die aktiviert sind /var/www – default Veröffentlichungsverzeichnis des Apache /usr/lib/cgi-bin – default cgi-bin des Apache /etc/php5/apache2/php.ini – PHP.INI-Datei von PHP5 im Apache2

Apache2 und PHP5 installieren (zieht weitere Pakete automatisch mit): # apt-get install apache2 apache2-common apache2-mpm-prefork apache2-utils libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-pgsql

Veröffentlichungsverzeichnis dem www-User schenken (für Webseitenbetreuung): # chown -R www:www /var/www

  1. ) PostgreSQL-Pakete installieren Verzeichnisse: /etc/postgresql/8.1/main/pg_hba.conf – Rechteverwaltung des PostgreSQL-Servers /etc/postgresql/8.1/main/postgresql.conf – zentrale Konfigurationsdatei des PostgreSQL-Servers

PostgreSQL-Pakete installieren (zieht weitere Pakete automatisch mit): # apt-get install postgresql-8.1 postgresql-client-8.1 postgresql-contrib-8.1 postgresql-server-dev-8.1 Contrib-Paket wird dabei später für die PostGIS-Installation benötigt.

PostgreSQL für den Einsatz mit TCP/IP freischalten: # vi /etc/postgresql/8.1/main/postgresql.conf -> #listen_addresses = localhost ändern in listen_addresses = localhost

Nutzerrechte freischalten: # vi /etc/postgresql/8.1/main/pg_hba.conf -> local all all ident sameuser ändern in local all all trust bzw. was als Sicherheitspolicy vorgesehen ist. PostgreSQL-Server neu starten: # /etc/init.d/postgresql-8.1 restart

/***OPTIONAL ***/ MySQL-Pakete installieren MySQL-Paket installieren (zieht weitere Pakete automatisch mit): # apt-get install mysql-server-4.1 u.a. postfix (für die Zustellung von Mails aus dem DB-System) Local only oder No configuration /***OPTIONAL***/

  1. ) Vor den weiteren Schritten Pakete holen: Folgende Pakete werden für die Kompilierung von PostGIS bzw. des UMN Mapservers benötigt und werden vorab installiert (zieht weitere Pakete automatisch mit): # apt-get install proj libgeos-dev libcurl3-dev libfreetype6-dev libgdal1-dev gdal-bin libjpeg62-dev libpng12-dev libgd2-xpm-dev flex bison
  2. ) Kompilierung und Installation von PostGIS Arbeitsverzeichnis anlegen: # mkdir /var/src

Sourcen von PostgreSQL besorgen von http://www.postgresql.org/ftp/source/v8.1.2/, entweder herunterladen und per SCP hochladen oder aus dem Mirror direkt mit wget laden: # wget ftp.de.postgresql.org/mirror/postgresql/source/v8.1.2/postgresql-8.1.2.tar.gz Unbedingt die genaue PostgreSQL-Version (hier die 8.1.2) beachten!

Sourcen entpacken: # tar xzf postgresql-8.1.2.tar.gz # cd postgresql-8.1.2

configure laufen lassen: # ./configure -–without-readline -–without-zlib

wenn configure erfolgreich war: # make und KEIN make install, da wir ja nur das Binary brauchen!

PostGIS herunterladen in das Contrib-Verzeichnis der PostgreSQL-Sourcen laden und entpacken: # cd /var/src/postgresql-8.1.2/contrib # wget http://postgis.refractions.net/download/postgis-1.1.1.tar.gz # tar xzf postgis-1.1.1.tar.gz # mv postgis-1.1.1 postgis

PostGIS bauen und ins System installieren: # cd postgis # make && make install

Anlegen der ersten PostGIS-Datenbank als Benutzer postgres: # su postgres $ createdb mygisdb $ createlang plpgsql mygisdb $ psql -d mygisdb -f /usr/share/postgresql/8.1/contrib/lwpostgis.sql $ psql -d mygisdb -f /usr/share/postgresql/8.1/contrib/spatial_ref_sys.sql $ exit

  1. ) Kompilierung und Installation des UMN Mapservers # cd /var/src # wget http://cvs.gis.umn.edu/dist/mapserver-4.8.2.tar.gz # tar xzf mapserver-4.8.2.tar.gz # cd mapserver-4.8.2

Dateien tunen: # vi mapsymbol.h -> #define MS_MAXSYMBOLS 64 ändern in #define MS_MAXSYMBOLS 1000 Damit wird die Zahl der möglichen Symbole erhöht.

# vi map.h -> #define MS_MAXCLASSES 250 ändern in #define MS_MAXCLASSES 1000 Anzahl Klassen je Layer erhöhen. -> #define MS_MAXLAYERS 200 ändern in #define MS_MAXLAYERS 500 Anzahl Layer erhöhen. -> #define MS_MAXIMAGESIZE_DEFAULT 2048 ändern in #define MS_MAXIMAGESIZE_DEFAULT 10000 Dateigröße des möglichen Ausgabebildes erhöhen (wichtig für den hochqualitativen Druck!)

Nun configure ausführen: # ./configure --with-gd \ --with-gdal=/usr/bin/gdal-config \ --with-proj \ --with-ogr \ --with-jpeg=/usr/ \ --without-png \ --without-tiff \ --with-freetype \ --with-wmsserver \ --with-wmsclient \ --with-wfs \ --with-postgis

Wenn configure erfolgreich, dann das Binary bauen: # make

...und anschließend testen: # ./mapserv -v MapServer version 4.8.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

In das CGI-BIN des Apache2 verschieben: # cp mapserv /usr/lib/cgi-bin/ und im Browser testen Im Browser: http:///cgi-bin/mapserv/ No query information to decode. QUERY_STRING is set, but empty.

This How-to applies to: MapServer 4.8

by Till Adams last modified 2006-09-20 08:49
Contributors: Lars-Henrik Schneider, Benjamin Thelen, Till Adams

Tuesday, 21 November 2006

MapServer di Ubuntu-Debian

Install MapServer di Ubuntu-Debian


wget -c arsip.ubuntu-id.org/berkas/sources.list.komo
apt-get update
sudo apt-get install mapserver-bin
sudo apt-get install cgi-mapserver
sudo apt-get install mapserver-doc
/etc/init.d/apache2 restart

Done

Building QGIS on Ubuntu Step by Step

  1. Edit your /etc/apt/sources.list file.

  2. Uncomment the all the lines starting with "deb"

Now update your local sources database:


sudo apt-get update

Install package dependencies.

Even if you dont plan to code using kdevelop, its worth installing first because it will make sure you have the dependencies for a useable c++ compilation environment. Not all these packages are strictly needed for QGIS to build, but I find them convenient to have. If you are short on disk space or bandwidth, you may wish to be a little more selective. If you are unsure, just install them all, they cant cause any harm.


sudo apt-get install kdevelop3 autoconf2.13
autobook autoconf-archive gnu-standards
libqt3-mt-dev qt3-doc kdbg libarts1-dev
kdelibs4-doc htdig doxygen kdoc
sgmltools-lite linuxdoc-tools a2ps gv
qt3-designer qt3-dev-tools kbabel graphviz
c-cpp-reference g++ libtool flex bison
automake1.8 checkinstall ccache libtool proj
sqlite3 libsqlite3-dev libsqlite3-0 gsl-bin
libgsl0 libgsl0-dev cvs

/!\ Note: This will prompt to install a whole heap of additional packages....go ahead its ok.

Now you can install all the packages qgis requires to build:


sudo apt-get build-dep qgis

Setup ccache

You should also setup ccache to speed up compile times:


cd /usr/local/bin
sudo ln -s /usr/bin/ccache gcc
sudo ln -s /usr/bin/ccache g++

Make sure the correct version of automake is being used

/!\ NOTE: If you installed kdevelop using the step above, ubuntu will have installed automake-1.4. This causes a problem when running the autogen.sh command below as it picks up the wrong copy of aclocal and automake. To circumvent this while still keeping both installed on your system do the following:


sudo update-alternatives --config automake

Which will present you with something like:


There are 4 alternatives which provide `automake'.

Selection Alternative
-----------------------------------------------
1 /usr/bin/automake-1.6
2 /usr/bin/automake-1.8
*+ 3 /usr/bin/automake-1.4
4 /usr/bin/automake-1.9

Press enter to keep the default[*], or type selection number: 2
Using `/usr/bin/automake-1.8'
to provide `automake'.

GRASS Specific Steps

Install GRASS

/!\ If you don't need to build with GRASS support, you can skip this section.

Now you can install grass from breezy:


sudo apt-get install grass libgrass-dev

Install GRASS raster driver for gdal

The apt package for this is currently broken, se we have to build it from source :-(


cd ~/installers
wget http://www.gdal.org/dl/gdal-grass-1.2.3.tar.gz
cd ~/src
tar xvfz ~/installers/gdal-grass-1.2.3.tar.gz
cd gdal-grass-1.2.3/
sudo apt-get install libgrass-dev
./configure --with-grass=/usr/lib/grass
make
sudo make install
echo "export GDAL_DRIVER_PATH=/usr/lib" >> ~/.bashrc
source ~/.bashrc

/!\ NOTE: You will need to log in again for the GDAL_DRIVER_PATH to be picked up in all your shells!

Starting the compile

NOTE You will need to follow the instructions in the dowload page to get the source code downloaded first!

The qt files are not in the expected place, so you need to tell configure where to look for them. Or you can export QTDIR=/usr/share/qt3.

Now you can proceed to the initial configure step:


./autogen.sh --enable-debug --prefix=/usr
--with-qtdir=/usr/share/qt3
--with-grass=/usr/lib/grass

At the end of the autogen / configure process above you should see output like below, indicating that qgis is going to be built with all its bells & whistles...


==========================================
qgis 0.6.0devel22
------------------------------------------
GDAL/OGR : yes (Version 1.2.6)
GEOS : yes (Version 2.0.1)
PostgreSQL : yes (Version 7.4.7)
GRASS : yes <-- may be no if you skipped grass step above!
SPIT : yes
Georeferencer : yes
GPS/GPX : yes
PROJ4 : yes
SQLITE3 : yes

Debug : yes
Plugin dir : ${exec_prefix}/lib/qgis

The binary will be installed in /usr/bin

The build is using Qt in /usr/share/qt3
------------------------------------------
Configure finished, type 'make' to build.

Now we go on to the compilation step. I like to time the build so I can get an idea of how long it takes in general. THe first time you build will take substantially longer as ccache will not receive many hits. Subsequent builds should be much faster!


echo `date` > /tmp/qgis_compile.txt ; make ; echo `date` >> /tmp/qgis_compile.txt

Now install as a package for easy removal later:


sudo ./doCheckInstall.sh

Using doCheckinstall.sh will do the equivalent of make install, but it will also make a debian package of QGIS, making it easy to compile on one machine and install on many...

Building and Installing QGIS

  1. Download PostgreSQL source from www.postgresql.org
  2. Extract the source
      tar -xzf postgresql-7.4.1.tar.gz

  3. Change to the source directory
      cd postgresql-7.4.1

  4. Configure PostgreSQL:
      ./configure --prefix=/usr/local/pgsql

  5. Build
      make

  6. Install
      make install

  7. As root, create the postgres user and setup the database (following taken from PostgreSQL INSTALL file with modification)
    • Create the postgres user
        adduser postgres

    • Create the directory for the PostgreSQL database
        mkdir /usr/local/pgsql/data

    • Change ownership of the data directory to the postgres user
        chown postgres /usr/local/pgsql/data

    • su to the postgres user (or login as postgres)
        su - postgres

    • Change to the PostgreSQL install directory
        cd /usr/local/pgsql

    • Initialize the database
        ./bin/initdb -D /usr/local/pgsql/data

    • Start the PostgreSQL daemon
        ./bin/pg_ctl start  -o "-i" -D /usr/local/pgsql/data -l /home/postgres/serverlog

    • Create the test database
    •   ./bin/createdb test
  8. PostgreSQL should now be running. Logon as the postgres user (or use su - postgres). You should be able to connect to the test database and execute a test query with the following commands:

      psql test
    select version();
    version
    -------------------------------------------------------------------------------------
    PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.1 (SuSE Linux)
    (1 row)

    \q

  9. PostgreSQL install is done

To install GEOS:
  1. Download GEOS source from http://geos.refractions.net
  2. Untar GEOS
      tar -xzf geos-2.0.0.tar.gz
  3. Change to the GEOS source dir
      cd geos-2.0-.0
  4. Follow the instructions in the GEOS README file to complete the installation. Typically the install goes like this:
      ./configure
    make
    make install

PostGIS
  1. Download PostGIS source from http://postgis.refractions.net

  2. Untar PostGIS into the contrib subdirectory of the postgresql build directory. The contrib subdirectory is located in the directory created in step 3 of the PostgreSQL installation process.
  3. Change to the postgis subdirectory
  4. Edit the Makefile to enable GEOS support (see the note above)
  5. PostGIS provides a manual in the doc/html subdirectory that explains the build process (see the Installation section)
  6. The quick and dirty steps to install PostGIS are:
     cd contrib
    gunzip postgis-0.8.0.tar.gz
    tar xvf postgis-0.8.0.tar
    cd postgis-0.8.0
    make
    make install
    createlang plpgsql yourtestdatabase
    psql -d yourtestdatabase -f postgis.sql
    psql -d yourtestdatabase -f spatial_ref_sys.sql

GRASS

GDAL/OGR

T

To install GDAL/OGR from source:

  1. Download the GDAL distribution from http://www.remotesensing.org/gdal. You should use version 1.1.9 or higher. Versions prior to 1.1.9 contained a bug that caused problems when a null feature was encountered. If you want to build vector support for GRASS, you must use GDAL 1.2.3.

  2. Untar the distribution
        tar xfvz /../path/../gdal-x.x.x.tar.gz

  3. Change to the gdal-x.x.x subdirectory that was created by step 2
        cd gdal-x.x.x

  4. Configure GDAL
        ./configure
    or if you want GRASS support
        ./configure --with-grass=
    Depending on the GDAL version you are building, it may be necessary to specify -without-ogdi when running configure if you don't have the OGDI libary avaiable on your system.

  5. Build and install GDAL:
        make
    su
    make install

  6. In order to run GDAL after installing it is necessary for the shared library to be findable. This can often be accomplished by setting LD_LIBRARY_PATH to include /usr/local/lib. On Linux, you can add /usr/local/lib (or whatever path you used for installing GDAL) to /etc/ld.so.conf and run ldconfig as root.

  7. Make sure that gdal-config (found in the bin subdirectory where GDAL was installed) is included in the PATH. If necessary, add the path to gdal-config to the PATH environment variable.
        export PATH=/../path/../gdal-config:$PATH

  8. Check the install by running:
        gdal-config --prefix

Qt

Qt 3.1.2 or higher is required in order to compile QGIS. You may already have Qt on your system. If so, check to see if you have version 3.1.2 or later. You can check the Qt version using the find command:
  find ./ -name qglobal.h 2>/dev/null | xargs grep QT_VERSION_STR
If you have the locate utility installed you can do the same more quickly using:
  locate qglobal.h | xargs grep QT_VERSION_STR
In either case the result should look something like this:
   #define QT_VERSION_STR   "3.3.1"
In the example above, Qt 3.3.1 is installed.

If Qt is not installed, you will have to install the Qt development package for your distribution. If you are not able to install the required Qt packages, you will have to build from source.

To install Qt from source:

  1. Download Qt from http://www.trolltech.com/developer (choose the Qt/X11 Free Edition)
  2. Unpack the distribution
  3. Follow directions provided in the distribution directory (doc/html/install-x11.html)
  4. Use whatever configure options you like but make sure you include -thread for use with QGIS. You can configure Qt with minimal options:
        ./configure -thread

  5. Complete the installation per the instructions provided in the Qt documentation (see step 3)

Building QGIS

After you have installed the required libraries, you are ready to build QGIS. Download and untar the QGIS distribution and change to the QGIS source directory. You have two options for building and installing QGIS: Quick and Dirty and the right way.

Quick and Dirty

If you don't need PostgreSQL support and have installed GDAL , you can configure and build QGIS by changing to the distribution directory and typing:
./configure
make
make install
The above assumes that the gdal-config program is in your PATH See the next section for the full configuration instructions.

Configuring QGIS the Right Way

To see the configure options available, change the the QGIS directory and enter:
    ./configure --help
Among other options, there are three that are important to the success of the build:
    --with-qtdir=DIR              Qt installation directory default=$QTDIR
--with-gdal=path/gdal-config Full path to 'gdal-config' script,
e.g. '--with-gdal=/usr/local/bin/gdal-config'
--with-pg=path/pg_config PostgreSQL (PostGIS) Support
(full path to pg_config)
--with-grass=DIR GRASS Support (full path to GRASS binary package)

Qt

The configure script will detect Qt, unless it is installed in a non-standard location. Setting the QTDIR environment variable will make ensure that the detection succeeds. You can also specify the path using the -with-qtdir option.

GDAL

If the gdal-config script is in the PATH, configure will automatically detect and configure GDAL support. If not in the path, you can specify the full path to gdal-config using the -with-gdal option. For example:
    /configure --with-gdal=/usr/mystuff/bin/gdal-config

PostgreSQL

If the pg_config script is in the PATH, configure will automatically detect and configure PostgreSQL support. If not, you can use the -with-pg option to specify the full path to pg_config. For example:
    ./configure --with-pg=/usr/local/psql/bin/pg_config

GRASS

To build QGIS with GRASS support you must specify the full path to the installed GRASS binary package:
    ./configure --with-grass=/usr/local/grass-5.7.0
This assumes that GRASS is installed in the default location. Change the path to match the location of your GRASS installation.

Example Use of Configure

An example of use of configure for building QGIS with all options:
    ./configure --prefix=/usr/local/qgis \
--with-gdal=/usr/local/gdal/bin/gdal-config \
--with-pg=/usr/local/psql/bin/pg_config \
--with-grass=/usr/local/grass-5.7.0
This will configure QGIS to use GDAL, GRASS, and PostgreSQL. QGIS will be installed in /usr/local/qgis.

If QTDIR is set and gdal-config and pg_config are both in the PATH, there is no need to use the -with-gdal and -with-pg options. The configure script will properly detect and configure GDAL and PostgreSQL. You must still use the -with-grass option if building with GRASS support.

Compiling and Installing QGIS

Once properly configured simply issue the following commands:
    make
make install
NOTE - As of version 0.1, you can no longer run QGIS from the src directory. You must do a make install and start QGIS from the installed location. In the case of the example above, the QGIS binary resides in the bin subdirectory of the directory specified with the prefix option (/usr/local/qgis/bin).

For information on using QGIS see the QGIS User Guide.

Building Plugins

The QGIS source distribution contains a number of "core" plugins. These are built along with QGIS using the instructions above. Additional external plugins are available from the QGIS community website at http://community.qgis.org. Instructions for building an external plugin can be found at http://wiki.qgis.org/qgiswiki/StepByStepBuildInstructions. Some external plugins may include instructions on building. If so, follow the instructions provided with the plugin rather than those provided in the wiki.

About this document ...

Building and Installing QGIS

This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.70)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -dir html -nonavigation -split 0 install.tex

The translation was initiated by Gary Sherman on 2004-12-19