Install Printer HP Deskjet 2135 on Ubuntu 16.04

REF: https://martianuswb.com/?p=5378
AT FIRST I TRIED TO USE AUTOMATIC INSTALLATION INSTEAD OF THE CUSTOM ONE AND IT FAILED:

Running ‘sudo apt-get install –assume-yes libcupsimage2-dev’
Please wait, this may take several minutes…
error: Package install command failed with error code 100

error: A required dependency ‘cups (CUPS – Common Unix Printing System)’ is still missing.
error: A required dependency ‘cups-image (CUPS image – CUPS image development files)’ is still missing.
error: Installation cannot continue without these dependencies.
error: Please manually install this dependency and re-run this installer.

sudo apt-get install –reinstall libpng12-0=1.2.54-1ubuntu1.1 libpng-dev libcupsimage2-dev

Running ‘sudo apt-get install –assume-yes libcups2’
Please wait, this may take several minutes…
|Gtk-Message: Failed to load module “topmenu-gtk-module”
error: A required dependency ‘cups (CUPS – Common Unix Printing System)’ is still missing.

error: A required dependency ‘pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))’ is still missing.
error: Installation cannot continue without this dependency.
error: Please manually install this dependency and re-run this installer.

SOLUTION: USE CUSTOM INSTALLATION:
ALSO TRIED TO ENABLE CUPS SERVICE ???
teddy@teddy:~/Documents/HP_deskjet_2135$ sh hplip-3.20.3.run
Creating directory hplip-3.20.3
Verifying archive integrity… All good.
Uncompressing HPLIP 3.20.3 Self Extracting Archive……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………

HP Linux Imaging and Printing System (ver. 3.20.3)
HPLIP Installer ver. 5.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Installer log saved in: hplip-install_Sun-10-May-2020_14:43:23.log

\
note: Defaults for each question are maked with a ‘*’. Press <enter> to accept the default.
/Gtk-Message: Failed to load module “topmenu-gtk-module”
-Gtk-Message: Failed to load module “topmenu-gtk-module”

INSTALLATION MODE
—————–
Automatic mode will install the full HPLIP solution with the most common options.
Custom mode allows you to choose installation options to fit specific requirements.

Please choose the installation mode (a=automatic*, c=custom, q=quit) : c

INTRODUCTION
————
This installer will install HPLIP version 3.20.3 on your computer.
Please close any running package management systems now (YaST, Adept, Synaptic, Up2date, etc).

DISTRO/OS CONFIRMATION
———————-
Distro appears to be Ubuntu 16.04.

Is “Ubuntu 16.04” your correct distro/OS and version (y=yes*, n=no, q=quit) ? y

DRIVER OPTIONS
————–
Would you like to install Custom Discrete Drivers or Class Drivers ( ‘d’= Discrete Drivers*,’c’= Class Drivers,’q’= Quit)? : d

Initializing. Please wait…

SELECT HPLIP OPTIONS
——————–
You can select which HPLIP options to enable. Some options require extra dependencies.

Do you wish to enable ‘Network/JetDirect I/O’ (y=yes*, n=no, q=quit) ? y
Do you wish to enable ‘Graphical User Interfaces (Qt4)’ (y=yes*, n=no, q=quit) ? y
Do you wish to enable ‘Graphical User Interfaces (Qt5)’ (y=yes, n=no*, q=quit) ? n
Do you wish to enable ‘PC Send Fax support’ (y=yes*, n=no, q=quit) ? n
Do you wish to enable ‘Scanning support’ (y=yes*, n=no, q=quit) ? y
Do you wish to enable ‘HPLIP documentation (HTML)’ (y=yes*, n=no, q=quit) ? y

ENTER USER PASSWORD
——————-
Please enter the sudoer (teddy)’s password:

INSTALLATION NOTES
——————
Enable the universe/multiverse repositories. Also be sure you are using the Ubuntu “Main” Repositories. See: https://help.ubuntu.com/community/Repositories/Ubuntu for more information. Disable the CD-ROM/DVD source if you do not have the Ubuntu installation media inserted in the drive.

Please read the installation notes. Press <enter> to continue or ‘q’ to quit:

SECURITY PACKAGES
—————–
AppArmor is installed.
AppArmor protects the application from external intrusion attempts making the application secure

Would you like to have this installer install the hplip specific policy/profile (y=yes*, n=no, q=quit) ? y

RUNNING PRE-INSTALL COMMANDS
—————————-
OK

CHECKING FOR NETWORK CONNECTION
——————————-
Network connection present.

RUNNING PRE-PACKAGE COMMANDS
—————————-
sudo dpkg –configure -a (Pre-depend step 1)
sudo apt-get install –yes –force-yes -f (Pre-depend step 2)
warning: An error occurred running ‘sudo apt-get update’
sudo apt-get update (Pre-depend step 3)
OK

DEPENDENCY AND CONFLICT RESOLUTION
———————————-
\Gtk-Message: Failed to load module “topmenu-gtk-module”
HPLIP-3.16.3 exists, this may conflict with the new one being installed.
Do you want to (‘i’= Remove and Install*, ‘q’= Quit)? :i
Starting uninstallation…
HPLIP uninstallation is completed

RUNNING POST-PACKAGE COMMANDS
—————————–
OK

RE-CHECKING DEPENDENCIES
————————
/Gtk-Message: Failed to load module “topmenu-gtk-module”
OK

RUNNING SCANJET DEPENDENCY COMMANDS
———————————–
sudo apt-get install –assume-yes python-pip (Scanjet-depend step 1)
sudo pip install –upgrade pip (Scanjet-depend step 2)
sudo apt-get install –assume-yes libleptonica-dev (Scanjet-depend step 3)
sudo apt-get install –assume-yes tesseract-ocr (Scanjet-depend step 4)
sudo apt-get install –assume-yes libtesseract-dev (Scanjet-depend step 5)
sudo -H pip install tesserocr (Scanjet-depend step 6)
sudo apt-get install –assume-yes libzbar-dev (Scanjet-depend step 7)
warning: Failed to install this Scanjet dependency package. Some Scanjet features will not work.
sudo apt-get install –assume-yes python-zbar (Scanjet-depend step 8)
sudo apt-get install –assume-yes python-opencv (Scanjet-depend step 9)
sudo apt-get install –assume-yes python-pypdf2 (Scanjet-depend step 10)
sudo -H pip install imutils (Scanjet-depend step 11)
sudo -H pip install pypdfocr (Scanjet-depend step 12)
warning: Failed to install this Scanjet dependency package. Some Scanjet features will not work.
sudo -H pip install scikit-image (Scanjet-depend step 13)
/
sudo -H pip install scipy (Scanjet-depend step 14)
OK

READY TO BUILD AND INSTALL
————————–
Ready to perform build and install. Press <enter> to continue or ‘q’ to quit:

PRE-BUILD COMMANDS
——————
OK

BUILD AND INSTALL
—————–
Running ‘./configure –with-hpppddir=/usr/share/ppd/HP –libdir=/usr/lib –prefix=/usr –enable-qt4 –disable-qt5 –enable-doc-build –disable-cups-ppd-install –disable-foomatic-drv-install –disable-libusb01_build –disable-foomatic-ppd-install –disable-hpijs-install –disable-class-driver –disable-udev_sysfs_rules –disable-policykit –enable-cups-drv-install –enable-hpcups-install –enable-network-build –enable-dbus-build –enable-scan-build –disable-fax-build –enable-apparmor_build’
Please wait, this may take several minutes…
Command completed successfully.

Running ‘make clean’
Please wait, this may take several minutes…
Command completed successfully.

Running ‘make’
Please wait, this may take several minutes…
Command completed successfully.

Running ‘sudo make install’
Please wait, this may take several minutes…
Command completed successfully.

Build complete.

POST-BUILD COMMANDS
——————-

CLOSE HP_SYSTRAY
—————-
Sending close message to hp-systray (if it is currently running)…
OK

HPLIP UPDATE NOTIFICATION
————————-
Do you want to check for HPLIP updates?. (y=yes*, n=no) : y

RESTART OR RE-PLUG IS REQUIRED
——————————
If you are installing a USB connected printer, and the printer was plugged in
when you started this installer, you will need to either restart your PC or
unplug and re-plug in your printer (USB cable only). If you choose to restart,
run this command after restarting: hp-setup (Note: If you are using a parallel
connection, you will have to restart your PC. If you are using network/wireless,
you can ignore and continue).

Restart or re-plug in your printer (r=restart, p=re-plug in*, i=ignore/continue, q=quit) : i

PRINTER SETUP
————-
Would you like to setup a printer now (y=yes*, n=no, q=quit) ? y
Please make sure your printer is connected and powered on at this time.
Do you want to setup printer in GUI mode? (u=GUI mode*, i=Interactive mode) : u

HP Linux Imaging and Printing System (ver. 3.20.3)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

warning: Fax setup disabled – Python 2.3+ required.
Gtk-Message: Failed to load module “topmenu-gtk-module”
Searching… (bus=usb, search=(None), desc=0)

Done.

RE-STARTING HP_SYSTRAY
———————-

HP Linux Imaging and Printing System (ver. 3.20.3)
System Tray Status Service ver. 2.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Gtk-Message: Failed to load module “topmenu-gtk-module”
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
set_interactive(1)
“sni-qt/11952” WARN 15:11:38.490 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE
teddy@teddy:~/Documents/HP_deskjet_2135$
HP Linux Imaging and Printing System (ver. 3.20.3)
HP Device Manager ver. 15.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

warning: Fax disabled.
warning: Fax disabled.
warning: Please install version 2.0+ of Reportlab for coverpage support.
error: Fax address book disabled – Python 2.3+ required.
Gtk-Message: Failed to load module “topmenu-gtk-module”
\warning: Supplies information not available for this device.
warning: Supplies information not available for this device.
Gtk-Message: Failed to load module “topmenu-gtk-module”
Gtk-Message: Failed to load module “topmenu-gtk-module”

WHEN COMPUTER IS RESTARTED, I NEED TO START CUPS SERVICE

SO COMPUTER CAN RECOGNIZE THE PRINTER!!!

Install VTiger 7 Open Source On Ubuntu 16.04

Download from https://sourceforge.net/projects/vtigercrm/
Extract the downloaded file.

My environment: PHP 7.3 FPM, MySQL 5.7, Nginx

SETUP LOCAL WITH NGINX

content:

  • Enable file config
  • Register the host on my system

    Like this:
  • CHECK THE NGINX SETTING AND RESTART IT:


     
  • Set file permission and owner:

    CREATE A NEW DATABASE: vtigercrm COLLATION utf8mb4_general_ci

    Test: http://vtigercrm.test/ –> INSTALLATION WORKING. THE INSTALLATION TOOK SAME TIME

    Admin
    username: admin
    password: Admtiger

    BUT I GOT THIS ERROR:


    DEBUG STEP:
    /vtigercrm/languages/en_us/Install.php:

    /vtigercrm/modules/Install/models/Utils.php:

    SOLUTION: MODIFY THE MYSQL SETTING IN /etc/mysql/my.cnf

    MODIFY THE ‘sql_mode’ VALUES: –> PLS READ: https://www.percona.com/blog/2016/10/18/upgrading-to-mysql-5-7-beware-of-the-new-strict-mode/

    SAVE AND THE RESTART MYSQL SERVICE

     

Swoolec Loader

Use PHP7.3
Install it if not exist

Use php7.3 as default php

Check

TO ENABLE PHP 7.3 ON NGINX SERVER, PLS DO (MAKE SURE APACHE2 IS STOPPED IF IT’S RUNNING AND START NGINX):

IMPORTANT! ALSO NEED TO INSTALL php7.3-dev. THIS IS NEEDED WHEN I NEED TO COMPILE swoole SOURCE

CHECK php-config SOULD POINT TO php7.3

THE NGINX MAIN CONFIG IN /etc/nginx/nginx.conf
THE DEFAULT VIRTUALHOST IN /etc/nginx/sites-available/default
EDIT IT TO ENABLE PARSING PHP FILE:

Use php7.3-fpm for fastcgi_pass

THEN CHANGE PHP7.3-FPM SETTING:

CHANGE THE CONTENT:

THEN RESTART PHP7.3-FPM SERVICE:

CHECK NGINX SYNTAX: sudo nginx -t
RESTART NGINX: sudo service nginx restart
OPEN IT: http://localhost:8080/phpinfo.php (NEED TO CLEAR THE BROWSER CACHE FIRST)

INSTALL swoole FOR PHP7.3
IF YOU ALREADY INSTALLED IT FOR PHP7.2, YOU NEED TO REMOVE/UNINSTALL IT.
NOTE: TO UNINSTAL IT, USE PHP7.2 VERSION ON TERMINAL NOT PHP7.3
FIRST COMMENT IT from the cli php.ini and php-fpm php.ini files.

THEN

THEN DO THE SAME FOR php-fpm php.ini file (sudo gedit /etc/php/7.2/fpm/php.ini).
USE pecl TO UNINSTALL IT

NOTE: IT’S ALSO IMPORTANT TO DELETE/REMOVE swoole.so FILE IN /usr/lib/php/20170718/swoole.so MANUALLY. BECAUSE PHP7.3 USE EXTENSION DIR IN /usr/lib/php/20180731, MAKE SURE IF ALREADY EXIST swoole.so IN IT. REMOVE IT MANUALLY AS WELL!
NOTE: I TRIED TO INSTALL swoole 4.4.5 FROM SOURCE & COMPILE IT (READ: https://github.com/swoole/swoole-src) BUT ALWAYS FAILED AND GOT THIS ERROR

I THINK THIS IS BECAUSE I MIXED THE INSTALLATION (FROM pecl AND FROM SOURCE) THEN FORGOT TO INSTALL php7.3-dev AND FORGOT TO REMOVE swoole.so MANUALLY IN /usr/lib/php/20180731/swoole.so

THEN INSTALL SWOOLE ON PHP7.3 TERMINAL
MAKE SURE THE PHP API VERSION FOR PHP7.3 IS ‘20180731’ NOT ‘20170718’

Then include the extension “extension=swoole.so” in php.ini file. For php-fpm, the php.ini file in “/etc/php/7.3/fpm/php.ini”

then add this new line:

Save then restart php7.3-fpm service

look it up phpinfo() result. It should show like this:THEN IN CLI

ADD loader73.so FILE.
Copy it manually (USE SUDO) TO php7.3 EXTENSION DIR (IN /usr/lib/php/20180731)

THEN ADD THE EXTENSION ‘loader73.so’ IN php.ini FILE. For php-fpm, the php.ini file in “/etc/php/7.3/fpm/php.ini”

THEN ADD:

PLS DO THE SAME IN php.ini FOR CLI IN /etc/php/7.3/cli/php.ini
THEN RESTART php7.3-fpm SERVICE

CHECK THE EXTENSION IN phpinfo (http://localhost:8080/phpinfo.php)
IT SHOULD SHOW LIKE THISCHECK IN CLI

WE ALSO NEED TO DISABLE xdebug EXTENSION. CHECK IF xdebug IS ENABLED

THEN I NEED TO DISABLE IT.

THEN DISABLE xdebug BY ADDING ‘;’ IN FRONT OF THE LINE LIKE THIS:

THEN RESTART php7.3-fpm SERVICE

MAKE THERE IS NO MORE WARNING ABOUT xdebug

SAMPLE FILES IN /home/teddy/Downloads/Ptcms_V4.2.8 DIR
IN THE DIR, COPY ‘env.example.php’ TO ‘env.php’ FILE
RUN FROM TERMINAL

THEN I GOT ERROR ABOUT MEMCACHE

MAKE SURE memcached SERVICE IS RUNNING

OR

ALSO CHECK IF memcached EXTENSION IS INSTALLED

IF THERE IS NO OUTPUT, THEN INSTALL IT (REF: https://serverpilot.io/docs/how-to-install-the-php-memcache-extension)

HERE IS THE PROCESS

THEN MODIFY /etc/php/7.3/fpm/php.ini AND /etc/php/7.3/cli/php.ini FILE THEN ADD THE EXTENSION extension=memcached.so
THEN RESTART THE SERVICES

 

Install Swoole on Ubuntu 16.04

Ref: https://github.com/swoole/swoole-docs/blob/master/get-started/installation.md
Install from pecl

Then include the extension “extension=swoole.so” in php.ini file. For php-fpm, the php.ini file in “/etc/php/7.2/fpm/php.ini”

then add this new line:

Save then restart php7.2-fpm service

look it up phpinfo() result. It should show like this:Pls do the same thing for php cli. the php.ini file for php cli in “/etc/php/7.2/cli/php.ini”. So edit the file and add a new line for the extension “extension=swoole.so”. Check the extension is loaded on the terminal:

Note: I tried to do this via terminal

But it didn’t work. The extension is not loaded so I put it manually in the php.ini for cli.
NOTE: IT NEED TO DISABLE ‘xdebug’ EXTENSION. CHECK IF xdebug IS ACTIVE/ENABLED:

IF IT IS ENABLED, THEN MODIFY ‘/etc/php/7.2/cli/conf.d/20-xdebug.ini’ FILE TO DISABLE xdebug BY ADDING ‘;’ IN FRONT OF THE LINE LIKE THIS:

IF xdebug IS ENABLED WHEN THE SERVER IS RUNNING, IT’D SPIT THIS WARNING:

TEST SWOOLE
ref: https://github.com/swoole/swoole-docs/blob/master/get-started/examples/tcp_server.md
Create a new file server.php

Run the php in a terminal

then open another terminal and type ‘telnet 127.0.0.1 9501’

The first terminal would print ‘Client : Connect’

You can connect with another new terminal.
To close the connection in the second terminal, press Ctrl + ] then type close in telnet>

The first terminal would give response like this:

Create web server
ref: https://github.com/swoole/swoole-docs/blob/master/get-started/examples/http_server.md
create a new file ‘http_server.php’

then run the server via terminal

Open it via web browser: http://127.0.0.1:9503/
It should show this message:

 

Install Microsoft Sql Server 2017 And The PHP Extension On Ubuntu 16.04

Ref: https://www.microsoft.com/en-us/sql-server/developer-get-started/php/ubuntu

1. Register the Microsoft Linux repositories and add their keys.
Note: it’d be better to use ‘sudo su’ first!

2. Install SQL Server.
NOTE: I USE ‘sudo apt-get install mssql-server=14.0.3192.2-2’ INSTEAD OF ‘sudo apt-get install mssql-server’ BECAUSE I GOT AN ERROR FOR SQLCMD ‘Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2746.’
REF: https://stackoverflow.com/questions/57265913/error-tcp-provider-error-code-0x2746-during-the-sql-setup-in-linux-through-te

3. Setup your SQL Server.
Note: I choose ‘Developer’ edition.

SORRY, ONLY ADMIN CAN SHOW THIS!
Check the mssql-server service status

NOTE: ERROR LOG IN /var/opt/mssql/log/error
MUST OPEN THE DIR WITH ‘sudo su’
4. Install the ODBC Driver and SQL Command Line Utility for SQL Server (SQLCMD)

After installing SQLCMD, you can connect to SQL Server using the following command: sqlcmd -S localhost -U sa -P Yourpassword
SORRY, ONLY ADMIN CAN SHOW THIS!

Install the PHP Driver for SQL Server

THEN

THEN

NOTE: IT’D COPY THE FILES ’20-sqlsrv.ini’ AND ’30-pdo_sqlsrv.ini’ TO DIR /etc/php/7.2/cli/conf.d/
THEN
MODIFY ‘php.ini’ file for php7.2 fpm and (cli NO NEED???)

THEN INSERT THESE TWO LINES:

NO NEED –>PLS DO THE SAME FOR ‘cli’: sudo gedit /etc/php/7.2/cli/php.ini

THEN COPY THE TWO INI FILES FROM ‘cli’ TO ‘fpm’

THEN RESTART PHP FPM

CHECK THEM IN phpinfo: http://localhost:8080/phpinfo.php

Create a database ‘SampleDB’ for your application

The DB will be exist in /var/opt/mssql/data/SampleDB.mdf and the log file.

Create a PHP app that connects to SQL Server and executes queries

Create a new file ‘connect.php’

RUN ON CLI:

NOTE: ON CLI I GOT THIS WARNING:

SOLUTION: REMOVE/COMMENT THE EXTENSIONS ‘sqlsvr’ AND ‘pdo_sqlsvr’ IN /etc/php/7.2/cli/php.ini FILES!
CHECK THE LOADED MODULE WITH: php -m
IT SHOULD BE ALREADY LOADED FOR CLI SO NO NEED TO INCLUDE THEM IN CLI php.ini BUT IT NEED TO INCLUDE FOR FPM php.ini !

ALSO RUN VIA WEB: http://localhost:8080/works/SqlServerSample/connect.php

 

UNINSTALL MS SQL SERVER
REF: https://dba.stackexchange.com/questions/174175/how-do-i-totally-remove-sql-server-2017-on-ubuntu

Uninstalling SQL Server on Ubuntu

 

Setup Postfix on Ubuntu 16.04 Localhost and Use Gmail SMTP

READ: https://devanswers.co/configure-postfix-to-use-gmail-smtp-on-ubuntu-16-04-digitalocean-droplet/

Prerequisites
If your Gmail account uses 2-Step Verification, you must create an application specific password.

If you’re not using 2-Step Verification, please ensure that your Gmail account is configured to allow less secures apps.

Remove sendmail

1. Install Postfix

Let’s update the package database first. On the first Postfix configuration screen, select OK by pressing TAB and ENTER. Select Internet Site and press ENTER. System mail name should be your domain name eg. example.com, press ENTER.
My mail name is teddy@teddy.localdomain
<NOTE>
PROBABLY THESE BELOW COMMAND NOT NEEDED:
I also need to install php-mail and php7.2-mail

modify php ini IN

OR FOR APACHE2 WEB SERVER

UNCOMMENT ‘sendmail_path’ THEN CHANGE TO

modify

like this:

Restart services

OR FOR APACHE2 WEB SERVER

</NOTE>

Configure Postfix
Edit the Postfix configuration file.

Add the following to the end of the file.

Save file and exit.

Create Password and DB Files
Create the sasl_passwd file which will store our credentials.

Insert the following:

SORRY, ONLY ADMIN CAN SHOW THIS!
Replace username and password with your own. Save file and exit. (Press CTRL + X, press Y and then press ENTER)

Create a hash database file for Postfix with the postmap command.

There should now be a file called sasl_passwd.db in the /etc/postfix/ directory.

For added security, we will only allow root user to read and write to sasl_passwd and sasl_passwd.db

Sign Certificate
Now we are going to create the certificate.

There should now be a certificate file called cacert.pem in /etc/postfix

Send a Test Mail
We’ll now send a test email message. Make sure to replace test@example.com with your own email address.

Don’t forget to check your spam folder.

If you still haven’t received any mail, check the mail error log.

NOTE:
TO USE GMAIL SMPT, YOU NEED TO ACTIVATE (SET IT ON) ‘Less Secure app’ ON YOUR GMAIL ACCOUNT. LOGIN TO YOUR GMAIL THEN OPEN THIS LINK: https://www.google.com/settings/u/2/security/lesssecureapps
IT’D REDIRECT YOU THE ‘Less Secure app’ SETTING.

Install Kubernetes On Ubuntu 16.04

ref: https://matthewpalmer.net/kubernetes-app-developer/articles/install-kubernetes-ubuntu-tutorial.html

NOTE: Make sure ‘virtualbox’ already installed!!!
Install kubectl

Install minikube (the newest 1.2.0) –> replace below ‘v0.28.2’ with ‘v1.2.0’!

We’re Done!
Now start up Minikube and use kubectl to find what version of Kubernetes you’re running on Ubuntu.
Minikube is a Kubernetes-specific package that runs a local development Kubernetes cluster on VirtualBox.
kubectl is the command line tool that lets you interact with your Minikube Kubernetes cluster.

 

Install MonoDevelop On Ubuntu 16.04

ref: https://www.monodevelop.com/download/

Add the Mono repository to your system (Ubuntu 16.04)

Install MonoDevelop

It’ll take a some time.
Open MonoDevelop (from terminal)

 

 

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.

 

Install MongoDb for Ubuntu 16.04

Ref: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04

Install MongoDB on Ubuntu: 5 Easy Steps

Install GrandNode eCommerce Platform on Ubuntu 16.04 | 18.04 | 18.10

This tutorial installs MongoDB 4.0 Community Edition . For other versions of MongoDB, refer to the corresponding version of the manual.
1. Import the public key used by the package management system.
The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import theMongoDB public GPG Key:

2. Create a list file for MongoDB.
Create the list file /etc/apt/sources.list.d/mongodb-org-4.0.list for your version of Ubuntu.

Click on the appropriate tab for your version of Ubuntu. If you are unsure of what Ubuntu version the host is running, open a terminal or shell on the host and execute lsb_release -dc.

3. Reload local package database.
Issue the following command to reload the local package database:

4. Install the MongoDB packages.
You can install either the latest stable version of MongoDB or a specific version of MongoDB.

Start MongoDb service

Check MongoDb status

Verify that the mongod process has started successfully by checking the contents of the log file at/var/log/mongodb/mongod.log for a line reading

27017 is the default port the standalone mongod listens on.

Create a database
NOTE: Make sure mongodb already start or start it

then run ‘sudo mongo’:

type in the terminal this script

it will look: