Video in Live Server
==================
Debian 10 Install PHP, MySQL or MariaDB, phpMyAdmin and Apache
Prerequisites
sudo apt update && sudo apt upgrade
sudo apt install ca-certificates apt-transport-https
Step 1 – Installing Apache
Sudo apt install apache2
Step 2 – Installing MySQL Server
Sudo apt install mysql-server
Sudo mysql_secure_installation
Step 3 – Installing PHP
wget -O /etc/apt/trusted.gpg.d/php.gpg [ Ссылка ]
sudo echo "deb [ Ссылка ] buster main" | tee /etc/apt/sources.list.d/php.list
sudo apt update
Sudo apt install php php-mysql libapache2-mod-php
sudo apt install php-imagick php-phpseclib php-php-gettext php8.0-common php8.0-mysql php8.0-gd php8.0-imap php8.0-json php8.0-curl php8.0-zip php8.0-xml php8.0-mbstring php8.0-bz2 php8.0-intl php8.0-gmp
Step 4 – phpMyAdmin
wget [ Ссылка ]
apt install unzip
unzip phpMyAdmin-4.9.0.1-all-languages.zip
mv phpMyAdmin-4.9.0.1-all-languages /usr/share/phpmyadmin
chown -R www-data:www-data /usr/share/phpmyadmin
Create a MariaDB Database and User for phpMyAdmin
mysql -u root –p
CREATE DATABASE phpmyadmin DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL ON phpmyadmin.* TO 'phpmyadmin'@'localhost' IDENTIFIED BY 'your_preferred_password';
FLUSH PRIVILEGES;
EXIT;
Create Apache Configuration for phpMyAdmin
sudo nano /etc/apache2/conf-available/phpmyadmin.conf
------
------
----
a2enconf phpmyadmin.conf
a2ensite phpmyadmin.conf
sudo mkdir -p /var/lib/phpmyadmin/tmp
sudo chown www-data:www-data /var/lib/phpmyadmin/tmp
systemctl reload apache2
Now Create Database
Mysql –u root
![](https://s2.save4k.ru/pic/h3d9-CcCjw8/maxresdefault.jpg)