Run MeasureThat.net application on Linux: installing prerequisites (node, .net code, PostgreSQL, git, npm, gulp, bower)

In this topic I will tell which dependencies are need to be able to run http://MeasureThat.Net application on Ubuntu 16.04.
Although there are quite a few dependencies, none of them are unique and should be known to the developers.
So, here is what is needed:

  • .Net core
  • Visual Studio Code (optional)
  • PostgreSQL (it will be used as Database)
  • Git (to checkout the code)
  • Node.js
  • gulp
  • bower
  • npm

.net core

Information about how to install .net core on Linux can be found on Microsoft’s website here: https://www.microsoft.com/net/core#ubuntu
I will also provide it here (just in case):

Configure apt-get feed:

1
2
3
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
sudo apt-get update

Install .NET Core SDK

1
sudo apt-get install dotnet-dev-1.0.0-preview2-003131

Visual Studio Code (optional)

Information about how to isntall Visual Studio Code on Linux can be found in my previous post: http://the-coderok.azurewebsites.net/2016/09/30/How-to-install-Visual-Studio-Code-on-Ubuntu-using-Debian-package-manager/
Or on their website: https://code.visualstudio.com/#alt-downloads

PostgreSQL

Open the terminal Window and type following commands:

1
2
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib

git

1
2
3
4
5
6
7
8
9
sudo apt install git
```
# Install nodejs & npm
Due to the issues with running `bower` using regular `nodejs` package, we will need to install `nodejs-legacy` package.
```bash
sudo apt-get install nodejs-legacy
sudo apt-get install npm

Some additional Information: http://askubuntu.com/questions/507855/bower-install-does-nothing-not-even-throw-an-error

Install bower & gulp

1
2
sudo npm install bower -g
sudo npm install gulp -g

We just installed all dependencies and now we can proceed (check out Run MeasureThat.net application on Linux: building and running the application).