YLUPC
GettingStarted – Yukon Planning Atlas

Getting Started as an Administrator

Introduction

Most of this wiki is geared towards the administrators of this online mapping application, or of similar MapServer?-based application. If you are a new administrator, this page is for you. It will list hints that will help new administrators get started, and assumes the reader has only basic or moderate systems admistration skills.

Helpful Software

Many of the Atlas management tools are available through a web browser with the right passwords. Some additional software will make development and editting tasks more efficient and effective. The recommendations below assume that you are running in a Windows environment, though similar steps would be needed for others.

Text editor

Windows comes with Notepad, which is one of the simplest Text Editors around. Something more elaborate maybe a good idea. I use Crimson Editor, but there are dozens. Check out:  http://en.wikipedia.org/wiki/Comparison_of_text_editors

Pick one, download, and install.

Subversion

When working in a team of several developers and administrators, or when administering a complex project, is good to keep system files in a version control system that allows files to be checked out, editted, and checked back in to the production system. This process allows one to backtrack to previous versions if there is a problem, and prevents multiple people from checking in a file. The Atlas uses  Subversion to do this. One can use this system to version-control data; however, the size of spatial data files can make this process cumbersome. Assuming your developer has installed Subversion to manage MapServer?-related system files on your production server, you should then  install subversion. After that, there are several useful commands to know for your command-line:

Code Code-glishComment
svn help Subversion: tell me all your commands
svn command-hSubversion: tell me how to use this command
svn co svn://your.url.here/ProjectName--username=name Subversion: check-out this project from this URL under my username This is a good first step. This sucks all the files in the project, and puts them into the current directory
svn ci name.ext-m "message"Subversion: check-in this file found in the current directory back into production, and note this message This is how you apply updates
svn add name.ext Subversion: add this file found in the current directory into svn databaseThis is how you introduce Subversion to a new file. This does not add the file into production. Once you've added a file, you'll likely want to check it in.
svn export here thereSubversion: export the files/directories in this directory to there Resultant copy will not be under Subversion control
svn upSubversion: update my local copiesThis updates your local files, thus ensuring you have all the recent changes
svn del oldfile.ext-m "message"Subversion: delete this file found in the current directory , and note this message
production server#: svn upSubversion in production server: take all the files that have been checked in, and update the production filesThis is the final step after checking in a bunch of changes. Note that you must be logged into your production server to do this

Troubleshooting

Sometimes, Subversion isn't running on the server. You will see errors refering to a refused connection. Fix this by logging into mapserver, then starting Subversion with the following commandline:

svnserve -d -r /var/svn/mapserver.planyukon.ca

See also ticket #206 (hint: type #206 in the Trac search box)

MS4W

MS4W means "MapServer? for Windows". This is a whole package of components that lets you run MapServer? (and Apache, php, ...) on your Windows machine. It is a good idea to test updates and additions to the Atlas in a testing environment that this package can help set up. It is supposed to pretty straight-forward to download and install, but is a bit tricky if you want to emulate an existing MapServer? installation, like the Atlas. Look for README_INSTALL.html. The simplest way to provide data to the testing environment is to copy the spatial data to a local directory near the root of your hard drive. System files will be provided by Subversion.

Trouble-Shooting

If you already have an instance of Apache running (eg in OSGeo4W), you should uninstall it before deleting the rest of the files (eg the OSGeo4W folder):

  • At a DOS prompt, navigate to the Apache bin directory, and execute the command "apache -k uninstall".

If you deleted the files, before uninstalling apache, there will be an Apache service still running. To remove:

  • Check if the Apache service is running: Start>Control Panel>Administrative Tools>Services--> Look for the specific name of the apache service (if present)
  • At a DOS prompt: httpd -k uninstall -n "MyServiceName"

There are four configuation files that need to be configured in concert for things to work correctly. Most configurations involve modifying paths to match your desktop or modifying things to work in windows (e.g. adding .exe to an executable, or changing / to \).

  • httpd.conf
  • config.inc.php
  • template.ref
  • layer_list.phtml

Trac

When working in a team of several developers and administrators, or when administering a complex project, is good to keep track of all the tasks fixes that are required, and who will do them. The  Trac Project provides a good web-based framework for building a wiki (like this one), and for administering a ticket system, where "tickets" are given to team-members that describe an assigned task, and its current state. Login priviledges are needed to view these.

WinSCP

This software for windows machines acts as a GUI for file transfers between a windows machine and a Linux machine (like Mapserver). Some tasks are still easier using command-line (in Putty), but WinSCP makes file management easy.

pgAdmin III

Much of the functionality of the Atlas is supported by a PostgreSQL database (e.g. user privileges, the rest of the admin interface). pgAdmin III is an administrative client for PostgreSQL, but I don't understand it. I'd just as soon log onto Mapserver using PuTTY, and try to run it through command line. See:  http://www.postgresql.org/docs/8.0/static/index.html

Command Command-glishComment
psql -d info -U user start PostgrSQL database named info as user
\d list all the tables in the database