Install from cd Fedora :
- Apache
- MySql
- LibGD
- LibPNG
- LibGif
- LibJPEG
download all requirement files :
3. Postgresql (
http://www.postgresql.org/ )
is a highly scalable, SQL compliant, open source object-relational database management system.
5. PHP (
http://www.php.net )
is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
Installing :
1. GDAL
extract source file, go to source directory and type :
./configure
make all
make install
2. PROJ4
# extract source file, go to source directory and type :
./configure
make all
make install
3. Postgresql
# extract source file, go to source directory and type :
./configure --with-perl LDFLAGS=-lstdc++
gmake
gmake check
gmake install
useradd postgresql
su - postgres
# in postgres shell :
/usr/local/pgsql/bin/initdb -D /directory/postgre-database
/usr/local/pgsql/bin/postmaster -D /directory/postgre-database >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
/q
exit
# copy directory postgis into /postgresql-source-dir/contrib/
# example :
cp -R postgis-0.7.5 postgresql-7.3.4/contrib/
cd postgresql-7.3.4/contrib/postgis-0.7.5
# if you want to enable PROJ4 , edit the Makefile to enable it
gmake
gmake install
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH
PATH=/usr/local/pgsql/bin:$PATH
export PATH
MANPATH=/usr/local/pgsql/man:$MANPATH
export MANPATH
/sbin/ldconfig /usr/local/pgsql/lib
cp /postgresql-source-dir/contrib/start-scripts/linux /etc/init.d/postgresql
# edit /etc/init.d/postgresql matching your database instalation.
chmod +x /etc/init.d/postgresql
chkconfig --add postgresql
# edit postgresql.conf to enable tcp/ip connection
# start postgresql
/etc/init.d/postgresql start
su - postgres
/usr/local/pgsql/bin/createlang plpgsql test
/usr/local/pgsql/bin/psql -f /usr/local/pgsql/share/contrib/postgis.sql test
/usr/local/pgsql/bin/psql -f /usr/local/pgsql/share/contrib/spatial_ref_sys.sql test
4. PHP
# extract source file, go to source directory and type :
./configure --with-mysql --with-pgsql --with-gd --with-jpeg-dir=/usr/ --with-png-dir=/usr/ --with-freetype-dir=/usr/ --enable-gd-native-ttf --with-regex=system --enable-dbase --enable-calendar --enable-ftp --with-zlib --enable-bcmath --with-gettext=/usr/ --with-mysql-sock=/var/lib/mysql/mysql.sock
make all
make install
cp /php-source-dir/php.ini-dist /usr/local/lib/php.ini
5. Mapserver
./configure --with-gdal=/usr/local/bin/gdal-config --with-ogr=/usr/local/bin/gdal-config --with-php=replace-with-php-source-dir/ --with-gd=/usr/ --with-postgis=/usr/local/pgsql/bin/pg_config --with-wmsclient
make all
ln -s /usr/local/lib/libgdal.so.1 /usr/lib/libgdal.so.1
mkdir /usr/local/lib/php/extensions
cp /mapserver-source-dir/mapscript/php3/php_mapscript.so /usr/local/lib/php/extensions/php_mapscript.so
cp /mapserver-source-dir/mapserv /var/www/cgi-bin/mapserv
6. Edit Your php.ini
extension_dir = "/usr/local/lib/php/extensions/"
enable_dl = "on"
#on Dynamic Extension , add :
extension = php_mapscript.so
7. Edit Your httpd.conf
ScriptAlias /php/ "/usr/local/bin/"
AddType application/x-httpd-php .php4 .php3 .phtml .php
Action application/x-httpd-php /php/php
6. end