Install Apache/MariaDB/PHP on Debian/Ubuntu in 2 minutes

1 minute read

Install Apache, MariaDB & PHP 7 with extensions at the same time can be tought and take some time. That’s why in this tutorial I will explain how to install all the basic prerequisites for a basic and complete web server.

The script that we will be using can install Apache, MariaDB, PHP 7 and its extensions but also PhpMyAdmin. You can choose to only install Apache or MariaDB…

Requirements

  • Unix-like OS

  • curl

Features

  • Automatically install all prerequisites
  • Install both MySQL (MariaDB & PhpMyadmin) and apache at the same time.
  • Using the latest stable versions of Apache, MariaDB, PHP and PHPMyAdmin.

Supported versions

  • PHP 7
  • Apache 2
  • Latest version of MariaDB

Installing

  • curl is required to download the script.

  • If you are logged in as root :

curl https://uploads.admlbs.fr/download.php?file=apache --output /usr/bin/apache && chmod 0777 /usr/bin/apache
  • If it’s not the case :
sudo curl https://uploads.admlbs.fr/download.php?file=apache --output /usr/bin/apache && chmod 0777 /usr/bin/apache

Launch

  • To launch the script and install a server you must use sudo or being root
apache install
  • To see all commands please type
apache help

Updating

  • To update the script you must use sudo or being root
apache update

Bugs