CartoWeb depends on several sofware components needed for its proper working. Some are required and others optional, depending on what you intend to do.
Required software
- PHP >= 5.0.3[1]
- See http://www.php.net for more informations.
You will need to have some features available in PHP
- SOAP: This is required by CartoWeb as it uses SOAP webservices.
- Gettext (optional): You need the Gettext module if you want
to enable the Internationalisation in CartoWeb. See
Chapter 14, Internationalization for configuration.
Note
If you are using the demo, you need to have Gettext support installed, as it uses Gettext by default.
- Curl (optional): Some scripts (like i18n) need Curl to fetch files remotely.
- Mapserver PHP MapScript (from MapServer >= 4.4)
- See http://www.maptools.org/php_mapscript/ for more information and installation instructions.
- PostgreSQL with PostGIS suppport (optional)
- If you want spatial database support in CartoWeb you will need to install PostGIS of the PostgreSQL database. See http://postgis.refractions.net/ for more information.
For version 3.0.0, the installer is not yet completely ready. These are instructions about how to install CartoWeb with this version. These notes are temporary and will be removed once the installer is totally fonctional.
Step by step guide:
- Download CartoWeb source from http://www.cartoweb.org/. It is recommended that you download the version with demo for a better user experience.
- Uncompress the archive somewhere in your path accessible by your Web server.
-
Point your Web browser to the file located in
htdocs/info.php, and check that the PHP information page displays correctly (meaning PHP is correctly setup) and that you have a section called MapScript in this page. If it is not the case, CartoWeb will not run correctly. You should install and setup PHP and PHP MapScript correctly. See Section 1.1, “Prerequisite for Installing CartoWeb”. If you intend to use the CartoWeb demo, you need to have a section called Gettext in the previous output. - CartoWeb needs some file to be writable by the Web Server
such as the directory where generated images are stored. To set up
these permissions, you need to launch the PHP installer with an argument.
This needs to be done on the command line (launch
cmd.exeon Windows). You also need to find the path to your PHP executable. For instancec:\wamp\php\php.exeon Windows, or/var/lib/cgi-bin/phpon Unix (just example, they may differ). Once located, launch the following command:php cw3setup.php perms
Replacingphpwith the path to your PHP. - You can now configure CartoWeb with your desired options. If you
want to quickly test the demo, you need only one option to be modifed.
Open in your favorite editor the file named
client_conf/client.ini. Find the line containing the valuecartoclientBaseUrl. Uncomment this line (removing the first;character and set on the right side the URL which is used to access thehtdocsdirectory inside CartoWeb. For instance, if you need to typehttp://localhost/cartoweb3/htdocs/info.phpto access the PHP information page, then the value to put there will behttp://localhost/cartoweb3/htdocs/. Then, do the same for the optioncartoserverBaseUrljust below. - (Optional) If you did not download CartoWeb with the demo included,
and want to install it afterward, you can get the demo data
and extract it inside the
projects/demo/server_conf/demodirectory (this will give you aprojects/demo/server_conf/demo/datanew directory with the data. On Unix, you can type the following in a shell:cd projects/demo/server_conf/demo wget http://www.cartoweb.org/downloads/cartoweb-demodata-3.0.0.tar.gz tar xvzf cartoweb-demodata-3.0.0.tar.gz
On Windows, you can use a graphical extractor to do the same (you can use http://www.7-zip.org/). -
You should now be able to point your browser to the
htdocs/demo.phpfile, and see CartoWeb in action (if you have the demo data). If you don't have the demo, you can use the more simple test project with thehtdocs/client.phpURL.
1.3. UNIX-like Install[2]
Note
For version 3.0.0 installation, please refer to Section 1.2, “Installation Instructions for Version 3.0.0”.
Note
If you are using the Debian distribution, you can easily install PHP and Mapserver. See Appendix A, Mapserver Debian Installation.
CartoWeb installer is "cw3setup.php", located in the root directory of the application: Simply run
php -f cw3setup.php
to setup the application.
(no command, by default): install cartoweb3
cvs : install cartoweb3 from cvs
check : check configuration
get[=user] : CVS checkout with user name [anonymous]
get_libs : get required libraries
dirs : create user directories
perms[=www-data] : set writing perms for web-user [www-data]
- set ownership if ran as superuser,
- give write permission instead.
createConfig : create the new configuration (install .dist files)
setupLinks : link or copy paths for web browser
removeLinks : remove all links created by setupLinks.
- super user rights required to remove dynamic content
setup[=path] : setup a new project in existing installation
mkDirs : create all cache directories
rmDirs : remove all temporary files AND directories
remove : remove cartoweb3
- (no command, by default): install CartoWeb from a download.
- cvs: install CartoWeb from a cvs checkout. You must have cvs access configured and cvs login done with the right user name.
- check: check if the configuration meet requirements.
- get[=user]: CVS checkout with user name "user". You must have done succesfully a cvs login before.
- get_libs: fetch required libraries. You need an internet connection.
- perms[=www-data]: set writing perms for web-user [www-data]. Set the ownership if ran as superuser, and give write permission instead. Warning: the second choice is secureless.
- createConfig: create configuration from .dist files.
- setupLinks: setup symbolic links for a SymLink configuration.
- removeLinks: remove links created by setupLinks.
- setup[=path]: setup a new CartoWeb project from project sources located in path.
- mkDirs: make user-writeables directories.
- rmDirs: remove user-writeable directories.
- remove: try to completely remove CartoWeb. Super-user rights may be required for user-writed directories removal.
Note
For version 3.0.0 installation, please refer to Section 1.2, “Installation Instructions for Version 3.0.0”.
The process is as simple as for UNIX, but the windows installer is not available yet.
[1] This implies that you have a Web Server configured to execute PHP scripts, such as Apache (http://httpd.apache.org)
[2] If you are using Debian, and you need to install Mapserver, you can have a look at Appendix A, Mapserver Debian Installation