Setting up environment for JHIpster
Tags: jhipster, java, angular
Published: 2019-07-22 04:35:54

---
title: Setting up environment for JHIpster
published: true
description: All the tools I need to start developing with JHipster
tags: jhipster, java, angular
cover_image: https://images.unsplash.com/photo-1517650862521-d580d5348145?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80
---

<small>_[Photo](https://unsplash.com/photos/1td5Iq5IvNc) by [Maximilian Weisbecker](https://unsplash.com/@maximilianweisbecker) on [Unsplash](https://unsplash.com/)_</small>
As my company approved my 2 days a week remote work, they just gave me a new (really amazing Dell Latitude) laptop with Ubuntu.

I had a lot of packages to install as it was a clean install, so I thought it would be a good idea to make a post so I don't have to search all over again every time I need to setup my box (it has happened several time before).

# Docker CE
I think this doesn't need too much words.

### Install the certificate
```bash 
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
```

### Add the source.list reporsitory
```bash
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
```

### Update && Install
```bash
sudo apt-get update && sudo aptitude install docker-ce docker-ce-cli containerd.io
```

# Docker Compose
Awesome to run the `yml` files JHipster generates (for databases, code analysis, monitoring and more).

### Install Docker Compose
```bash
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```

### Make it executable
```bash
sudo chmod +x /usr/local/bin/docker-compose
```

# NodeJS && NPM
After installing nodejs from the official repositories, I found that they were kind of outdated, maybe I needed to modify something, but I found this option to work properly.

```bash
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
```

# JHipster
Everything is straigth forward and JHipster's installation is not different. Just run
```bash
sudo npm install -g generator-jhipster
``` 

Note: If you get an error mentioning `Error: ENOSPC: System limit for number of file watchers reached, watch 'target/classes'`, there is an explanation for it:

> Listen uses inotify by default on Linux to monitor directories for changes. It's not uncommon to encounter a system limit on the number of files you can monitor. For example, Ubuntu Lucid's (64bit) inotify limit is set to 8192.

You can solve this by running, which will persist on reboot:
```bash
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
```
# Additional Packages
* [Gitter](https://gitter.im/apps) (chat for developers, Jhipster has its chat there too!)
* [Kitematic](https://github.com/docker/kitematic/releases) (Kitematic is a simple application for managing Docker containers on Mac, Linux and Windows.).
* [Gitkraken](https://www.gitkraken.com/git-client) (Simply the best git client I've ever used)

That's it :)