In my previous post I previously had OpenWrt running with Nginx, PHP7, SQLite and Wordpress which did ran well for few weeks and went broken when I tried to run an update/upgrade. Mostly due to my fault and being not very aware that the builds released in wulfy23/rpi4 are experimental.
In this post I'll list the current Wordpress development server I'm using for day-to-day work. The goals are in contrast with my OpenWrt Wordpress build which are
- stable
- easy to install
- easy to update
The only Raspberry Pi operating system that worked beatifully is DietPi.
- Raspberry Pi 4 Model B 8GB BCM2711 Quad core Cortex-A72
- Mainly for a web server you would not need the full 8gb ram, you could either use 2gb or 4gb ram since LAMP ony uses less than 1gb.
- SanDisk Extreme 64GB
- You can use a lesser 32GB version of micro SD
- ARCANITE 256GB USB 3.1 Flash Drive
- This is where I store all my mysql and webserver files. I really felt the speed benefits this special thumbdrive gave.
On getting-started with DietPi the official Installation page is up-to-date and best so far.
Below is a quick list of software I installed via dietpi-software
~# dietpi-software list | grep =2
ID 10 | =2 | iftop: displays bandwidth usage information |
ID 12 | =2 | Iperf: internet protocol bandwidth measuring tool |
ID 20 | =2 | Vim: vi enhanced text editor |
ID 76 | =2 | LAMP: Apache2 | MariaDB | PHP | +Apache2 +MariaDB +PHP | ...
ID 83 | =2 | Apache2: Popular webserver | +PHP | ...
ID 88 | =2 | MariaDB: Persistent cached file-per-table database server | ...
ID 89 | =2 | PHP: Hypertext Preprocessor for dynamic web content | ...
ID 90 | =2 | phpMyAdmin: Optional MariaDB web interface admin tools | ...
ID 109 | =2 | NFS Server: Network File System server
Below is an example of what I have inside /etc/exports
/mnt/arcanite 192.168.0.999(rw,async,insecure,no_subtree_check)
The main highlight here is the async which sped up my transfers a lot.
I used the Arcanite USB to store the data of mysql
~# mysql
MariaDB [(none)]> SELECT @@datadir;
+---------------------------+
| @@datadir |
+---------------------------+
| /mnt/arcanite/mysql-data/ |
+---------------------------+
1 row in set (0.001 sec)
This tutorial change the data directory of MariaDB / MySQL should be similar to what I have done.
DietPi is very easy to update. Most of the time you just need to run dietpi-update
.
Most of the time it is only apt upgrade
if there are firmware updates from raspberrypi.org
For now, the alternative I'm looking out is AlmaLinux For Raspberry Pi, which I think it is worth testing since stability is one of the main goals.