[41] Installing Ubuntu 64-bit Server on a Raspberry Pi 4

In this quick How-To we go through the steps we use to install Ubuntu Server on a Raspberry Pi 4. We use these devices for many standard tasks on our network. As ubuntu is one of our prefered operating systems for servers. Decided to record the steps we go through while preparing a new Raspberry Pi 4 that will run ubuntu 64 bit server in the environment.

Raspberry Pi Imager: https://www.raspberrypi.org/downloads/

Ubuntu for Raspberry Pi: https://ubuntu.com/raspberry-pi

[39] How to Install MediaWiki on Raspberry-Pi

—Walk Through Starts Here—

SSH to your Raspberry Pi

ssh pi@your-ip-address

Ensure the Raspberry-Pi is up-to-date

sudo apt update
sudo apt upgrade

Install the LAMP Stack on the Raspberry Pi
sudo apt-get install apache2 mariadb-server php php-mysql libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-curl php-bcmath git

sudo service apache2 reload

Download and extract MediaWiki
You can find the latest version here -> https://www.mediawiki.org/wiki/Download

As of writing this, the latest version is 1.36.1

cd /tmp/

wget https://releases.wikimedia.org/mediawiki/1.36/mediawiki-1.36.1.tar.gz

tar -xvzf /tmp/mediawiki-*.tar.gz

sudo mkdir /var/lib/mediawiki

sudo mv mediawiki-*/* /var/lib/mediawiki

sudo ln -s /var/lib/mediawiki /var/www/html/mediawiki

Configuring the MariaDB Database

sudo mysql -u root -p

Note: If you have not configured password it will be blank, so just press enter.

Create the User
mysql> CREATE USER 'wikidbadmin'@'localhost' IDENTIFIED BY 'YourPasswordHere';

Create the Database
mysql> CREATE DATABASE hendgrow_wiki;

mysql> use hendgrow_wiki;

Give the new user access to the new database
mysql> GRANT ALL ON hendgrow_wiki.* TO 'wikidbadmin'@'localhost';

mysql> commit;

mysql> quit;

Open your web browser and navigate to your server
Example: http://your-ip-address/mediawiki/

Our example: http://192.168.2.200/mediawiki/

You should see the following:

Download the “Localsettings.php” and copy it to your servers base wiki installation folder.

Refresh your browser. you should see page below.

Raspberry Pi with (OMV) openmediavault – How To-

(Including Apple Time Machine Support, Enabling Network Backups) 

Walk-through of how to install a NAS based on (OMV) openmediavault on a Raspberry Pi. Best features for us is the ability to create a SMB share that has Apple Time Machine support. This enables us to backup all our Mac machines 🖥 / 💻 using time machine to the network. No more usb drives.

Walk Through Guidehttps://hendgrow.com/ugs/RaspberryPi_OMV_WT.pdf

—INSTALL START—

Walk-through of how to install a NAS based on (OMV) openmediavault on a Raspberry Pi. Best features for us is the ability to create a SMB share that has Apple Time Machine support. This enables us to backup all our Mac machines 🖥 / 💻 using time machine to the network. No more usb drives.

Software:

Raspbian: https://www.raspberrypi.org/software/

Openmediavault: https://github.com/OpenMediaVault-Plugin-Developers

Commands:

$ sudo raspi-config

$ sudo apt-get update

$ sudo apt-get upgrade

$ wget https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install

$ chmod +x install

$ sudo ./install

—INSTALL END–

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.

The HendGrow site & YouTube channel was created to share knowledge by sharing how-to guides, book reviews, general knowledge etc, with the aim to empower the reader, viewer with the information to implement various solutions on their own or gain knowledge on various topics. Maybe you wondering what that book or topics is about, could be looking for a free firewall solution to protect the family or business. Have decided to open a store and need an open source web or retail Point of Sale (POS) system. The HendGrow site and channel provides walk-throughs on these and various other topics. The topics are either directly from our subscriber requests or derived from solutions we have implemented, that we believe could add value to the community. It’s our way to give back and hopefully help a few people along the way. If only one person gets value out of the how-to / walk-through guides then to us the effort was worth it.

Visit youtube & patreon