A LAMP server is a web server that uses the Linux operating system, Apache web server software, MySQL database management system, and PHP scripting language.
To set up a LAMP server on Debian Linux 8 (Jessie), follow these steps:
- Install Apache web server:
sudo apt-get install apache2
- Install MySQL database:
sudo apt-get install mysql-server
- Install PHP:
sudo apt-get install php5 libapache2-mod-php5
- Restart Apache to enable PHP:
sudo service apache2 restart
- Test the LAMP server by creating a test PHP file at
/var/www/html/info.php
:
sudo nano /var/www/html/info.php
Add the following content to the file:
phpinfo();
- Access the test file from a web browser:
http://server-ip-address/info.php
If the LAMP server is set up correctly, you will see the PHP information page displayed in your browser.
Note: You may need to configure the firewall and Apache settings to allow external access to the server, and secure the MySQL installation by setting a root password and removing default user accounts.