Saturday , July 4 2020
Home / Technology / IT / Linux / How to Install LAMP Server on Linux Mint 19 Cinnamon With few Commands
How-to-Install-LAMP-Server-on-Linux-Mint-19-Cinnamon-With-few-Commands
How-to-Install-LAMP-Server-on-Linux-Mint-19-Cinnamon-With-few-Commands

How to Install LAMP Server on Linux Mint 19 Cinnamon With few Commands

How to Install LAMP Server on Linux Mint 19 Cinnamon With few Commands :

Step 1: Update Linux

sudo apt-get update && sudo apt-get dist-upgrade -y

Reboot

sudo reboot

Step 2: Install the LAMP Server

sudo apt-get install lamp-server^ -y

Step. 3: Setup MySQL

Just enter a password for the root account twice when you asked.

Step 4: Test Apache

http://localhost

Step 5: Test PHP

sudo nano /var/www/html/info.php

Add the below line

<?php phpinfo(); ?>

Then CTRL+X then y and Enter

In your browser paste this line:

http://localhost/info.php

Note: Different versions of Linux store files in different folders by default. If the PHP test throws a browser error, you probably need to investigate and find out exactly where the test file is stored.

Install PHPMyAdmin

sudo apt-get install phpmyadmin -y

Note: You cannot login to phpmyadmin using root any more, So do as below to login with same privileges but with another user.

  • Login to mysql
sudo mysql -u root
  • Grant privileges to a new user execute below command in mysql interface: “replace new-user with the name you need”

CREATE USER 'new-user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON
*.* TO 'new-user'@'localhost';
FLUSH PRIVILEGES
;

Now exit mysql and restart mysql

exit
service mysql restart

Test in broswer:

http://localhost/phpmyadmin

About ahmed@kalaweeza.com

Check Also

Installing Xtreme Download Manager on Linux mint from command line

Today: Installing Xtreme Download Manager on Linux mint from command line: Lets start! sudo wget https://netix.dl.sourceforge.net/project/xdman/xdm-2018-x64.tar.xz …

Leave a Reply

Your email address will not be published. Required fields are marked *