linux.html 5.48 KB
<!DOCTYPE html>
<html><head>
	<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
	<meta charset="UTF-8">
	<link media="screen" href="./files/estilos.css" type="text/css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="./files/estilos.css"></head>
<body class="blue-bg">

<div id="wrapper-flex">
<div style="background-color: white;">
<div class="f-page-auto-cell" id="doc">

<div class="imginicio"><img onclick="window.history.back()" style="border: 0px solid ; width: 40px; height: 40px;" alt="inicio" src="files/inicio.gif"></div>
<a name="inicio"></a>
<h1>Instalação no Linux</h1>

A
instalação do i3GeoSaúde no Linux
presume que a
distribuição linux tenha o&nbsp; Advanced
Packaging Tool
(APT). O apt já está presente em
distribuições Debian e suas variantes, como
ubuntu e
xubuntu.
<br>
Este processo de instalação foi testado no Ubuntu
13.04 e
no Xubuntu 13.04.<br><br>

<div class="trail-box">
<div class="trail-box-header"><img src="./files/trails-box-tr.png" class="right" alt="" height="21" width="7"><img src="./files/trails-box-tl.png" class="left" alt="" height="21" width="7">

<h1><b style="font-weight: bold;" id="docs-internal-guid-22cb9c47-b38d-75ad-851f-fffad3b8d822">Instalação
das depêndencias</b></h1>
</div>
<div class="trail-box-content"><span style="font-weight: bold;"></span>1.&nbsp;
Instale o Apache<br>
<pre>$ sudo apt-get install apache2 apache2-doc apache2-utils</pre>
<br>
2. Instale o Mapserver<br>
<pre>$ sudo apt-get install cgi-mapserver mapserver-bin</pre>
<br>
3. Instale o PostgreSQL/Postgis<br>
<pre>$ sudo apt-get install postgresql postgis postgresql-9.1-postgis</pre>
<br>
4. Instale o sqlite <br>
<pre>$ sudo apt-get install sqlite </pre>
<br>
5. Instale o R<br>
<pre>$ sudo apt-get install r-base r-base-core r-cran-maptools</pre>
<br>
6. Instale o PHP<br>
<pre>$ sudo apt-get install libapache2-mod-php5 php5 php5-common<br>&nbsp;php5-curl php5-dev php5-gd php5-mapscript php5-odbc php5-pgsql<br>&nbsp;php5-ps php5-xmlrpc php5-xsl php5-sqlite php5-imagick</pre>
<br>
7. Instale o subversion<br>
<pre>$ sudo apt-get install subversion</pre>
</div>
<div class="trail-box-bottom">
<img src="./files/trails-box-br.png" class="right" alt="" height="6" width="7"><img src="./files/trails-box-bl.png" class="left" alt="" height="6" width="7"></div>
</div>
<div class="trail-box">
<div class="trail-box-header"><img src="files/trails-box-tr.png" class="right" alt="" height="21" width="7"><img src="files/trails-box-tl.png" class="left" alt="" height="21" width="7">
<h1><span style="font-weight: bold;"></span></h1>
<h1><a name="inst_geo"></a></h1>
<h1>Instalação
do
i3GeoSaúde</h1>
</div>
<div class="trail-box-content"><span style="font-weight: bold;"></span>
Para este passo, é considerado que você possui uma
conta
no Portal do Software Público Brasileiro - SPB.<br>
<br>
Faça o checkout (baixar o código) do
i3GeoSaúde<br>
<pre>$ svn checkout <br>http://svn.softwarepublico.gov.br/svn/i3geo/subgrupos/i3geosaude/ /var/www</pre>
<br>
Dê permissão de escrita para o arquivo
i3geosaude/i3geo/admin/admin.db<br>
<pre>$ sudo chmod -R u=rw,g=rw,o=rw i3geosaude/i3geo/admin/admin.db</pre>
<br>
crie uma pasta ms_tmp dentro de /tmp<br>
<pre>$ sudo mkdir /tmp/ms_tmp</pre>
<br>
Altere as permissões da pasta ms_tmp<br>
<pre>$ sudo chmod -R u=rwx,g=rwx,o=rwx /tmp/ms_tmp</pre>
<br>
Crie um link simbólico dentro da pasta /var/www apontando
para
/tmp/ms_tmp<br>
<pre>$ sudo ln -s /tmp/ms_tmp /var/www/ms_tmp</pre>
</div>
<div class="trail-box-bottom"><img src="files/trails-box-br.png" class="right" alt="" height="6" width="7"><img src="files/trails-box-bl.png" class="left" alt="" height="6" width="7"></div>
</div>
<div class="trail-box">
<div class="trail-box-header"><img src="files/trails-box-tr.png" class="right" alt="" height="21" width="7"><img src="files/trails-box-tl.png" class="left" alt="" height="21" width="7">
<h1><span style="font-weight: bold;"></span></h1>
<h1><a name="cri_bd"></a></h1>
<h1>Criando
o banco de dados do
i3GeoSaúde<span style="font-weight: bold;">&nbsp;</span></h1>
</div>
<div class="trail-box-content"><span style="font-weight: bold;"></span>Primeiro,
é preciso alterar a senha do postgres, para isso;<br>
<pre>$ sudo su postgres</pre>
<pre>$ psql</pre>
<pre># ALTER USER postgres WITH PASSWORD ‘postgres’; \q</pre>
<br>
<span style="font-weight: bold;">Crie
o banco de dados</span><br>
<br>
<pre># createdb -E UTF8 i3geosaude</pre>
<pre># createlang -d i3geosaude plpgsql</pre>
<pre># psql -d i3geosaude -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql</pre>
<pre># psql -d i3geosaude -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_ss.sql</pre>
<pre># psql -d i3geosaude -c "GRANT ALL ON geometry_columns TO PUBLIC;"</pre>
<pre># psql -d i3geosaude -c "GRANT ALL ON geography_columns TO PUBLIC;"</pre>
<pre># psql -d i3geosaude -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"</pre>
<pre># /usr/bin/pg_restore --host localhost --port 5432 --username "postgres" --dbname "i3geosaude" 
--no-password --list "/var/www/databasei3geosaude.backup"</pre>
<br>
No seu navegador de preferência digite: http://localhost/ e
comece a trabalhar!!!
</div>
<div class="trail-box-bottom">
<img src="files/trails-box-br.png" class="right" alt="" height="6" width="7"><img src="files/trails-box-bl.png" class="left" alt="" height="6" width="7"></div>
</div>
<div class="imginicio"><a href="#top"><img title="Topo" style="border: 0px solid ; width: 41px; height: 35px;" alt="Topo" src="files/topo.gif"></a></div>
&nbsp;<br>
&nbsp;<br>
</div>
</div>
</div>
</body></html>