Skip to content

Instantly share code, notes, and snippets.

@DevSecOpsGuy
Last active May 17, 2020 10:15
Show Gist options
  • Save DevSecOpsGuy/001dfb2d7192f39d90c8d8542f7823b7 to your computer and use it in GitHub Desktop.
Save DevSecOpsGuy/001dfb2d7192f39d90c8d8542f7823b7 to your computer and use it in GitHub Desktop.
install LAMP + PHPMyAdmin on Ubuntu 18.04 LTS
# 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
@chatru-vs
Copy link

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment