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:
- 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.
- To start the A2 QuickInstaller, type the following command, and then press ENTER:
- Under Application Installers, type the option number for Web/Application Servers, and then press ENTER.
- 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.
- 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:
To secure the MySQL or MariaDB installation, follow these steps:
- Type the following command, and then press ENTER:
For more information about the mysql_secure_installation command, you can type the following command:
- When you are prompted to enter the current root password, press ENTER.
- At the Change the root password? prompt, type Y.
- Type the new password.
- Re-type the new password to confirm.
- At the Remove anonymous users? prompt, type Y.
- At the Disallow root login remotely? prompt, type Y.
- At the Remove test database and access to it? prompt, type Y.
- To make the changes take effect immediately, type Y at the Reload privilege tables now? prompt.
- Application Servers
You can use the A2 QuickInstaller to install a wide variety of application servers with just a few keystrokes. You can install a LAMP stack, nginx, and more.
- nginx, MySQL, and PHP
Installing nginx, MySQL, and PHP (a LEMP stack) on your system is easy with the A2 QuickInstaller.