Installing Apache/Mapserver/PHP/Mapscript on linux (installing FGS)
From Ka-Map Wiki
If you don't already have a working Mapserver running on your linux system then FGS (FOSS GIS Suite) is likely your best bet. It will easily install a standalone Apache server with Mapserver and PHP already working. Read about it at http://www.maptools.org/fgs/
Installing FGS should be as simple as the following:
- Download http://www.maptools.org/dl/fgs/self-installers/fgs-mapserver_phpmapscript_4.8.2-1.2-linux-i386.bin
- cd to the directory which contains the newly downloaded fgs-mapserver_phpmapscript_4.8.2-1.2-linux-i386.bin
- sudo +x fgs-mapserver_phpmapscript_4.8.2-1.2-linux-i386.bin
- ./fgs-mapserver_phpmapscript_4.8.2-1.2-linux-i386.bin
- Follow the directions in the install progrram.
Note: A popular place to install FGS is at /opt/fgs. Or you could do it in your home directory. - I believe that the install script will detect if you already have a web server running and will default to an unused port number. If you do have a server already running on port 80 them make sure you give the installer an unused port.
- echo ". /opt/fgs/setenv.sh" >> ~/.bashrc
- /opt/fgs/www/bin/apachectl start
That should do it. You should now be able to add all your web content to /opt/fgs/www/htdocs, including PHP files.
Now, to install ka-Map check out: Preparing ka-Map
If apache won't start...
Running that last script didn't work when I tried it on my Ubuntu distro... if you get the error message: Invalid command '-e', perhaps mis-spelled or defined by a module not included in the server configuration do this:
- edit /opt/fgs/www/conf.d/mapserver.conf and simply erase the "-e" from the beginning of the line. It should instead simply read: Alias /ms_tmp/ "/opt/fgs/tmp/ms_tmp/"
I also got the error that there was no group called apache. Simply creating a group called apache did the trick.
Please feel free to add your solutions to problems you encountered while installing FGS.

