Install GrandNode On Ubuntu 16.04

ref: https://grandnode.com/how-to-install-grandnode-on-linux-ubuntu-1604

Install GrandNode eCommerce Platform on Ubuntu 16.04 | 18.04 | 18.10

Note: Make sure nginx, dotnet core 2.2 and mongodb 4.0 already installed!

Get and Clone it from github

Deploy and publish GrandNode. Publishing a .NET Core application bundles all the required run-time libraries (in the form of DLL’s) and copies across appsettings.json file as well as any public assets. We need to go to our application’s root directory. We will be able to pull in/download all the required NuGet packages, let’s do that now.

After a while, when it’s completed we can build plugins and publish our application. It compiles our code and bundles all the required dependencies to specific directory.

OR IT’D BE BETTER TO USE SINGLE LINE COMMAND (sudo dotnet build Plugins/Grand.Plugin.ExchangeRate.McExchange && sudo dotnet build Plugins/Grand.Plugin.ExternalAuth.Facebook && sudo dotnet build Plugins/Grand.Plugin.Feed.GoogleShopping && sudo dotnet build Plugins/Grand.Plugin.Payments.CashOnDelivery && sudo dotnet build Plugins/Grand.Plugin.Payments.CheckMoneyOrder && sudo dotnet build Plugins/Grand.Plugin.Payments.PayInStore && sudo dotnet build Plugins/Grand.Plugin.Payments.PayPalStandard && sudo dotnet build Plugins/Grand.Plugin.Shipping.ByWeight && sudo dotnet build Plugins/Grand.Plugin.Shipping.FixedRateShipping && sudo dotnet build Plugins/Grand.Plugin.Shipping.ShippingPoint && sudo dotnet build Plugins/Grand.Plugin.Tax.CountryStateZip && sudo dotnet build Plugins/Grand.Plugin.Tax.FixedRate && sudo dotnet build Plugins/Grand.Plugin.Widgets.GoogleAnalytics && sudo dotnet build Plugins/Grand.Plugin.Widgets.Slider)

Then publish the compiled Grand.Web in /home/teddy/Documents/works/grandnode (NOTE: BE CAREFULL WITH THE COMMAND FROM THE WEBSITE LIKE: sudo dotnet publish Grand.Web –c Release –o /var/webapps/GrandNode. THIS IS BECAUSE  –c AND –o ARE NOT PROPER FONT. IT SHOULD BE -c AND -o ). IF YOU GET THIS ERROR:

IT MEANS THE FONT IS NOT CORRECT (ref: https://github.com/grandnode/grandnode/issues/356). SO HERE IS THE CORRECT ONE:

In the next step we need to set the permissions so that the user that our service is running under (by default this will be www-data in this tutorial) can have the required access rights, we do this by running:

Test locally (https://docs.microsoft.com/en-US/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.2)! Go to the root /home/teddy/Documents/works/grandnode. then run ‘dotnet Grand.Web.dll’
(NOTE: NEED TO USE ‘sudo ..’):

Then when I open it on my browser: http://localhost:5000/
I got this error:

SOLUTION: use ‘sudo dotnet Grand.Web.dll’ INSTEAD OF ‘dotnet Grand.Web.dll’

Open it again in my browser: http://localhost:5000
OKAY. The first time it’ll be redirected to install page (http://localhost:5000/install)Here is the install setting:
Admin user email: admin@yourstore.com
Admin user password: teddy
MongoDB Server name: localhost
Database name: grandnode
MongoDB Server Username: grandnodeuser
MongoDB Server Password: grandnode
Then click ‘Install’ button.
wait until the installation is finished with this message

Then shutdown the process in the terminal (CTRL + C) then start again with the above command ‘sudo dotnet Grand.Web.dll’
Then open again in your browser: http://localhost:5000/

Configure NGINX with GrandNode
Everything works fine, but we are not able to connect with our GrandNode from our computer. The reason is simple, GrandNode is running locally on our machine on port 5000. In thix example, we will present the simplest way of reverse-proxy traffic to your application. It will forward traffic from port 80 to your local machine on port 5000.
Create the config file:

Here is the content:

NOTE: IF THIS APP IS NOT RUNNING, PLS COMMENT ‘proxy_pass’ COMMAND ABOVE (OR BETTER ALL ‘proxy_*’). BECAUSE IT’D MAKE NGINX CAN’T EXECUTE THE OTHER LOCAL WEBSITES (BECAUSE OF THE PROXY TO PORT 5000)!!!
then create a symbolic link:

then register the host on my system:

Add this:

Then test: Test: http://grandnode.test/
NOTE: MAKE SURE THE DOTNET APP IS ALREADY STARTED (‘sudo dotnet Grand.Web.dll’). IN THE PROD SERVER, TO MAKE SURE THIS APP ALWAYS START, I CAN CREATE THE SERVICE (SEE: https://docs.microsoft.com/en-US/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.2)
Here is the look: http://grandnode.test/apple-macbook-pro-13-inchThe admin page: http://grandnode.test/adminInstall missing package:
he last touches. We need to update packages and install libgdiplus.

 

Leave a Reply

Your email address will not be published. Required fields are marked *