This blog includes a series of videos and references to help new users or enthusiasts better understand how to use open source and free technology tools. The quick links includes more information for accessing many of the tools covered along with other references to learn more for taking advantage of these tools.
Alpine Linux is a really interesting, lightweight distribution of Linux that has a minimal foot print that belies some of the power capable in the distro. Not only is Docker easy to install on the platform, there are a lot of nice animations and quality of life features that makes what is normally the distro for building containers, a great distro to host those containers as well.
The latest version of Alpine features Linux kernel 6.12 which has a ton of nice features around the scheduler and a host of other features. While most of the features may not get used directly by a Docker host, the hosted containers will also leverage the underlying host OS kernel (a big difference between containers and VMs) so could also potentially benefit the application performance as well.
This video covers setting up a LAMP stack (Linux+Apache+MySQL(Maria)+PHP) in Alpine Linux. Alpine is a super lightweight distro popular with developers using Docker, but also a valid choice for VM work or standalone implementation.
This video walks through the process of setting up the various components of LAMP, though omits the Alpine install (it takes minutes if you know what you want and what your doing - select sys). Overall I'm quite impressed with Alpine, though there would certainly be conveniences just running Ubuntu Server, Alpine does the job with a fraction of the CPU/memory/capacity/cruft so if you can figure out how it can work for you, I think its worth a look.
Here are the steps shown in the video:
Alpine LAMP deployment
apk add apache2
apk add mariadb mariadb-client
rc-service start apache2
Check the homepage at the machine's IP, confirm you see 'It works'
Source files are located in /var/www/localhost/htdocs#
Ensure repositories are added - /etc/apk/repositories <- uncomment commmunity and edge
apk add php7 php7-mysqli phpmyadmin php7-apache2
service restart apache2
Create php test doc - nano phpinfo.php
service mariadb start
Setup Maria
Error message appears, need to first run the /etc/init.d/mariadb setup
Re-run service mariadb start
Then we change the password for mariadb root user (this gets created on the system by the mariadb-client).
Run mysql_secure_installation
Walk through the prompts to set a root user password
I do understand that this stack isn't necessarily the best in terms of performance or security, its simply the 'bare-minimum' to start developing. For optimization I'd suggest reading more on general Apache or NGINX settings, as well as looking to additional 3rd party sources about the various ways to integrate PHP with a web server.