Skip to content

aelasefa/Born2beRoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 

Repository files navigation

πŸ” Born2beroot Project

This repository contains scripts and configurations for setting up a secure and functional Debian-based virtual machine for server management.
It includes services that support WordPress hosting and a bonus service for easier system administration using Webmin.


πŸ“š Table of Contents


🧠 About Born2beroot

Born2beroot is a system administration project designed to teach you how to:

  • Set up a secure virtual machine with essential services.
  • Deploy WordPress using Lighttpd and MariaDB.
  • Integrate a web-based administration tool like Webmin.

This project boosts your understanding of web servers, databases, and Linux system management.


🎯 Project Goals

  • βœ… Deploy Lighttpd as a lightweight web server for WordPress.
  • βœ… Set up MariaDB as the database server.
  • βœ… Install Webmin for bonus web-based system administration.
  • βœ… Apply security best practices: sudo, firewall, SSH, and permissions.

πŸ’» System Requirements

  • Debian 12 (Bookworm) or compatible Debian-based system.
  • VirtualBox / VMware for virtualization.
  • Internet connection for installing packages.
  • sudo privileges for installation and configuration.

βš™οΈ Setup Instructions

1. Update the System

sudo apt update && sudo apt upgrade -y

2. Install Lighttpd

sudo apt install lighttpd -y
sudo systemctl enable lighttpd
sudo systemctl start lighttpd

Verify it's running:

sudo systemctl status lighttpd

Allow HTTP traffic:

sudo ufw allow 80/tcp

3. Install MariaDB

sudo apt install mariadb-server -y
sudo systemctl enable mariadb
sudo systemctl start mariadb

Secure the installation:

sudo mysql_secure_installation

Create a database and user:

sudo mysql -u root -p
CREATE DATABASE wordpress;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

4. Install PHP

sudo apt install php php-cgi php-mysql php-fpm -y
sudo systemctl restart lighttpd

πŸ“ WordPress Deployment

  1. Download and extract WordPress:
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
sudo mv wordpress /var/www/html/
  1. Configure WordPress:
sudo cp /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php
sudo nano /var/www/html/wordpress/wp-config.php

Update database settings:

define('DB_NAME', 'wordpress');
define('DB_USER', 'wp_user');
define('DB_PASSWORD', 'your_password');
define('DB_HOST', 'localhost');
  1. Set permissions:
sudo chown -R www-data:www-data /var/www/html/wordpress
  1. Open in browser:
http://<your-server-ip>/wordpress

🧰 Install Webmin (Bonus Service)

  1. Add Webmin GPG key and repository:
wget -qO- http://www.webmin.com/jcameron-key.asc | sudo tee /etc/apt/trusted.gpg.d/webmin.asc
sudo sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list'
  1. Install Webmin:
sudo apt update
sudo apt install webmin -y
  1. Access Webmin in browser:
https://<your-server-ip>:10000

Login using root credentials.


πŸ”— Services Included

Service Purpose Access
Lighttpd Web server for WordPress http://<server-ip>/wordpress
MariaDB WordPress database backend Access via terminal
Webmin Web admin panel (bonus) https://<server-ip>:10000

πŸ” Security Considerations

  • Use strong passwords for all services.
  • Limit Webmin access to trusted IP addresses.
  • Enable a firewall:
sudo ufw allow 80/tcp      # HTTP
sudo ufw allow 10000/tcp   # Webmin
sudo ufw enable

πŸ“š Resources


🧩 β€œSecurity is not a product, but a process. Born2beroot teaches you how to build it from the ground up.”

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors