Installing LAMP Webserver In Debian 11
In this video, I show you how to install Apache, MariaDB, PHP 7/8, and phpMyAdmin in Debian 11. I’ll also show you how to configure virtualhosts, configure port forwarding, and setting up a domain to use with your server.
Chapters:
00:00 Intro
00:34 Installing Apache
01:11 Installing Curl
01:39 Installing MariaDB
02:40 Stopping and Starting Apache and MariaDB
03:51 Installing PHP 7.4 and 8
06:14 Installing phpMyAdmin
08:28 Setting Up Virtualhosts
12:37 Accessing Webserver Over The Internet
Installing Apache
👉🏾 apt install apache2
Starting, Stopping, and Reloading Apache
👉🏾 systemctl start apache2
👉🏾 systemctl stop apache2
👉🏾 systemctl reload apache2
Checking Apache Status
👉🏾 systemctl status apache2
Installing Curl
👉🏾 apt install curl
Installing MariaDB
👉🏾 apt install mariadb-server
Setting MariaDB Secure Credentials
👉🏾 sudo mysql_secure_installation
Starting and Stopping MariaDB
👉🏾 systemctl start mariadb
👉🏾 systemctl stop mariadb
Re-creating Database Root User
mysql -u root
DROP USER ‘root’@’localhost’;
CREATE USER ‘root’@’%’ IDENTIFIED BY ‘enter_password_for_root_here’;
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
Installing PHP 7.4
apt install php
apt install php libapache2-mod-php php-mysql
Installing PHP 8
apt install -y lsb-release ca-certificates apt-transport-https software-properties-common
echo “deb https://packages.sury.org/php/ $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/sury-php.list
wget -qO – https://packages.sury.org/php/apt.gpg | sudo apt-key add –
apt update
apt install php8.0
If PHP Is Not Executing, Try The Following Command Change the PHP Version To Your Version You Install
sudo a2dismod mpm_event && sudo a2enmod mpm_prefork && sudo a2enmod php8.0
Installing phpMyAdmin
apt install phpmyadmin
Original article which was used to help make this video 👉🏾 https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mariadb-php-lamp-stack-on-debian-10
Dre Techsoft Website 👉🏾 https://dretech.me/
My Developer Blog 👉🏾 https://drewilson.dev/
by Dre Techsoft
linux web server