LampOnUbuntu: LAMP Stack On Ubuntu 20.04
Copyright (C) 2020 Exforge exforge@x386.xyz
# This document is free text: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
# This document is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Based on Mark Drake's Tutorial on:
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04
# L: Ubuntu Server 20.04
# A: Apache 2
# M: MariaDB (Mysql could be another option)
# P: PHP (Python or Perl could be other options)
sudo apt update
sudo apt install apache2
2. Install And Configure MariaDB
# 2.1. Install
sudo apt install mariadb-server
# 2.1. Secure Mariadb
sudo mysql_secure_installation
# All default answers, give a good password
# 2.2. Configure root user for Mariadb
sudo mariadb
# Run on mariadb shell
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE USER='root';
FLUSH PRIVILEGES;
exit
sudo apt install php libapache2-mod-php php-mysql