- Update system packages:
sudo apt update && sudo apt upgrade -y
- Install Dependencies:
sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql python3 openjdk-17-jre-headless -y
- Enable and start Apache:
sudo systemctl enable apache2
sudo systemctl start apache2
- Edit the crontab:
crontab -e
NOTE: If prompted to select an editor, select nano.
- Enter this into the crontab:
*/10 * * * * sudo chmod 0777 /var/www/html/ -R
save and exit now(ctrl+x,y,enter).
- Create the database (edit it to your liking):
sudo mysql -u root -p < database.sql
- Clear the /var/www/html folder and copy everything inside the webserver directory to it.
- Set directory permissions:
sudo chmod 0777 /var/www/html -R
- Restart Apache:
sudo systemctl restart apache2