{"id":9793,"date":"2025-06-17T17:43:40","date_gmt":"2025-06-17T20:43:40","guid":{"rendered":"https:\/\/www.fernandoquadro.com.br\/html\/?p=9793"},"modified":"2025-06-18T14:56:26","modified_gmt":"2025-06-18T17:56:26","slug":"instalacao-do-geonode-no-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.fernandoquadro.com.br\/html\/2025\/06\/17\/instalacao-do-geonode-no-ubuntu-22-04\/","title":{"rendered":"Instala\u00e7\u00e3o do GeoNode no Ubuntu 22.04"},"content":{"rendered":"<p>Prezados leitores,<\/p>\n<p>Neste post irei apresentar como voc\u00ea pode instalar o GeoNode via Docker em uma m\u00e1quina rodando o Ubuntu Linux 22.04. Ao final dessa instala\u00e7\u00e3o voc\u00ea estar\u00e1 com uma inst\u00e2ncia do GeoNode executando no seu localhost.<\/p>\n<p>Sem enrola\u00e7\u00e3o, vamos aos passos:<\/p>\n<p><strong>1. Instalar os pacotes do S.O<\/strong><\/p>\n<pre>\r\n> sudo add-apt-repository universe\r\n> sudo apt-get update -y\r\n> sudo apt-get install -y git-core git-buildpackage debhelper devscripts python3.10-dev python3.10-venv virtualenvwrapper\r\n> sudo apt-get install -y apt-transport-https ca-certificates curl lsb-release gnupg gnupg-agent software-properties-common vim\r\n<\/pre>\n<p><strong>2. Adicionar os reposit\u00f3rios do Docker<\/strong><\/p>\n<pre>\r\n> sudo mkdir -p \/etc\/apt\/keyrings\r\n> curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/etc\/apt\/keyrings\/docker.gpg\r\n> sudo chmod a+r \/etc\/apt\/keyrings\/docker.gpg\r\n> echo \"deb [arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list > \/dev\/null\r\n<\/pre>\n<p><strong>3. Adicionar os pacotes do Docker<\/strong><\/p>\n<pre>\r\n> sudo apt-get update -y\r\n> sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose\r\n> sudo apt autoremove --purge\r\n> sudo reboot\r\n<\/pre>\n<p><strong>4. Adicionar seu usu\u00e1rio ao grupo docker<\/strong><\/p>\n<pre>\r\n> sudo usermod -aG docker ${USER}\r\n> su ${USER}\r\n<\/pre>\n<p><strong>5. Preparar o ambiente<\/strong><\/p>\n<pre>\r\n> sudo mkdir -p \/opt\/geonode_custom\/\r\n> sudo usermod -a -G www-data <strong>geonode<\/strong>\r\n> sudo chown -Rf <strong>geonode<\/strong>:www-data \/opt\/geonode_custom\/\r\n> sudo chmod -Rf 775 \/opt\/geonode_custom\/\r\n<\/pre>\n<p>Dica: Se o nome do seu usu\u00e1rio n\u00e3o for geonode, substitua pelo nome do seu usu\u00e1rio na linha 2 e 3 acima.<\/p>\n<p><strong>6. Clonar o c\u00f3digo fonte<\/strong><\/p>\n<pre>\r\n> cd \/opt\/geonode_custom\/\r\n> git clone https:\/\/github.com\/GeoNode\/geonode-project.git -b 4.4.2\r\n<\/pre>\n<p>Dica: \u00c9 importante ressaltar que o n\u00famero que voc\u00ea passar ap\u00f3s o <strong>-b<\/strong> \u00e9 na realidade a vers\u00e3o que voc\u00ea quer baixar\/instalar do GeoNode<\/p>\n<p><strong>7. Criar uma inst\u00e2ncia do Django<\/strong><\/p>\n<pre>\r\n> source \/usr\/share\/virtualenvwrapper\/virtualenvwrapper.sh\r\n> mkvirtualenv --python=\/usr\/bin\/python3 my_geonode\r\n> pip install Django==3.2.13\r\n> django-admin startproject --template=.\/geonode-project -e py,sh,md,rst,json,yml,ini,env,sample,properties -n monitoring-cron -n Dockerfile my_geonode\r\n> cd \/opt\/geonode_custom\/my_geonode\r\n<\/pre>\n<p>OBS: Chamaremos nossa inst\u00e2ncia de my_geonode. Voc\u00ea pode alterar o nome conforme desejar.<\/p>\n<p><strong>8. Criar o arquivo .env<\/strong><\/p>\n<pre>\r\n> python create-envfile.py\r\n<\/pre>\n<p><strong>9. Construa os containers<\/strong><\/p>\n<pre>\r\n> docker-compose -f docker-compose.yml build --no-cache\r\n<\/pre>\n<p><strong>10. Finalmente execute o container<\/strong><\/p>\n<pre>\r\n> docker-compose -f docker-compose.yml up -d\r\n<\/pre>\n<p>Agora \u00e9 s\u00f3 aguardar todos os containers aparecerem como done, e voc\u00ea j\u00e1 pode acessar o GeoNode no seu navegador digitando http:\/\/localhost\/<\/p>\n<p>Se voc\u00ea quiser mais detalhes sobre a instala\u00e7\u00e3o basta acessar a documenta\u00e7\u00e3o oficial do GeoNode, <a href=\"https:\/\/docs.geonode.org\/en\/master\/install\/basic\/index.html\">clicando aqui<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prezados leitores, Neste post irei apresentar como voc\u00ea pode instalar o GeoNode via Docker em uma m\u00e1quina rodando o Ubuntu Linux 22.04. Ao final dessa instala\u00e7\u00e3o voc\u00ea estar\u00e1 com uma inst\u00e2ncia do GeoNode executando no seu localhost. Sem enrola\u00e7\u00e3o, vamos&#8230; <a class=\"more-link\" href=\"https:\/\/www.fernandoquadro.com.br\/html\/2025\/06\/17\/instalacao-do-geonode-no-ubuntu-22-04\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":275,"featured_media":9799,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[196],"class_list":["post-9793","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gis","tag-geonode"],"_links":{"self":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts\/9793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/users\/275"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/comments?post=9793"}],"version-history":[{"count":7,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts\/9793\/revisions"}],"predecessor-version":[{"id":9802,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts\/9793\/revisions\/9802"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/media\/9799"}],"wp:attachment":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/media?parent=9793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/categories?post=9793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/tags?post=9793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}