Install Old and Deprecated Ports on FreeBSD - 2024-02-01
One of my client runs an old database. How old? It’s MySQL 5.7.
But we need a test system. Something that looks and feels like the production system. And we need to find a way to install MySQL 5.7.
Turns out you can download an old version of the ports tree and start there. There is no guarantee it will work but it is a start.
The FreeBSD ports are hosted on multiple platforms. You can choose whatever you like most.
The name of the port I’m using in this example is
- Search for your port on freshports
- Open the last commit which removed the port. It’s probably the first entry on freshports. (cgit, Codeberg, GitLab, GitHub)
- Go to parent commit where the port has not been removed yet (cgit, Codeberg, GitLab, GitHub)
- On cgit you can now download a
.zipof the parent commit. On the other platforms, you need to click on “Browser files” or “Browse source” before you can download the source.
- Extract the archive
- Move to the right directory:
- Compile and install it:
ALLOW_UNSUPPORTED_SYSTEM="YES"; BATCH="YES"; make install clean
ALLOW_UNSUPPORTED_SYSTEM let’s you install the port on a different system than
it was planned to be installed on.
BATCH uses the default values for every prompt that might come up while
installing a port.
Now you just need to wait for the port and all of its dependencies to be compiled.