vcjpierre
6/19/2018 - 7:24 AM

LAMP & PHPMyAdmin in Ubuntu 18.04

Apache & MySQL Ubuntu 18.04

sudo apt update
sudo apt install apache2
sudo systemctl status apache2
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload
sudo apt install mariadb-server mariadb-client
sudo systemctl status mysql
sudo mysql_secure_installation
set root password? [Y/n]: y
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
sudo apt install php php-common php-mysql php-gd php-cli
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php
sudo apt install phpmyadmin
sudo systemctl restart apache2
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf 
sudo a2enconf phpmyadmin
sudo systemctl restart apache2
sudo mysql -u root -p

CREATE USER 'admin'@'localhost' IDENTIFIED BY 'Contraseña'; GRANT ALL PRIVILEGES ON . TO 'admin'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; Exit;

https://www.solvetic.com/tutoriales/article/5609-como-instalar-lamp-phpmyadmin-en-ubuntu-18-04/