Web hosted POS & e-commerce solution

During this walk-through we will guide you on how to install a web based POS and ecommerce solution that can be used to sell your goods via your physical and online stores from the same backend. If you don’t have a WordPress base to start with follow the links below. (This was done as a response to a request by on of our subscribers)

How to install the WordPress base server: https://youtu.be/vvOES877BAM How to secure your WordPress Server: https://youtu.be/XocAaMKuQ_k

[21] How to install WordPress locally on Ubuntu 20.04 (Start to Finish under 10 min)

In this walk-through we will install all the components needed to run WordPress on your own local or cloud Ubuntu 20.04 server. This video was done as a response to a direct request.

Installation of ubuntu server Raspberry Pi

WordPress based POS solution

The Base Install to run WordPress

ssh to the linux server you have provisioned. We used Ubuntu 20.04 for this walk-through.

We will install Apache, MariaDB, PhP7.4 and WordPress.

ssh root@95.217.222.229

Install Apache Web Server

sudo apt-get update

sudo apt-get install apache2 apache2-utils

sudo systemctl enable apache2

sudo systemctl start apache2

Test apache works by navigating to your servers Ip with a web browser. You should see the below

Image of Apache2 installed and working.

Install MariaDB Database Server

sudo apt-get install mariadb-server mariadb-client

Set the root password for the Database Server

sudo mysql_secure_installation

Enter current password for root (enter for none): (Press Enter)

Enter your new password and confirm

Remove anonymous users? [Y/n] Y

Disallow root login remotely? [Y/n] Y

Remove test database and access to it? [Y/n] Y

Reload privilege tables now? [Y/n] Y

mysql_secure_installation image of output

Install php

sudo apt-get install php7.4 php7.4-mysql php7.4-cli php7.4-cgi php7.4-gd libapache2-mod-php7.4

To test create a file called info.php

sudo vi /var/www/html/info.php

Add the following to the file:

phpinfo text for info.php test

Test php works by navigating to your servers Ip with a web browser. In our case it was http://95.217.222.229/info.php

You should see the below:

info.php page image

Install WordPress

First we need to get the latest WordPress files.

sudo wget -c http://wordpress.org/latest.tar.gz

Extract the files

sudo tar -xzvf latest.tar.gz

Move the WordPress files to /var/www/html

sudo rsync -av wordpress/* /var/www/html/

Set file / directory permissions

sudo chown -R www-data:www-data /var/www/html/

sudo chmod -R 755 /var/www/html/

Create the WordPress user and Database

login to the MariaBD server with the user root and the password you entered earlier.

mysql -u root -p

CREATE DATABASE wp_pos;

GRANT ALL PRIVILEGES ON wp_pos.* TO 'wpposuser'@'localhost' IDENTIFIED BY 'your_DB_password_here';

FLUSH PRIVILEGES;

EXIT;

Update the WordPress config file with Database and user information needed.

Navigate to /var/www/html/

cd /var/www/html/

sudo cp wp-config-sample.php wp-config.php

vi /var/www/html/wp-config.php

Enter the relevant details as seen below:

wp-config settings for walk-through

We now need to rename the default Apache index file so the wordpress one is the active one.

mv index.html index.html.old

Restart apache and Database to ensure the new configs are being use.

sudo systemctl restart apache2.service

sudo systemctl restart mysql.service

Initial WordPress Install

Test WordPress is ready for initial install navigating to your servers Ip with a web browser. you should see the following:

Wordpress Initial Install web page

If you see the page click on “Continue”. You should be presented with the page below. Complete the details and click “Install WordPress”

Creds input for WP install

Once the installation is complete login with the credentials you have just provided.

Wordpress Initial login picture

If your login is successful. You will be presented with the screen shown below. Your WordPress site is now up and running!

WordPress initial login

Build & run your own Minecraft server

We walk-through how to build your own Minecraft server & run it for under €10 a month. This video was inspired by one of our kids that required a Minecraft server to play on with friends.

We have hosted the following open Minecraft server should you want to test before building.

Note: The aim is to show you how to build a minecraft server. What we don’t cover in this setup is how to secure the server. Highly recommend that you always follow industry security & hardening standards.

Steps. PDF or follow below.

We walk-through how to build your own Minecraft server & run it for under €10 a month. This video was inspired by one of our kids that required a Minecraft server to play on with friends.

We have hosted the following open Minecraft server should you want to test before building. https://hendcraft.com/hcaws/

Note: The aim is to show you how to build a minecraft server. What we don’t cover in this setup is how to secure the server. Highly recommend that you always follow industry security & hardening standards.


–Start–


URL’s used

Hetzner Cloud – https://accounts.hetzner.com/login

Minecraft Server Download – https://www.minecraft.net/en-us/download/server/


–Steps–

  1. Navigate to https://accounts.hetzner.com/login and commision your selected ubuntu server.
  2. Open your ssh client and ssh to the server you just commissioned.

ssh root@your-server-ip

  1. Enter the password that was provided to you in the mail from Hetzner. It will prompt you to select a new password. input your password and again to confirm it.
  2. update your server instances software

apt-get update

apt-get upgrade

  1. Next install Java as Minecraft version we installing requires it. When prompted if you want to continue select yes.

apt-get install openjdk-14-jdk

  1. Validate the JDK install

java –version

  1. Create a directory for the Minecraft server to run.

cd /opt

mkdir minecraft

cd /opt/minecraft

  1. Download the “server.jar” from the minecraft.net site.

wget https://launcher.mojang.com/v1/objects/a412fd69db1f81db3f511c1463fd304675244077/server.jar

  1. Install screen. Screen provides the ability to run multiple shell sessions from a single ssh session. This will allow us to launch the minecraft server and detach from the session allowing the Minecraft server to continue to run.

apt-get install screen

  1. Launch the Minecraft server for the first time.

cd /opt/minecraft

java -Xmx2GB -Xms1G -jar server.jar -nogui

  1. You will be prompted to agree to the eula. Open the eula file with a file editor like vi or nano.

vi eula.txt. (Update the line “eula=false to eula=true“)

  1. Once the eula has been accepted. Launch the Minecraft server again. Once running you can disconnect from the screen session with Ctrl+a+d

cd /opt/minecraft

java -Xmx2GB -Xms1G -jar server.jar -nogui

  1. Launch your minecraft client. Select Play.
  2. Select Multiplayer
  3. Select Add Server
  4. Input the details of your server. Provide a name and enter your server public IP. The select done.
  5. Select the server entry you just added and click on “Join Server”

Blocking https sites with IPFire

Got a request from “dedu mihail” & “Amandeep Singh” on how to block https sites. In this quick walk-through we show how to use the proxy with manual settings which is needed to block https urls / sites. It does not work via transparent mode. (We could not find a simple way to make it work via transparent mode).

1. Configure the end user machine to use the proxy.

2. Configure the proxy on IPFire to use the url filter capability.

3. Configure the url filter to block the https url 4. Configure the url filter to allow restriction bypass for listed IP’s.

Your free & private VPN solution! Use it while on the go! (A how to guide)

Ever been away from home or office and wanted to use a VPN securing your network connection. (You should always use a VPN when on un-trusted networks!) You also never sure what the “Free” VPN providers are doing with your logs. Why not setup your own VPN, that you have full control off. In this how to guide we will go through the installation of IPFire with OpenVPN and the relevant configurations. This will enable you to make use of your own private VPN when away from home or the office.

NextCloud Setup – Azure

In this walk-through we will demonstrate the basic steps used to install NextCloud on Azure.

This walk-through will include:

1) Create the Virtual Machine running Ubuntu

2) Install snap & NextCloud via snap on the Virtual Machine.

3) Configure Static IP with DNS / FQDN.

4) Configure Firewall rules.

5) Configure HTTPS with lets Encrypt

6) Test the the NextCloud instance is accessible.

Commands used:

  1. sudo apt-get update
  2. sudo apt-get install snap
  3. sudo snap install nextcloud
  4. sudo nextcloud.enable-https lets-encrypt

Keep in mind this is only a basic install and will need to be secured using best security practices etc. If enough demand, we might do a future walk through on how to secure your public facing systems. 

NextCloud Setup – Raspberry Pi !

In this walk-through we will take you through the steps on how to install NextCloud on your Raspberry Pi.

This walk-through will include:

1) How-to format and mount an external usb disk for data storage.

2) How-to install and setup MariaDB for the SQL backend.

3) How-to instal the NextCloud Software.

Steps – Pdf NextCloud Setup – Raspberry Pi  or follow below.

NextCloud Setup – Raspberry Pi !


Url’s used: Rasbian

https://www.raspberrypi.org/downloads/raspbian/


Components:

  • Raspberry Pi 3
  • 32 GB SD Card
  • USB Keyboard
  • Monitor with HDMI
  • 2TB External HDD (usb)

Steps:

Setup your raspberry Pi

  1. Download the arm image from https://www.raspberrypi.org/downloads/raspbian/
  2. Extract the image from the file you have downloaded.
  3. Flash your SD Card with the image you extracted using Etcher. (Or your preferred tool)
  4. Remove the SD Card from your computer and insert it into the Raspberry Pi.
  5. Connect all the components to the Raspberry Pi and power it on
  6. Complete the usual installation / configuration steps. (https://www.raspberrypi.org/documentation/installation/installing-images/README.md)
  7. Set a static IP. We will use 192.168.1.253 for our lab demosud.
  8. ssh to your raspberry pi and follow the below sections.

Preparing the External HDD (usb)

  1. Before you plug in the usb disk, Tail the messages file with the command below:

~$ tail -f /var/log/messages | grep disk

Our output:

We now know that the disk is on ## /dev/sda

  1. Let us now create a partition.

~$ sudo fdisk /dev/sda

Our inputs used in order (m | d | F | n | y | w)

Visual below:

  1. Create the filesystem.

~$ sudo mkfs -t ext4 /dev/sda1

  1. Create a directory to test the mount.

~$ sudo mkdir /mnt/NCSTORE

  1. Verify the disk is able to mount

~$ sudo mount /dev/sda1 /mnt/NCSTORE

  1. list the currently mounted disks.

~$ df -lh

You should see the volume mounted:


Hendgrow Lab df

  1. If all working as expected, edit the /etc/fstab to make the mount permanent. As per our example we added the following line:

HendGrow Lab fstab pic

Update the installation.

~$ sudo apt-get update

~$ sudo apt-get upgrade


MariaDB Install & DB / User creation.

  1. Install MariaDB and secure it.

~$ sudo apt install mariadb-server

~$ sudo mysql_secure_installation

Our inputs used in order (y | y | y | y | y)

Don’t forget the password you set during this step!

Create the NextCloud Database & DB user

  1. Login to the SQL server and provide the password you set in the previous step.

~$ sudo mysql -u root -p

  1. Create the Database to be used by NexCloud

CREATE DATABASE ncdb;

  1. Create the user we will use to access the DB we just created

CREATE USER ‘ncdbuser’@’localhost’ IDENTIFIED BY ‘yourpasswordhere’;

  1. Grant the user permissions to use the DB we created

GRANT ALL PRIVILEGES ON ncdb.* TO ‘ncdbuser’@’localhost’;

  1. Finalize the setting with

FLUSH PRIVILEGES;


Install NextCloud

  1. Install Apache, PHP & PHP SQL Connector.

~$ sudo apt-get install apache2 php-mysql php7.3 php7.3-gd php7.3-curl php7.3-zip php7.3-xml php7.3-mbstring

  1. Now restart Apache

~$ sudo service apache2 restart

  1. Fetch NextCloud and extract it.

At the time of this walk through version nextcloud-17.0.2. is the most current.

To view what is available see: https://download.nextcloud.com/server/releases/

~$ cd /var/www/html

~$ curl https://download.nextcloud.com/server/releases/nextcloud-17.0.2.tar.bz2 | sudo tar -jxv

  1. We need to set the correct permissions

~$ sudo chown -R www-data:www-data /var/www/html/nextcloud/

~$ sudo chown -R www-data:www-data /mnt/NCSTORE

~$ sudo chmod 750 /mnt/NCSTORE

  1. Open your browser and navigate to your Raspberry pi ip/nextcloud

http://192.168.1.253/nextcloud

  1. Enter the details requested.

Enabling Network-Wide Ad blocking!

In this walk through we will show you how to install Pi-Hole to enable network wide ad blocking on your network. We will also show you how to configure a windows machine and the basic steps on how to enable it network wide via your router.

–START–

Url’s used: Pi-Hole – https://pi-hole.net/

Debian 9 (Stretch) – https://www.debian.org/releases/stretch/debian-installer/

DD-WRT – https://dd-wrt.com/

Prerequisites

Prerequisites

Steps

  1. Install one of the supported operating systems
  2. ssh to the OS you decided to use after the OS installation. (We used Debian 9 for the walk through.)– $ su– # wget -O basic-install.sh https://install.pi-hole.net– # bash basic-install.sh
  3. login you our device/s and point its dns settings to the Pi-Hole server. Alternatively change the settings on your router to provide the Pi-Holes ip as your networks dns via DHCP. For more detail refer to the video provided by the link below or reach out to us.

Star Wars : Episode IV in ASCII

Star Wars : Episode IV in ASCII. Found this old gem on the internet while working on another project. Thought it’s worth sharing. For more information regarding Star Wars Episode IV in ASCII visit:

—http://asciimation.co.nz & http://blinkenlights.nl—

Star Wars : Episode IV in ASCII

Watch it via Telnet

Install telnet on your preferred OS. Then telnet to the url. We used Ubuntu 18.04 LTS

  • Install telnet
    hendgrow@HGMCSRV01:/$ sudo apt-get install telnet
  • Kick it off
    hendgrow@HGMCSRV01:/$ telnet towel.blinkenlights.nl

Watch it via your web browser

Open your web browser and navigate to – http://asciimation.co.nz