Monday, February 10, 2014

basic linux mapserver installation

Basic CEntOS - configuration
swap = 8000
boot = 2000
/    = maximum
selinux = disabled
gnome
kde

-CheckServer name
vi /etc/hosts
AddServerNameHere localhost.localdomain localhost

vi /etc/sysconfig/network
HOSTNAME=PutservernameHere

-HTTP INSTALLATION-------------------
Install httpd 2.0.55
tar -zxvf httpd 2.0.55.tar.gz
cd httpd 2.0.55
./configure --prefix=/usr/local/apache2/ --enable-rewrite --enable-deflate --enable-info --enable-mime-magic --enable-rewrite --enable-so --enable-speling --enable-ssl --with--ssl=/usr/include/openssl --enable-unique_id --enable-usertrack --with-mpm=prefork

make
make install
./apachectl start
cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd

---Put this on top---
# chkconfig: 35 80 15
# processname: httpd
# description: httpd

7. /sbin/chkconfig --add httpd

if error appear like---httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
go to /usr/local/apache2/conf
and edit httpd.conf
look for the ServerName then change it to ServerName 127.0.0.1
-----------------------------------------------------


 MySQL-5.6.13
if error appears - 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
rm -rf /var/lib/mysql/server.pcpartsadvice.com.pid


-MYSQL-----------------------------------------------
rpm -ivh MySQL-client-xxxxxxx
rpm -ivh MySQL-devel-xxxxxxx
rpm -ivh MySQL-server-xxxxxxx
rpm -ivh Perl-xxxxxxxxxxx
rpm -ivh MySQL-shared-xxxxxxx

###add a root password by issuing this
/usr/bin/mysqladmin -u root password 'new password'

to access MySQL type
mysql -uroot -p

use mysql;
mysql> grant all privileges on *.* to lbs@'yourservername' identified by "tracking";
mysql> grant all privileges on *.* to lbs@localhost identified by "tracking";
mysql> grant all privileges on *.* to lbs@'%' identified by "tracking";
mysql> update user set password=old_password("tracking") where user = "lbs";
mysql> flush privileges;
mysql> select user,password,host from user;
+------+-------------------------------------------+-----------+
| user | password                                  | host      |
+------+-------------------------------------------+-----------+
| root | *985A26A1C567A00FE382623FFF34E95E461FB7AB | localhost |
| root |                                           | ronda2    |
| root |                                           | 127.0.0.1 |
|      |                                           | localhost |
|      |                                           | ronda2    |
| lbs  | 6ae01b415f45d564                          | ronda2    |
| lbs  | 6ae01b415f45d564                          | localhost |
| lbs  | 6ae01b415f45d564                          | %         |
+------+-------------------------------------------+-----------+

mysql> delete from user where password = "";
Query OK, 4 rows affected (0.00 sec)

mysql> select user,password,host from user;
+------+-------------------------------------------+-----------+
| user | password                                  | host      |
+------+-------------------------------------------+-----------+
| root | *985A26A1C567A00FE382623FFF34E95E461FB7AB | localhost |
| lbsa  | 6ae01b415f45d564                          | localhost |
| lbsa | 6ae01b415f45d564                          | %         |
+------+-------------------------------------------+-----------+


-COLDFUSION INSTALLATION-----------------------------
./coldfusion-61-lin.bin
press enter
Yes to eula
Is there already a version of Macromedia ColdFusion MX installed on this computer?
Select no
Choice 1 enter
Coldfusion SN : 600-18040-87264-92597
CED
 Is there a version of ColdFusion 4.5 or 5 installed on this computer? (Y/N)
- Select no
Cf start on boot select Yes
press enter

To continue with your installation,
go to /opt/coldfusionmx/bin and type
"./coldfusion start" to start your server.
go to /opt/coldfusionmx/bin/connectors
then run sh apache_connectors.sh

to start coldfusion
/etc/init.d/coldfusionmx start

check browser
http://machinename:8500/CFIDE/administrator/index.cfm
eq http://127.0.0.1:8500/CFIDE/administrator/index.cfm

-PHP INSTALL-------------------------------------------
copy the file php-5.0.5.tar.gz
untar it
tar -zxvf php-5.0.5.tar.gz
cd php-5.0.5
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
make
make install
cp php.ini-dist /usr/local/lib/php.ini

Edit your httpd.conf to load the PHP module.  The path on the right hand
    side of the LoadModule statement must point to the path of the PHP
    module on your system.  The make install from above may have already
    added this for you, but be sure to check.

    For PHP 5:

      LoadModule php5_module modules/libphp5.so

15. Tell Apache to parse certain extensions as PHP.  For example,
    let's have Apache parse the .php extension as PHP.  You could
    have any extension(s) parse as PHP by simply adding more, with
    each separated by a space.  We'll add .phtml to demonstrate.

          AddType application/x-httpd-php .php .phtml

    It's also common to setup the .phps extension to show highlighted PHP
    source, this can be done with:

     AddType application/x-httpd-php-source .phps

restart httpd
/etc/init.d/httpd restart

create php page
vi /usr/local/apache2/htdocs/test.php

<? phpinfo()?>

MAP SERVER INSTALL 2010
before installation type "su -l" to get bash profile information

1. Install libjpeg.
-rpm -ivh libjpeg-devel-6b-33.i386.rpm

2. tar -zxvf libpng-1.2.25.tar.gz
cd libpng-1.2.25
./configure
make
make install

3. tar -zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure
make
make install

4. tar -zxvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
./configure
make
make install

5. tar -zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure
make
make install

6. tar -zxvf proj-4.6.0.tar.gz
cd proj-4.6.0
./configure
make
make install

7.tar -jxvf geos-3.0.0rc2.tar.bz2
cd geos-3.0.0rc2
./configure --prefix=/usr/local
make
make install
 

8. tar -zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure
make
make install

9. tar -zxvf tiff-3.7.0.tar.gz
cd tiff-3.7.0
./configure
make
make install

10. tar -zxvf gdal-1.5.1.tar.gz
cd gdal-1.6.3
./configure --with-jpeg \
--with-gd \
--with-freetype \
--with-png \
--with-ogr \
--with-proj \
--with-gdal \
--with-httpd=/usr/local/apache2 \
--with-tiff \
--with-geos=/usr/local/bin/geos-config \
--enable-debug \
--with-gif \
--with-mysql \
--with-php-- \
--with-libtiff \
--with-static-proj4=/usr/local/bin
make
make install

11. tar -zxvf mapserver-5.0.3.tar.gz
cd mapserver-5.0.3
 ./configure \
--with-httpd=/usr/local/apache2/bin/httpd \
--with-gd=/usr/local \
--with-jpeg=/usr/local \
--with-png=/usr/local \
--with-png-dir=/usr/lib \
--with-zlib=/usr/local \
--with-gdal=/usr/local/bin/gdal-config \
--with-ogr=/usr/local/bin/gdal-config \
--with-proj=/usr/local \
--with-curl-config=/usr/bin/curl-config \
--with-config-file-path=/usr/local/include/php \
--with-php=/usr/local/include/php \
--with-freetype \
--with-geos \
--with-wfs \
--with-wmsclient \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-dbase \
--enable-soap \
--enable-so \
--with-pear \
--with-mysql


make

make install
cp -rf mapserv /usr/local/apache2/cgi-bin/

12. vi /etc/ld.so.conf
Add the following lines:
/usr/local/include
/usr/local/lib
save and run
ldconfig -v

13. cp the ff:
cp legend scalebar shp2img shp2pdf shptree shptreetst shptreevis sortshp tile4ms /usr/local/apache2/cgi-bin/

14. cp mapscript/php3/php_mapscript.so /usr/local/apache2/modules/

######################################
15. edit vi /root/.bash_profile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib

16. cd /usr/local/apache2/cgi-bin/
cp mapserv mapserv5

./mapserv -v

to test if working
copy to htdocs fonts/symbols/openlayers-2.9/strategy_test
also copy mapsfinal tabs
and add database to cfmx

create database strategydb
mysqldump -ulbs -p -h192.168.1.14 strategydb > strategydb.dump
to create db from dump make sure you have the dump file
and a database named strategydb then
mysql -ulbs -p strategydb < strategydb.dump

how to bluedragon
# linux

dl mysql-connector-java-3.0.17-ga.tar.gz

unzip mysql-connector-java

copy mysql-connector-java.jar to bluedragon_path/lib/mysql.jar

restart bluedragon
create datasources

vi /etc/init.d/BlueDragon_Server and add the ff lines:

# chkconfig: 345 85 20
# processname: bluedragon
# description: bluedragon

write save. then from command add to chkconfig
> chkconfig --add BlueDragon_Server

to verify
> chkconfig --list BlueDragon_Server

type: setup
uncheck cups,sendmail,rpc


#win

install mysql odbc 3.51 driver

add system dsn

refresh bluedragon datasources

No comments:

Post a Comment