Last active
May 17, 2020 10:15
-
-
Save DevSecOpsGuy/001dfb2d7192f39d90c8d8542f7823b7 to your computer and use it in GitHub Desktop.
install LAMP + PHPMyAdmin on Ubuntu 18.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install apache | |
sudo apt install apache2 | |
# Install PHP | |
sudo nano /var/www/html/phpinfo.php | |
and type | |
<?php | |
phpinfo(); | |
?> | |
sudo apt-get install php php-curl php-xml libapache2-mod-php php-mysql php-mbstring php-gettext | |
# Install MySql | |
sudo apt-get install mysql-server mysql-client | |
sudo mysql_secure_installation | |
sudo phpenmod mbstring | |
sudo systemctl restart apache2 | |
sudo mysql -u root -p | |
# MySQL CLI | |
SELECT user,authentication_string,plugin,host FROM mysql.user; | |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpass'; | |
FLUSH PRIVILEGES; | |
exit; | |
# Install PHPMyAdmin | |
sudo apt-get install phpmyadmin | |
sudo nano /etc/apache2/apache2.conf | |
Then add the following line to the end of the file: | |
Include /etc/phpmyadmin/apache.conf | |
/etc/init.d/apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice