Skip to content

Ubuntu Installation

Ubuntu 16.04+ Installation

FORMBIRD_HOME=formbird

cd ~
sudo apt update
sudo apt upgrade -y

# Utils
sudo apt install -y p7zip p7zip-full zip unzip ncdu htop iotop s3fs ntp ntpdate sshpass

# Time Sync and Time Zone
sudo systemctl enable ntp
sudo systemctl stop ntp
sudo ntpdate pool.ntp.org
sudo systemctl start ntp

timedatectl set-timezone america/los_angeles

# NodeJS and NPM 
sudo apt install -y nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt install -y npm
sudo npm install -g pm2
sudo pm2 install -g pm2-logrotate

sudo npm cache clean -f
sudo npm install -g n
sudo n 8.9.0

sudo ln -sf /usr/local/n/versions/node/8.9.0/bin/node /usr/bin/nodejs
sudo ln -sf /usr/local/n/versions/node/8.9.0/bin/node /usr/bin/node

# Java
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install -y oracle-java8-installer

echo 'JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre"' >> /etc/environment
echo 'JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre"'

# MongoDB
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
sudo echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

apt update
apt upgrade -y

sudo apt -y remove mongodb-org mongodb-org-server mongodb-org-shell mongodb-org-mongos mongodb-org-tools

# Elasticsearch
#cd /$FORMBIRD_HOME/install
cd ~
sudo su
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.4.4.deb
sudo dpkg -i elasticsearch-2.4.4.deb

cd /usr/share/elasticsearch/bin
./plugin install mobz/elasticsearch-head
exit
cd ~

sudo systemctl enable elasticsearch
sudo systemctl restart elasticsearch

# Python
sudo apt install -y python-pip
sudo apt install -y python-software-properties
sudo pip install --upgrade pip

# Mongo-connector
sudo pip install mongo-connector
sudo pip install elastic2-doc-manager
sudo pip install elastic-doc-manager[elastic2]

sudo systemctl enable mongo-connector
sudo systemctl restart mongo-connector

# NGINX

sudo apt install -y nginx

# Redis

sudo apt-get install -y redis-server