Monday, September 30, 2024

Debian LAMP

 sudo apt update

sudo apt install apache2

sudo systemctl enable apache2

sudo systemctl start apache2

sudo systemctl status apache2

sudo apt install mariadb-server

sudo mysql_secure_installation

sudo systemctl enable mariadb

sudo systemctl start mariadb

sudo systemctl status mariadb

sudo apt install php libapache2-mod-php php-mysql

sudo systemctl restart apache2

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/index.php

sudo ufw status

sudo ufw allow 80/tcp

sudo ufw allow 443/tcp

sudo ufw reload

sudo ufw status

sudo apt update

sudo apt install phpmyadmin

sudo nano /etc/apache2/apache2.conf

Include /etc/phpmyadmin/apache.conf

sudo systemctl restart apache2

sudo nano /usr/share/phpmyadmin/.htaccess

+

AuthType Basic

AuthName "Restricted Access"

AuthUserFile /etc/phpmyadmin/.htpasswd

Require valid-user

sudo htpasswd -c /etc/phpmyadmin/.htpasswd pma

sudo nano /etc/phpmyadmin/apache.conf

<Directory /usr/sare/phpmyadmin>

+

AllowOverride All

sudo systemctl restart apache2







No comments:

Post a Comment

Коментар: