Skip to content

Instantly share code, notes, and snippets.

@linuxfemale
Created November 18, 2019 15:24
Show Gist options
  • Save linuxfemale/590d6ac244ddf8c995cf4452e8358a4e to your computer and use it in GitHub Desktop.
Save linuxfemale/590d6ac244ddf8c995cf4452e8358a4e 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment