Essa é uma revisão anterior do documento!
Tabela de conteúdos
Setup and Linux Install
Here there are how to install from an "fresh" linux installation. Here we assume an Ubuntu (gutsy)
installation but and appropriate changes should be done for other Linux "flavors".
We will also assume you have root
access to the system, altough many instructions can also use sudo
Installing the R software
- Add the R repository in the
source.list
(alternativelly you may use the synaptic tool).
- Open the file:
$ sudo su -
root$ vim /etc/apt/sources.list - Add the repository by including the following line to the ''source.list'' file\\ deb http://cran.r-project.org/bin/linux/ubuntu gutsy/ - Install the keys (Ubuntu specific)\\ root$ gpg --keyserver subkeys.pgp.net --recv-key E2A11821 root$ gpg -a --export E2A11821 | sudo apt-key add - root$ apt-get update - Install R root$ apt-get install r-base r-base-core r-base-html r-base-latex r-doc-html r-doc-info r-doc-pdf r-recommended
2. Install other tools
root$ sudo apt-get install g++ libpq-dev gfortran xemacs21 ess
3. Get the tools to install **aRT** dependencies
This includes installing a MySQL
data base and compiling TerraLib
root$ wget http://www.leg.ufpr.br/aRT/install-aRT-dep.zip root$ unzip install-aRT-dep.zip root$ sudo ./install-aRT-dep.sh --add-system-variables
Neste ultimo passo uma série de programas do Ubuntu foram atualizados e/ou instalados. (Clicar em (S) qudo solicitado para instalar o programa). Em particular foi instalado o banco MySQL.
Nota: Na instalação é pedida a senha de "root" para o administrador do banco, que não é a mesma do sistema!
The last step takes a long time compiling Terralib
.
Ainda neste último passo, após a atualização dos programas do Ubuntu é automaticamente feita o download e compilação do TerraLib/TerraView (e isto demora MUITO!!!).
A seguir faça crie o link simbólico
$ sudo ln -s /usr/local/terralib/aplicativos/terraView/linux/terraView /usr/bin $ source /etc/bash.bashrc
Installing R packages: aRT and sp
Start R:
root$ R
At the R prompt ( > )
type the following commands to install the packages sp
and aRT
. aRT
depends on sp
since uses the representation of spatial objects defined by this package.
> install.packages("sp", dep=T, repos="http://cran.fiocruz.br/") > install.packages("aRT", contrib="http://www.leg.ufpr.br/aRT")
Installing other R Spatial packages
You may wish to install other Spatial packages from the R-PROJECT. Required packages can be installed individually or the entire CRAN SPATIAL Task View can be installed as follows from the R prompt.
> install.packages("ctv", dep=T, repos="http://cran.fiocruz.br/") > require(ctv) > install.views("Spatial") ## takes a loooooog time
Quit R with:
> q(save=T)
MySQL setup
Start the BDMS with root
(DBMS root, not system root!!!) permissions from the linux prompt with:
root$ mysql -u root -p
You will be prompt for the DBMS root password. After typing it in you will the the mysql prompt (mysql >)
. To grant full privileges to a MySQL user (aluno
in the example below) type:
> grant all privileges on *.* to aluno@localhost
Other user and permissions can be set. However we will use aRT tools to do this!!! Even the above instructions could be se from aRT (using the aRT function addPermissions()
) if the DBMS root pasword is available.