Kompilasi dan Instalasi Grass 6 di Linux (Centos 5.4)

Catatan : Dikompilasi dari berbagai sumber, terutama dari http://grass.itc.it/ dan http://en.wikipedia.org/wiki/GRASS_GIS

General requirements:

(most  tools are standard tools on Linux, for other platforms you may have to install some of them.)

  • C-compiler (cc, gcc, egcs, …)

gcc: http://www.gnu.org/software/gcc/gcc.html

  • GNU make is recommended

http://www.gnu.org/software/make/make.html

  • zlib compression library (already installed on most modern systems)

It is used to internally compress GRASS raster maps:

libz: http://www.gzip.org/zlib

  • flex lexical analyzer generator (flex) – note: lex is no longer supported, please use flex instead:

flex: http://www.gnu.org/software/flex/flex.html

  • parser generator (yacc, bison)

bison: http://www.gnu.org/software/bison/bison.html

  • libncurses4.x/5.x (already installed on modern systems)

http://www.gnu.org/software/ncurses/ncurses.html

ftp://ftp.gnu.org/pub/gnu/ncurses

  • X Window system for graphical output, development libraries (X development libraries, in some linux distributions they are separate packages, e.g. xlibs-dev or x11-server-devel)

http://www.xfree.org; http://www.x.org

winGRASS note: As alternative a generic MS-Windows driver is under construction which does not require X11

  • PROJ4 – Projection Library

http://proj.maptools.org

  • GDAL and OGR for import and export of most external raster and vector map formats

http://www.gdal.org

Optional requirements:

  • Tcl/Tk 8.x libraries (including the ‘wish’ program) to use the GRASS GUI menu system and the NVIZ visualization suite. Some features of the new gis.m GIS manager may depend on version 8.4 or newer. see http://tcl.sourceforge.net
  • If hardware openGL support is missing in the X Server, Mesa-3.x (openGL clone) may be required for NVIZ. http://mesa3d.sourceforge.net
  • C++ Compiler (required for the r.terraflow module)

gcc: http://www.gnu.org/software/gcc/gcc.html

  • FFTW 2.x or 3.x (library for computing the Discrete Fourier Transform), required for i.fft and i.ifft and other modules . See http://www.fftw.org
  • LAPACK / BLAS (libraries for numerical computing) for GMATH library (GRASS numerical lib)

http://www.netlib.org/lapack.  (usually available on Linux distros)

Note: LAPACK/BLAS support is intended for future module implementations, no need to use it at time!

  • libpng (for r.out.png and the PNG driver), usually already installed.

http://www.libpng.org/pub/png/libpng.html

  • libjpeg (for r.out.tiff), usually already installed.

http://www.ijg.org

ftp://ftp.uu.net/graphics/jpeg

  • libtiff (for r.out.tiff), usually already installed.

http://www.libtiff.org

  • readline for extra command prompt functionality

http://tiswww.case.edu/~chet/readline/rltop.html

ftp://ftp.gnu.org/gnu/readline/

  • PostgreSQL libraries (for the PostgreSQL database interface)

http://www.postgresql.org

  • mySQL libraries (for the mySQL database interface)

http://www.mysql.org

  • sqlite libraries (for the sqlite database interface)

http://www.sqlite.org

  • unixODBC (for the ODBC database interface)

http://www.unixodbc.org

  • Motif or Lesstif libraries (for the “xganim” module)

http://www.lesstif.org

  • R language (for the R statistical language interface)

Catatan : library readline dan readline devel sudah harus terinstall.

http://cran.r-project.org

  • FreeType2 (for TrueType font support and d.text.freetype)

http://www.freetype.org

  • Python >= 2.4 (for new wxPython GUI and SWIG interface)

Note: Python 3 is not supported

http://www.python.org

  • wxPython >= 2.8.1.1 for wxPython-based GUI (see file gui/wxpython/README)

http://www.wxpython.org

  • NumPy for wxPython-based GUI tools (see file gui/wxpython/README)

http://numpy.scipy.org , sudah di install.

Catatan :

-          [root@noname download] tar –xvf  numpy-1.4.0.tar.gz

-          [root@noname download] cd numpy-1.4.0

-          [root@noname numpy-1.4.0] python setup.py build –fcompiler=gnu

  • FFMPEG (for direct rendering of animations from NVIZ), including libavcodec, libavformat, libswscale

http://ffmpeg.mplayerhq.hu

  • Cairo (Cairo graphics library, Version >= 1.5.8)

Catatan : PAda centos 5.4, yang sudah terinstall adalah versi yang ada 1.2 dan bisa digunakan

http://cairographics.org

  • AVCE00 and E00Compr Libraries (avcimport)

http://avce00.maptools.org/

Catatan instalasi  :

tar -xvf e00compr-1.0.1.tar.gz

cd tar -xvf e00compr-1.0.1

make

tar -xvf avce00-2.0.0.tar.gz

cd avce00-2.0.0

make

[Kemudian copy file executable ke direktori,missal /usr/local/e00; kemudian tambahkan  environment path  pada file /root/.bash_profile seperti berikut /usr/local/avce00_e00:]

Catatan Tentang Library:

Disarankan untuk menjalankan perintah update sebelum menginstall library yang diperlukan ( di CentOS dengan mengetikkan perintah “ yum –y update”), kemudian juga install versi developnya untuk tiap library misalkan untuk tcl gunakan perintah “ yum –y intstall tcl tcl-devel” untuk menginstal library tcl dan tcl-devel. Untuk mengetahui apakah suatu library sudah terinstal atau belum gunakan perintah “rpm –qa|grep nama_library

Installation order:

1. PROJ4

2. GDAL-OGR  (compiled without GRASS support)

3. optionally: databases such as PostgreSQL, MySQL, sqlite

4. GRASS

5. optionally: GDAL-OGR-GRASS plugin

Contoh Instalasi Grass di CentOS 5.4 :

[root@noname grass-6.3.0]# ./configure –with-jpeg –with-tiff –with-png –with-tcltk –with-postgres –with-opengl –with-fftw –with-blas –with-lapack –with-cairo –with-freetype –with-gdal=/usr/local/bin/gdal-config –with-wxwidgets=/usr/bin/wx-config –with-python=/usr/local/bin/python2.5-config –with-includes=/usr/local/include –with-libs=/usr/local/lib –with-zlib-libs=/usr/lib –with-tiff-libs=/usr –with-tcltk-libs=/usr/lib –with-tcltk-includes=/usr/include –with-postgres-includes=/usr/include/pgsql –with-fftw-includes=/usr/local/include –with-fftw-libs=/usr/local/lib –with-opengl-libs=/usr/lib –with-opengl-includes=/usr/include/GL –with-blas-libs=/usr/lib –with-lapack-libs=/usr/lib –with-cairo-includes=/usr/include/cairo –with-cairo-libs=/usr/lib –with-freetype-includes=/usr/include/freetype2 –with-freetype-libs=/usr/lib –with-proj-includes=/usr/include –with-proj-libs=/usr/lib –with-proj-share=/usr/share/proj –enable-largefile

[root@noname grass-6.3.0]#make

Pada bagian paling akhir, akan diinformasikan pada bagian/modul grass mana yang error. Cek error tersebut apakah terkait dengan library tertentu dan install libraay yang diperlukan. Jika sudah maka masuk ke direktori /folder yang error kemudian ketik “make” maka grass akan mengkonfigurasi ulang khusus pada bagian yang error tersebut.  Contoh sebagai berikut :

…………………………………………………

………………………………………………….

…………………………………………………..

cp -f AUTHORS COPYING CHANGES REQUIREMENTS.html GPL.TXT /tmp/sharing_linux/grass-6.3.0/dist.i686-pc-linux-gnu/

cp -f /tmp/sharing_linux/grass-6.3.0/bin.i686-pc-linux-gnu/grass63 /tmp/sharing_linux/grass-6.3.0/dist.i686-pc-linux-gnu/grass63.tmp

build_html_index.sh

Generating HTML manual pages index (help system)…

Generated HTML docs in ../dist.i686-pc-linux-gnu/docs/html/index.html

———————————————————————-

Following modules are missing the ‘description.html’ file in src code:

———————————————————————-

GRASS GIS compilation log

————————-

Started compilation: Tue Feb  9 13:41:13 WIT 2010

Errors in:

/tmp/sharing_linux/grass-6.3.0/visualization/nviz

In case of errors please change into the directory with error and run ‘make’.

If you get multiple errors, you need to deal with them in the order they

appear in the error log. If you get an error building a library, you will

also get errors from anything which uses the library.

Finished compilation: Tue Feb  9 13:50:22 WIT 2010

make: *** [default] Error 1

[root@noname grass-6.3.0]# cd visualization/nviz

[root@noname nviz]# make

[root@noname grass-6.3.0]# make install

……………………………………………………………

……………………………………………………………

……………………………………………………………

chmod -R a+rX /usr/local/grass-6.3.0 2>/dev/null

tar cBf – gem/skeleton | (cd /usr/local/grass-6.3.0/etc ; tar xBf – ) 2>/dev/null

/usr/bin/install -c  gem/gem6 /usr/local/bin 2>/dev/null

make[1]: Leaving directory `/tmp/sharing_linux/grass-6.3.0′

[root@noname grass-6.3.0]#

[root@noname grass-6.3.0]# grass63

WELCOME TO GRASS              Version 6.3.0         2008

1) Have at your side all available GRASS tutorials

2) When working on your location, the following materials

are extremely useful:

- A topo map of your area

- Current catalog of available computer maps

3) Check the GRASS webpages for feedback mailinglists and more:

http://www.grass-gis.org

http://grass.osgeo.org

Hit RETURN to continue

Starting GRASS …

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.