Instalar Rocket.Chat no Self Hosted Ubuntu Server
- Install essential tools required by running this command:
sudo apt install g++ build-essential git curl python3
sudo apt update sudo apt install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
2.1.1 Add Node.JS 20 LTS APT repository.
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
Update package index.
sudo apt update
Step 2:1.2 Install Node.js, npm and yarn
sudo apt install -y nodejs
sudo apt install npm
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/nullecho "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.listsudo apt update && sudo apt-get install yarn -y
You can also install development tools for building native addons:
sudo apt install gcc g++ make -y
Verify install
node -v
v20.8.1
npm -v
10.1.0
yarn -v
1.22.19
- Install Deno by running:
cd /tmp
curl -Lo "deno.zip" "https://github.com/denoland/deno/releases/latest/download/deno-x86_64-unknown-linux-gnu.zip"
sudo apt update
sudo apt install unzip
sudo unzip -d /usr/local/bin /tmp/deno.zip
ls -al /usr/local/bin/deno
- Meteor with this command:
npx meteor
- Install the
yarn
package manager with this command. (acho que pode ignorar pq jah foi instalado acima)
npm install --global yarn
- Fork the Rocket.Chat repository on GitHub and clone it to your local system.
git clone https://github.com/RocketChat/Rocket.Chat.git
- Navigate to the project directory and install all the dependencies by running these commands:
cd Rocket.Chat
yarn
- When completed, build and run the server by executing this command:
yarn dsv
comandos para solucionar futuros erros:
Instale o Meteor: Verifique se o Meteor está instalado. Se não estiver, instale-o com o seguinte comando:
curl https://install.meteor.com/ | sh
Verifique o Caminho do Meteor: Se o Meteor já estiver instalado, ele pode não estar no PATH. Para garantir que o Meteor seja encontrado, adicione-o ao PATH. Geralmente, o Meteor é instalado em ~/.meteor. Verifique se esse diretório está no caminho:
export PATH=$PATH:~/.meteor
Execute Novamente o Comando: Depois de seguir os passos acima, execute novamente:
yarn run dsv