Diferenças
Aqui você vê as diferenças entre duas revisões dessa página.
| Ambos lados da revisão anteriorRevisão anteriorPróxima revisão | Revisão anterior | ||
| software:art:install [2007/12/11 01:22] – paulojus | software:art:install [2007/12/11 19:10] (atual) – paulojus | ||
|---|---|---|---|
| Linha 1: | Linha 1: | ||
| ====== Setup and Linux Install ====== | ====== Setup and Linux Install ====== | ||
| - | Here there are how to install from an " | + | Here there are how to install from an " |
| + | We will also assume you have '' | ||
| + | |||
| + | ==== Installing the R software ==== | ||
| + | |||
| + | 1. Add the R repository in the '' | ||
| + | 1.1 Open the file:\\ | ||
| $ sudo su - | $ sudo su - | ||
| root$ vim / | root$ vim / | ||
| - | Adicione no arquivo sources.list a linha do repositório do R:\\ | + | 1.2 Add the repository by including the following line to the '' |
| - | + | deb http:// | |
| - | | + | |
| - | Agora instale as chaves do repositório do R para o Ubuntu | + | 1.3 Install the keys (Ubuntu |
| root$ gpg --keyserver subkeys.pgp.net --recv-key E2A11821 | root$ gpg --keyserver subkeys.pgp.net --recv-key E2A11821 | ||
| root$ gpg -a --export E2A11821 | sudo apt-key add - | root$ gpg -a --export E2A11821 | sudo apt-key add - | ||
| root$ apt-get update | root$ apt-get update | ||
| - | Neste pondo pode-se voltar ao usuário com permissões de sudo | + | 1.4 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 | ||
| - | | + | ==== Install other tools ==== |
| - | $ sudo 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 | + | root$ sudo apt-get install g++ libpq-dev gfortran |
| - | $ wget http:// | + | |
| - | $ unzip install-aRT-dep.zip | + | |
| - | $ sudo ./ | + | |
| - | Este último passo deve demorar bastante! | + | ==== Get the tools to install aRT dependencies ==== |
| + | This includes installing a '' | ||
| + | root$ wget http:// | ||
| + | root$ unzip install-aRT-dep.zip | ||
| + | root$ sudo ./ | ||
| 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. \\ | 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 " | + | **Nota:** Na instalação é pedida a senha de " |
| + | The last step takes a long time compiling '' | ||
| Ainda neste último passo, após a atualização dos programas do Ubuntu é automaticamente feita o download e compilação do TerraLib/ | Ainda neste último passo, após a atualização dos programas do Ubuntu é automaticamente feita o download e compilação do TerraLib/ | ||
| - | A seguir faça crie o link simbólico | + | If **terralib/ |
| + | make[1]: Saindo do diretório `/ | ||
| - | | + | Then create a symbolic link to call the **terraView** application\\ |
| - | $ source / | + | root$ sudo ln -s / |
| - | Inicie o R como sudo e instale pacotes necessários | + | If you see the mesage:\\ |
| + | ./ | ||
| - | | + | Then add the enviroment variable manually by adding the folowwing lines to your ''/ |
| + | TERRALIBDIR=/ | ||
| + | LD_LIBRARY_PATH=$TERRALIBDIR/ | ||
| + | export LD_LIBRARY_PATH | ||
| - | Na linha de comando do R ( > ) digite: | + | and load the environmental variables with: (new user sessions will load this automatically): |
| + | root$ source / | ||
| + | ==== Installing R packages: aRT and sp ==== | ||
| + | Start R:\\ | ||
| + | root$ R | ||
| + | |||
| + | At the R prompt '' | ||
| > install.packages(" | > install.packages(" | ||
| > install.packages(" | > install.packages(" | ||
| - | E para instalar | + | ==== 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(" | > install.packages(" | ||
| > require(ctv) | > require(ctv) | ||
| - | > install.views(" | + | > install.views(" |
| + | |||
| + | Quit R with: | ||
| + | > q(save=T) | ||
| + | ==== MySQL setup === | ||
| + | Start the BDMS with '' | ||
| + | root$ mysql -u root -p | ||
| - | Para dar privilégions totais | + | You will be prompt for the DBMS root password. After typing it in you will the the mysql prompt '' |
| + | mysql> grant all privileges on *.* to aluno@localhost ; | ||
| + | mysql> quit | ||
| - | - Inicie o mysql na linha de comando | + | 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 '' |
| - | | + | ==== Testing the installation ==== |
| + | To check whethr the installation above is working well go to a " | ||
| + | aluno$ R | ||
| - | - No '' | + | Loading the aRT package, |
| + | > require(aRT) | ||
| - | > grant all privileges on *.* to aluno@localhost | + | you will see to following in the R screen:\\ |
| + | Carregando pacotes exigidos: aRT | ||
| + | Carregando pacotes exigidos: sp | ||
| + | |||
| + | --------------------------------------------- | ||
| + | R-TERRALIB API | ||
| + | aRT version 1.4-2 (2007-12-07) is now loaded | ||
| + | --------------------------------------------- | ||
| + | Now try to connect the DBMS: \\ | ||
| + | > con <- openConn() | ||
| + | > con | ||
| + | Object of class aRTconn | ||
| + | | ||
| + | DBMS: " | ||
| + | User: " | ||
| + | Password: "" | ||
| + | Port: 3306 | ||
| + | Host: "" | ||
| + | If this works then **great**!! You are ready to use aRT. You can experiment woth several example scripts at the [[http:// | ||
| + | > vignette(package=" | ||
| + | Vignettes in package ' | ||
| + | aRTconn | ||
| + | aRTintro | ||
| + | aRTsp | ||
| + | aRTtable | ||