Wednesday, March 25, 2020

How To Install GrandNode ECommerce Platform with Nginx on Ubuntu 18.04

 Video Tutorial -https://youtu.be/ou6BNNzAo9I

 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

GrandNode is a functional cross-platform e-commerce solution developed for the most demanding users. You are able to run it on any system - Linux, Windows, Mac.
Offcial Website: https://grandnode.com/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-    
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   | IP address- 192.168.1.50  | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT ; apt update ; apt install -y build-essential software-properties-common git curl gdebi net-tools wget sqlite3 dirmngr nano lsb-release apt-transport-https unzip libgdiplus nginx -y

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 68818C72E52529D4
echo "deb http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
apt update ; apt install -y mongodb-org

systemctl stop mongod.service ; systemctl start mongod.service ; systemctl enable mongod.service
mongo
use grandnode
db.createUser(
   {
     user: "root",
     pwd: "toor",
     roles: [ "dbOwner" ]
   }
)
cd /tmp ; wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb


sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-get update ; apt-get install dotnet-sdk-2.1 -y


cd /tmp/ ; wget https://github.com/grandnode/grandnode/releases/download/4.30/GrandNode4.30_NoSource.Web.zip
unzip -d /var/www/html/grandnode /tmp/GrandNode4.30_NoSource.Web.zip
chown -R www-data:www-data /var/www/html/grandnode ; chmod -R 777 /var/www/html/grandnode
cd /var/www/html/grandnode
sudo -u www-data dotnet Grand.Web.dll

nano /etc/systemd/system/grandnode-core.service
[Unit]
 Description=GrandNode

  [Service]
  WorkingDirectory=/var/www/html/grandnode
  ExecStart=/usr/bin/dotnet /var/www/html/grandnode/Grand.Web.dll
  Restart=always
  RestartSec=10
  SyslogIdentifier=dotnet-grandnode
  User=www-data
  Environment=ASPNETCORE_ENVIRONMENT=Production

  [Install]
  WantedBy=multi-user.target

systemctl enable grandnode-core.service ; systemctl start grandnode-core.service ; systemctl status grandnode-core.service

nano /etc/nginx/conf.d/yourdomain.conf
server {
    listen [::]:80;
    listen 80;
    server_name www.yourdomain.com;

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://127.0.0.1:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_next_upstream error timeout http_502 http_503 http_504;
    }
}
rm /etc/nginx/sites-enabled/default
nginx -t  ; echo "192.168.1.50 www.yourdomain.com" >> /etc/hosts ; systemctl restart nginx grandnode-core.service ; systemctl status grandnode-core.service

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment