Chatwoot/docs/development/environment-setup/ubuntu.md

109 lines
2 KiB
Markdown
Raw Normal View History

---
path: "/docs/installation-guide-ubuntu"
title: "Ubuntu installation guide"
---
2019-09-22 05:59:26 +00:00
Open a terminal and run the following commands
```bash
sudo apt-get update
```
### Install Git
```bash
sudo apt-get install git
```
### Install RVM
You need software-properties-common installed in order to add PPA repositories.
```bash
sudo apt-get install software-properties-common
```
```bash
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
```
Enable `Run command as a login shell` in terminal `Preferences`. Restart your computer
### Install Ruby
2019-11-18 03:37:48 +00:00
Chatwoot APIs are built on Ruby on Rails, you need install ruby 2.6.5
2019-09-22 05:59:26 +00:00
```bash
2019-11-18 03:37:48 +00:00
rvm install ruby-2.6.5
2019-09-22 05:59:26 +00:00
```
2019-11-18 03:37:48 +00:00
Use ruby 2.6.5 as default
2019-09-22 05:59:26 +00:00
```bash
2019-11-18 03:37:48 +00:00
rvm use 2.6.5 --default
2019-09-22 05:59:26 +00:00
```
### Install Node.js
Install Node.js from NodeSoure using the following commands
```bash
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
```
### Install yarn
We use `yarn` as package manager
```bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
```
```bash
sudo apt-get update && sudo apt-get install yarn
```
### Install postgres
The database used in Chatwoot is PostgreSQL. Use the following commands to install postgres.
```bash
sudo apt install postgresql postgresql-contrib
```
The installation procedure created a user account called postgres that is associated with the default Postgres role. In order to use Postgres, you can log into that account.
```bash
sudo -u postgres psql
```
Install `libpg-dev` dependencies for ubuntu
```bash
sudo apt-get install libpq-dev
```
### Install redis-server
Chatwoot uses Redis server in agent assignments and reporting. To install `redis-server`
```bash
sudo apt-get install redis-server
```
Enable Redis to start on system boot.
```bash
sudo systemctl enable redis-server.service
```
### Install imagemagick
```bash
sudo apt-get install imagemagick
```