## Linux

Updated:

I would call setting up AMP on Linux the easiest of the Big Three. First of all, as on any OS, you can always compile the program from source, but there’s a strong chance you’re more interested in using your Linux distribution’s repositories, as their whole purpose is to relieve users from compiling code themselves. Sometimes, your distro’s offical repos will not offer the most recent version of a program. For example, Fedora Rawhide only offered httpd 2.4.7 while a later ones were available from source. Also, you’ll be hard pressed to find common repositories with the most recent PHP and MySQL. Search rmpfind.net to see if you can find a Linux distro with the program versions you’re looking for.

# Redhat/Cent OS/Fedora

Use yum or the graphical software manager to find the dependencies for “httpd”, “php”, and “mysql”. Better yet, follow this brilliant man’s guide, and you can’t possibly go wrong. Even now in 2018, that guide is very relevant. Look at the descriptions for the packages you choose to confirm which version you’re getting. You may also have to search for various php extensions that may not come by default, like php-mysql and php-mcrypt.

If the versions available are not so recent, see if there are more recent options in the Software Collections.

# Ubuntu

Here, you’ll be using programs like apt-get and apt-cache to install new software and to see what you already have. Ubuntu has made an excellent guide to walk you through setup and help you find the appropriate software packages. As always, check the main software repositories to see if they have the version you want. The more popular Linux distributions tend to have online guides specifically geared towards setup on their environment, but many of these instructions pertain to Linux environments general.

Ubuntu 17.01 will get you as far as php 7.1. For 7.2, try the ppa:ondrej/php repository, the installation from which goes something like this:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2 php7.2-curl php7.2-mysql


This site uses Akismet to reduce spam. Learn how your comment data is processed.