Knowledge Base

How to install Apache, MySQL or MariaDB, and PHP using the A2 QuickInstaller

This article describes how to use the A2 QuickInstaller to install Apache, MySQL or MariaDB, and PHP. This configuration is also sometimes referred to as a LAMP (Linux, Apache, MySQL or MariaDB, and PHP) stack.

The A2 QuickInstaller is no longer supported, and is only available on older VPS hosting packages. On newer VPS hosting packages, you can use Webuzo to quickly and easily install a wide range of applications and manage your server.

To check if the A2 QuickInstaller supports this application for your Linux distribution, please see this article.

Installing Apache, MySQL or MariaDB, and PHP

To install Apache, MySQL or MariaDB, and PHP, follow these steps:

  1. Use SSH to log in to your system as the root user.
    To use the A2 QuickInstaller, you must log in as the root user using SSH. You cannot use the serial console in the VPS Control Panel to run the A2 QuickInstaller.
  2. To start the A2 QuickInstaller, type the following command, and then press ENTER:
    sh /usr/sbin/quickinstaller.sh
  3. Under Application Installers, type the option number for Web/Application Servers, and then press ENTER.
  4. On the Web/Application Server Menu, type the option number for LAMP - Apache, MySQL, PHP or LAMP with MariaDB, and then press ENTER. The A2 QuickInstaller updates your system, and then begins the installation process.
    The installation process takes some time to complete. Do not interrupt the installation process.
  5. When installation is complete, the A2 QuickInstaller displays the directory path for your web site files.

Securing the MySQL or MariaDB installation

If the A2 QuickInstaller prompted you at the end of the installation procedure to run mysql_secure_installation, you should do so now to help secure your MySQL or MariaDB installation. The mysql_secure_installation command allows you to set the root password and configure other security settings.

If the A2 QuickInstaller did not prompt you at the end of the installation procedure to run mysql_secure_installation, then the MySQL or MariaDB root password was generated automatically. To view the root password, type the following command, and then press ENTER:

more /root/.my.cnf

To secure the MySQL or MariaDB installation, follow these steps:

  1. Type the following command, and then press ENTER:
    mysql_secure_installation

    For more information about the mysql_secure_installation command, you can type the following command:

    man mysql_secure_installation
  2. When you are prompted to enter the current root password, press ENTER.
  3. At the Change the root password? prompt, type Y.
  4. Type the new password.
  5. Re-type the new password to confirm.
  6. At the Remove anonymous users? prompt, type Y.
  7. At the Disallow root login remotely? prompt, type Y.
  8. At the Remove test database and access to it? prompt, type Y.
  9. To make the changes take effect immediately, type Y at the Reload privilege tables now? prompt.

More Information