{"id":1753,"date":"2024-12-14T08:21:13","date_gmt":"2023-07-02T20:49:36","guid":{"rendered":""},"modified":"2025-02-02T00:46:17","modified_gmt":"2025-02-01T23:46:17","slug":"como-instalar-o-rocket-chat-server-no-rocky-linux-8","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/como-instalar-o-rocket-chat-server-no-rocky-linux-8\/","title":{"rendered":"Como instalar o Rocket.Chat Server no Rocky Linux 8"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<section>\n<h2>Introdu\u00e7\u00e3o<\/h2>\n<p>Rocket.Chat \u00e9 uma plataforma de comunica\u00e7\u00e3o de c\u00f3digo aberto que oferece funcionalidades de chat em tempo real. \u00c9 uma excelente solu\u00e7\u00e3o para empresas e comunidades que precisam de uma ferramenta de colabora\u00e7\u00e3o aut\u00f4noma. Neste tutorial, vamos explicar como instalar o Rocket.Chat no Rocky Linux 8.<\/p>\n<\/section>\n<section>\n<h2>Pr\u00e9-requisitos<\/h2>\n<ul>\n<li>Um <a href=\"https:\/\/netcloud24.com?language=portuguese-pt&amp;currency=4\" target=\"_blank\" rel=\"follow\">servidor VPS<\/a> rodando Rocky Linux 8.<\/li>\n<li>Acesso root ou usu\u00e1rio com privil\u00e9gios sudo.<\/li>\n<li>O Node.js, MongoDB e o Nginx instalados.<\/li>\n<\/ul>\n<\/section>\n<section>\n<h2>Passo 1: Atualizar o sistema<\/h2>\n<p>Antes de come\u00e7ar, atualize os pacotes do sistema:<\/p>\n<pre><code>sudo dnf update -y<\/code><\/pre>\n<\/section>\n<section>\n<h2>Passo 2: Instalar o Node.js<\/h2>\n<p>Rocket.Chat \u00e9 constru\u00eddo com Node.js. Adicione o reposit\u00f3rio do Node.js e instale a vers\u00e3o LTS (Long Term Support):<\/p>\n<pre><code>sudo dnf module enable nodejs:14\r\nsudo dnf install nodejs -y<\/code><\/pre>\n<p>Verifique se o Node.js foi instalado corretamente:<\/p>\n<pre><code>node -v<\/code><\/pre>\n<\/section>\n<section>\n<h2>Passo 3: Instalar o MongoDB<\/h2>\n<p>Rocket.Chat usa o MongoDB como banco de dados. Instale o MongoDB executando os seguintes comandos:<\/p>\n<pre><code>sudo tee \/etc\/yum.repos.d\/mongodb-org-4.4.repo &lt;&lt;EOF\r\n[mongodb-org-4.4]\r\nname=MongoDB Repository\r\nbaseurl=https:\/\/repo.mongodb.org\/yum\/redhat\/8\/mongodb-org\/4.4\/x86_64\/\r\ngpgcheck=1\r\nenabled=1\r\ngpgkey=https:\/\/www.mongodb.org\/static\/pgp\/server-4.4.asc\r\nEOF\r\n\r\nsudo dnf install mongodb-org -y<\/code><\/pre>\n<p>Inicie e habilite o MongoDB para iniciar automaticamente na inicializa\u00e7\u00e3o do sistema:<\/p>\n<pre><code>sudo systemctl start mongod\r\nsudo systemctl enable mongod<\/code><\/pre>\n<\/section>\n<section>\n<h2>Passo 4: Configurar o MongoDB<\/h2>\n<p>Rocket.Chat precisa que o MongoDB esteja em modo de replica\u00e7\u00e3o mesmo em um servidor \u00fanico. Abra o terminal do MongoDB:<\/p>\n<pre><code>mongo<\/code><\/pre>\n<p>No terminal do MongoDB, execute os seguintes comandos para configurar a replica\u00e7\u00e3o:<\/p>\n<pre><code>rs.initiate()<\/code><\/pre>\n<p>Depois, saia do terminal MongoDB digitando:<\/p>\n<pre><code>exit<\/code><\/pre>\n<\/section>\n<section>\n<h2>Passo 5: Baixar e configurar o Rocket.Chat<\/h2>\n<p>Baixe a vers\u00e3o mais recente do Rocket.Chat:<\/p>\n<pre><code>curl -L https:\/\/releases.rocket.chat\/latest\/download -o rocket.chat.tgz<\/code><\/pre>\n<p>Extraia o arquivo baixado e mova para o diret\u00f3rio correto:<\/p>\n<pre><code>tar -xzf rocket.chat.tgz\r\nsudo mv bundle \/opt\/Rocket.Chat<\/code><\/pre>\n<p>Instale as depend\u00eancias necess\u00e1rias dentro da pasta do Rocket.Chat:<\/p>\n<pre><code>cd \/opt\/Rocket.Chat\/programs\/server\r\nsudo npm install<\/code><\/pre>\n<\/section>\n<section>\n<h2>Passo 6: Configurar o Rocket.Chat como um servi\u00e7o de sistema<\/h2>\n<p>Crie um arquivo de servi\u00e7o systemd para o Rocket.Chat:<\/p>\n<pre><code>sudo nano \/etc\/systemd\/system\/rocketchat.service<\/code><\/pre>\n<p>Adicione o seguinte conte\u00fado ao arquivo:<\/p>\n<pre><code>[Unit]\r\nDescription=Rocket.Chat server\r\nAfter=network.target mongod.target\r\n\r\n[Service]\r\nType=simple\r\nRestart=always\r\nExecStart=\/usr\/bin\/node \/opt\/Rocket.Chat\/main.js\r\nEnvironment=ROOT_URL=http:\/\/seu_dominio_ou_IP:3000\/\r\nEnvironment=MONGO_URL=mongodb:\/\/localhost:27017\/rocketchat?replicaSet=rs01\r\nEnvironment=PORT=3000\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/code><\/pre>\n<p>Salve o arquivo e saia do editor.<\/p>\n<\/section>\n<section>\n<h2>Passo 7: Iniciar o Rocket.Chat<\/h2>\n<p>Inicie o servi\u00e7o Rocket.Chat e habilite-o para iniciar automaticamente na inicializa\u00e7\u00e3o:<\/p>\n<pre><code>sudo systemctl start rocketchat\r\nsudo systemctl enable rocketchat<\/code><\/pre>\n<p>Verifique se o Rocket.Chat est\u00e1 funcionando corretamente:<\/p>\n<pre><code>sudo systemctl status rocketchat<\/code><\/pre>\n<\/section>\n<section>\n<h2>Passo 8: Configurar o Nginx como proxy reverso<\/h2>\n<p>Para acessar o Rocket.Chat via HTTP\/S, instale o Nginx e configure-o como proxy reverso:<\/p>\n<pre><code>sudo dnf install nginx -y<\/code><\/pre>\n<p>Crie um arquivo de configura\u00e7\u00e3o para o Rocket.Chat no Nginx:<\/p>\n<pre><code>sudo nano \/etc\/nginx\/conf.d\/rocketchat.conf<\/code><\/pre>\n<p>Adicione o seguinte conte\u00fado:<\/p>\n<pre><code>server {\r\n    listen 80;\r\n    server_name seu_dominio_ou_IP;\r\n\r\n    location \/ {\r\n        proxy_pass http:\/\/localhost:3000\/;\r\n        proxy_http_version 1.1;\r\n        proxy_set_header Upgrade $http_upgrade;\r\n        proxy_set_header Connection \"upgrade\";\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n        proxy_set_header X-Forwarded-Proto $scheme;\r\n        proxy_cache_bypass $http_upgrade;\r\n    }\r\n}<\/code><\/pre>\n<p>Salve o arquivo e reinicie o Nginx:<\/p>\n<pre><code>sudo systemctl restart nginx<\/code><\/pre>\n<\/section>\n<section>\n<h2>Conclus\u00e3o<\/h2>\n<p>Parab\u00e9ns! Voc\u00ea instalou com sucesso o Rocket.Chat Server no Rocky Linux 8. Agora, voc\u00ea pode acessar o Rocket.Chat pelo navegador e come\u00e7ar a usar sua pr\u00f3pria plataforma de comunica\u00e7\u00e3o. Para garantir que o servidor tenha desempenho e seguran\u00e7a adequados, considere hospedar o Rocket.Chat em um <a href=\"https:\/\/netcloud24.com?language=portuguese-pt&amp;currency=4\" target=\"_blank\" rel=\"follow\">servidor VPS<\/a> confi\u00e1vel.<\/p>\n<\/section>\n<p><a href=\"https:\/\/de.netcloud24.com\/\" target=\"_blank\">Windows VPS Deutschland<\/a><\/p>\n<p><a href=\"https:\/\/es.netcloud24.com\/\" target=\"_blank\">Windows VPS Espa\u00f1a<\/a><\/p>\n<p><a href=\"https:\/\/nl.netcloud24.com\/\" target=\"_blank\">Windows VPS Nederland<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">Windows VPS Italia<\/a><\/p>\n<p><a href=\"https:\/\/pt.netcloud24.com\/\" target=\"_blank\">Windows VPS Portugal<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">VPS Windows Italia<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Sverige<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Norge<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS T\u00fcrkiye<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows RDS (Remote Desktop Services)<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Introdu\u00e7\u00e3o Rocket.Chat \u00e9 uma plataforma de comunica\u00e7\u00e3o de c\u00f3digo aberto que oferece funcionalidades de chat em tempo real. \u00c9 uma excelente solu\u00e7\u00e3o para empresas e comunidades\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-1753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1753"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1753\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}