A LAMP Stack is a set of open-source software that can be used to create websites and web applications.

LAMP is an acronym, and these stacks typically consist of:

  • Linux operating system.
  • Apache HTTP server.
  • MySQL relational database management system.
  • PHP programming language.

Install the LAMP stack on Kali Linux is different from Ubuntu.

To create the LAMP server on KALI Linux follow these steps:

  1. Update your system.

sudo apt-get update

2. Install Apache2.

sudo apt-get install apache2

3. To start/restart/stop the Apache2 server:

$ /etc/init.d/apache2 start/stop/restart

4. Install MySQL and start the services:

$ sudo /etc/init.d/mysql start

$ sudo mysql_secure_installation

5. Install PHP (php7.0 is the latest version of PHP).

$ sudo apt-get -y install php7.0 libapache2-mod-php7.0

//Restart the server

$ systemctl restart apache2

6. Check whether it is working or not.

$ cd /var/www/html

$ touch info.php

$ nano info.php

Enter the below code in Info.php:

<?php

phpinfo();

?>

Save — CTRL+O+enter

Exit — CTRL+X+enter

7. Now open the browser and visit http://IP/info.php. You will see the following:

Leave a Reply

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