This document provides a comprehensive guide on setting up a Linux server without a graphical user interface (GUI) to run multiple services including DHCP, DNS, a web server with MariaDB for database management, and GLPI for internal resource management. It also covers the setup for remote server management via SSH and includes additional software installations.
- DHCP Server Configuration
- DNS Server Configuration
- Web Server and MariaDB Setup
- Remote Management via SSH
- Additional Software
- Weekly Backup Configuration
- Conclusion
For the project, we've set up two virtual machines (VMs) to create a controlled and isolated environment:
Client VM running Kali Linux: Chosen for its comprehensive suite of security and penetration testing tools, allowing us to assess and ensure the security of our server setup.
Server VM running Ubuntu: Hosts our core services including DHCP, DNS, Apache with MariaDB, and GLPI, providing a stable and widely-used platform for server-side configurations.
sudo apt-get update
sudo apt-get install isc-dhcp-server
- File Location:
/etc/dhcp/dhcpd.conf
- Scope Definition: Define a subnet with a range of IP addresses to be dynamically allocated to clients.
subnet 192.168.64.0 netmask 255.255.255.0 {
range 192.168.64.10 192.168.64.100;
option domain-name-servers 192.168.64.5;
option routers 192.168.64.1;
}
Service Management: Start and enable the DHCP service.
sudo systemctl start isc-dhcp-server
sudo systemctl enable isc-dhcp-server
sudo apt-get install bind9
- File Location:
/etc/bind/named.conf
- Zone Files: Located in
/etc/bind/zones/
(if you organize your zones in a separate directory). - Scope Definition: Define a subnet with a range of IP addresses to be dynamically allocated to clients.
Example zone definition :
zone "local.becode" IN {
type master;
file "/etc/bind/zones/db.local.becode";
};
sudo systemctl start bind9
sudo systemctl enable bind9
sudo apt-get install apache2
sudo apt-get install mariadb-server
- Download GLPI and extract it to the web server's root directory.
- Create a MariaDB database for GLPI.
- Access https://192.168.64.6/glpi to run the web installer.
- Ensure SSH is installed (openssh-server package).
- Edit /etc/ssh/sshd_config for any specific configurations.
- Restart SSH service to apply changes.
- LibreOffice: For office productivity tools.
- GIMP: For image editing.
- Mullvad VPN: For secure internet access. Note: Install the VPN client as per the official documentation.
Set up a cron job to back up configuration files weekly.
- Edit the crontab with sudo crontab -e.
- Add a line for the backup script, e.g., 0 3 * * 0 /path/to/backup_script.sh, to run it weekly.
You can check below if each of the services (DHCP, DNS, Apache, MariaDB, and SSH) is running properly on a Linux system.
sudo systemctl status isc-dhcp-server
sudo systemctl status bind9
sudo systemctl status apache2
sudo systemctl status httpd
sudo systemctl status mariadb
sudo systemctl status mysql
sudo systemctl status ssh
Conclusion This server setup provides a solid foundation for managing network services and hosting internal resources. Regular backups ensure configuration persistence and disaster recovery capability