Ecommerce Blog Filters
Picture for blog post How to install GrandNode Core 4.00 on Linux

How to install GrandNode Core 4.00 on Linux

Created on:  15.12.2017

Short guide, how to run and install GrandNode Core 4.00 on Linux - Ubuntu 16.04. If this process was difficult for you, follow this steps, for sure, it will help you to understand process of installation our e-commerce solution on Linux - Ubuntu 16.04.

Install Ubuntu 16.04

We need to install the basic version, choose just server SSH from the package list. Now please connect with your new server via SSH, redirecting port (It will be helpful later)

$ ssh host -L 5000:localhost:5000

Or eventually you can do it in PuTTy or something similar.
Please install updates:

$ sudo apt-get update
$ sudo apt-get dist-upgrade

Install .NET Core 2.0

- add sources

$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'

- install

$ sudo apt-get update
$ sudo apt-get install dotnet-sdk-2.0.0

Install MongoDB

- Add APT sources

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

- install

$ sudo apt-get update
$ sudo apt-get install -y mongodb-org

- run service

$ sudo service mongod start

Install GrandNode Core 4.00

Install required packages

$ sudo apt-get install unzip libgdiplus

Prepare the catalog, download application, extract it and run

$ sudo mkdir /var/aspnetcore
$ cd /var/aspnetcore/
$ wget https://github.com/grandnode/grandnode/releases/download/4.00/GrandNode-Core-4.00-NoSource.web.zip
$ sudo unzip GrandNode-Core-4.00-NoSource.web.zip
$ sudo chown -R www-data:www-data GrandNode-Core/
$ cd GrandNode-Core/
$ sudo -u www-data dotnet Grand.Web.dll

Now please open your browser, enter the http://localhost:5000 (redirected from the application server) and install GrandNode. The process of installation is available in our documentation here: http://docs.grandnode.com

Last touches

Service

When everything will work, you need to prepare the service to run in the background, and the system automatically raised it at the system startup and when it will lay out for some reason.

$ sudo vim /etc/systemd/system/grandnode-core.service

In the file you should have:

[Unit] Description=GrandNode Core .NET Web API Application running on Ubuntu


[Service]
WorkingDirectory=/var/aspnetcore/GrandNode-Core
ExecStart=/usr/bin/dotnet /var/aspnetcore/GrandNode-Core/Grand.Web.dll
Restart=always
RestartSec=10  # Restart service after 10 seconds if dotnet service crashes
SyslogIdentifier=grandnode
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target

Run and start the service

$ sudo systemctl enable grandnode-core.service
$ sudo systemctl start grandnode-core.service

Nginx

Install and configure

$ sudo apt-get install nginx
$ sudo vim /etc/nginx/sites-available/default



server {
    listen 80;
    location / {
        proxy_pass http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection keep-alive;
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

And finally run it.

$ sudo service nginx start

Please note that in the newest version of GrandNode - on GitHub it's branch develop, you can find commit, which is fixing problem with camel case in Linux. 

Leave your comment

Comments

Diyar
4/17/2018 12:43 PM
small problem may some one face it.

during installing "libgdiplus" package may give error so I fixed by doing:

1- sudo apt-get update && sudo apt-get upgrade

2- adding : "deb http://cz.archive.ubuntu.com/ubuntu xenial main"
to "/etc/apt/sources.list"

3- sudo apt-get update

4- sudo apt-get install libgdiplus
Patryk
6/29/2018 3:23 PM
Below you can find the newest version of tutorial:
https://grandnode.com/how-to-install-grandnode-on-linux-ubuntu-1604
back to top
Filters