linux.html
6.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta charset="UTF-8"><title>Gerando links com parâmetros de inicialização</title>
<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"><a href="javascript:window.history.go(-1)"><img title="Início" style="border: 0px solid ; width: 40px; height: 40px;" alt="inicio" src="files/voltar.gif"></a><a href="index.html#inicio_usando"><img title="Início" style="border: 0px solid ; width: 40px; height: 40px;" alt="inicio" src="files/inicio.gif"></a></div>
<h1>Instalando i3GeoSaúde
no Linux</h1>
<a name="inicio"></a>
<br>
<b style="font-weight: normal;" id="docs-internal-guid-51b67ffa-b398-fb7b-c0ef-9f5ab4489ca6"><span style="font-size: 15px; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline;">A
instalação do i3GeoSaúde no Linux
presume que a
distribuição linux tenha o Advanced
Packaging Tool
(APT). O apt já está presente em
distribuições Debian e suas variantes, como
ubuntu e
xubuntu.<br>
<br>
Este processo de instalação foi testado no Ubuntu
13.04 e
no Xubuntu 13.04.</span></b><span style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; background-color: rgb(255, 255, 255); display: inline ! important; float: none;"><br>
</span><br>
<a href="#inst_dep">Instalação
das depêndencias</a><br>
<a href="#inst_geo">Instalação
do i3GeoSaúde</a><br>
<a href="#cri_bd">Criando o
banco de dados do i3GeoSaúde</a><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><span style="font-weight: bold;"></span></h1>
<h1><a name="inst_dep"></a></h1>
<h1><b style="font-weight: bold;" id="docs-internal-guid-22cb9c47-b38d-75ad-851f-fffad3b8d822">Instalação
das depêndencias</b><span style="font-weight: bold;"> </span></h1>
</div>
<div class="trail-box-content"><span style="font-weight: bold;"></span>1.
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> php5-curl php5-dev php5-gd php5-mapscript php5-odbc php5-pgsql<br> 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;"> </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>
<br>
<br>
</div>
</div>
</div>
</body></html>