53GB

Installing LAMP Webserver In Debian 11



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;

Login To Database
mysql -u username -p

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

Exit mobile version