Skip to content

Instantly share code, notes, and snippets.

@dasbairagya
Last active August 21, 2019 08:45
Show Gist options
  • Save dasbairagya/238cf863015d1bab8412a0e0580f575d to your computer and use it in GitHub Desktop.
Save dasbairagya/238cf863015d1bab8412a0e0580f575d to your computer and use it in GitHub Desktop.
#Lamp Installation | Ubuntu
1)👉️Install Apache:
I. sudo apt update
II. sudo apt install apache2
III. sudo ufw allow 'Apache Full'
IV. sudo service apache2 restart
2)👉️Install Php
I. add-apt-repository ppa:ondrej/php
II. apt-get update
III. apt-get install php7.2
IV. apt-get install php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml
V. sudo service apache2 restart
3)👉️Install Mysql
I. sudo apt install mysql-server
II. sudo mysql_secure_installation
III. sudo mysql
IV. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
V. FLUSH PRIVILEGES;
Adjusting User Authentication and Privileges
Issue:root user authenticate using the auth_socket plugin.
To configure the root account to authenticate with a password, run the following ALTER USER command.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''
error:
Your password does not satisfy the current policy requirements
Check the authentication methods employed by each of your users again to confirm that root no longer authenticates using the auth_socket plugin:
sudo mysql
SELECT user,authentication_string,plugin,host FROM mysql.user;
Password policy:
SHOW VARIABLES LIKE 'validate_password%';
SET GLOBAL validate_password_policy=LOW;
sudo service mysqld restart
👉️Steps to do so-------------
📌️ SELECT user,authentication_string,plugin,host FROM mysql.user;
📌️ Password policy:
SHOW VARIABLES LIKE 'validate_password%';
SET GLOBAL validate_password_policy=LOW;
📌️ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''
📌️ sudo service mysql restart
📌️ sudo nano /etc/apache2/conf-available/phpmyadmin.conf
AllowOverride All //add this line
📌️ sudo systemctl restart apache2
4)👉️Install phpmyadmin
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-18-04
sudo apt-get install phpmayadmin
Securing Your phpMyAdmin Instance
📌️sudo nano /etc/apache2/conf-available/phpmyadmin.conf
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All //add this line
. . .
📌️sudo systemctl restart apache2
For my case
localhost/phpmyadmin
username: root
password:@Ece11801@
username: admin
password: Admin@123
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-18-04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment