In this lesson, you’ll learn how to install Apache, MySQL, and PHP programming language on FreeBSD. This combination of open-source programs is better known as the FAMP stack, FAMP being an acronym for the three. The FAMP stack is essentially a suite of software utilities that provides a FreeBSD server with the necessities to host dynamic webpages. If you’ve ever used Linux, you probably see the similarities to the LAMP stack, which serves a similar purpose on Linux.

To install the FAMP stack on FreeBSD 12.2, we’ll use pkg, the package manager for FreeBSD.

Step 1: Prime your FreeBSD system for FAMP installation

Before we start with the installation, it’s better to make sure that our system is up to date.

To see what version you’re using, enter:

If the version is out of date, enter the command below to update it:

$ freebsd-update fetch install

Install Apache, PHP, and MySQL on FreeBSD FreeBSD

# SetHandler application/x-httpd-php

#

#

# SetHandler application/x-httpd-php-source

#

#

To apply changes, save and exit the file.

Install Apache, PHP, and MySQL on FreeBSD FreeBSD