Dexter Evil Clone.

Alchemiclabs.ca


Welcome Demo

Setting up a LAMP (Linux, Apache, MySQL, PHP) server on Debian involves several steps. Here's a step-by-step guide to help you get started:

Step 1: Install Debian

  1. Download the Debian ISO from the official website: https://www.debian.org/
  2. Create a bootable USB drive or DVD using the ISO.
  3. Boot your server from the USB drive or DVD and follow the installation wizard to install Debian.

Step 2: Update the System

  1. Log in to your Debian server using the root or a sudo-enabled user.
  2. Open a terminal or SSH into the server.
  3. Update the package list and upgrade the existing packages:
    sudo apt update
    sudo apt upgrade

Step 3: Install Apache Web Server

  1. Install Apache using the package manager:

    sudo apt install apache2
  2. Start the Apache service and enable it to start on boot:

    sudo systemctl start apache2
    sudo systemctl enable apache2
  3. Verify that Apache is running by opening a web browser and entering your server's IP address or domain name.

Step 4: Install MySQL Database Server

  1. Install MySQL server and client packages:

    sudo apt install mysql-server mysql-client
  2. During the installation, you will be prompted to set the root password for MySQL. Choose a strong password and remember it.

  3. Start the MySQL service and enable it to start on boot:

    sudo systemctl start mysql
    sudo systemctl enable mysql
  4. Secure your MySQL installation by running the security script:

    sudo mysql_secure_installation

Step 5: Install PHP

  1. Install PHP and necessary modules:

    sudo apt install php libapache2-mod-php php-mysql
  2. After installation, restart Apache for the PHP module to be loaded:

    sudo systemctl restart apache2

Step 6: Test PHP

  1. Create a PHP info file to check if PHP is working correctly:

    echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/phpinfo.php
  2. Open a web browser and access http://your_server_ip/phpinfo.php. You should see the PHP info page displaying various PHP configuration details.

Step 7: Configure Firewall (Optional)

  1. If you have a firewall installed (e.g., UFW), open ports 80 (HTTP) and 443 (HTTPS) to allow web traffic:
    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    sudo ufw enable

Step 8: Optional Steps

That's it! You now have a LAMP server set up on your Debian system. You can proceed to deploy web applications or host websites on your server. Remember to keep your system and software up-to-date and maintain security best practices.