100% satisfaction guarantee Immediately available after payment Read online or as PDF No strings attached 4.6 TrustPilot
logo-home
Summary

Summary LAMP TAAK.docx

Rating
-
Sold
-
Pages
4
Uploaded on
26-11-2025
Written in
2025/2026

Summary of 4 pages for the course Systeembeheer 2 at Systeembeheer 2 (LAMP TAAK.docx)

Institution
Course

Content preview

LAMP TAAK: Lorenzo Meli A1 SYS&NET
Zie hier het script voor de taak




-----------------------------------------------------------------------
--


#!/bin/bash

# Bash script to automate LAMP stack installation and basic setup
# Tested on Ubuntu-based systems

# Variables
DB_ROOT_PASSWORD="rootpassword" # Change this to your desired MySQL
root password
DB_NAME="testdb"
TABLE_NAME="names"
WEB_ROOT="/var/www/html"
INFO_PAGE="info.php"
FORM_PAGE="form.php"
SUBMIT_PAGE="submit.php"

# Function to install Apache, MySQL, and PHP
install_lamp_stack() {
echo "=== Updating system packages ==="
sudo apt update -y

echo "=== Installing Apache ==="
sudo apt install apache2 -y
sudo systemctl start apache2
sudo systemctl enable apache2

echo "=== Installing MySQL ==="
sudo apt install mysql-server -y
sudo systemctl start mysql
sudo systemctl enable mysql

echo "=== Securing MySQL ==="
sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH
'mysql_native_password' BY '$DB_ROOT_PASSWORD';"
sudo mysql -e "FLUSH PRIVILEGES;"

echo "=== Installing PHP and required modules ==="
sudo apt install php libapache2-mod-php php-mysql -y
sudo systemctl restart apache2
}

# Function to configure MySQL database
configure_mysql() {
echo "=== Setting up MySQL database ==="
sudo mysql -u root -p"$DB_ROOT_PASSWORD" -e "CREATE DATABASE
$DB_NAME;"

Written for

Course

Document information

Uploaded on
November 26, 2025
Number of pages
4
Written in
2025/2026
Type
SUMMARY

Subjects

$9.13
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Read online or as PDF
No strings attached

Get to know the seller
Seller avatar
lorenzomeli

Also available in package deal

Get to know the seller

Seller avatar
lorenzomeli Hogeschool Gent
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 months
Number of followers
0
Documents
29
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions