Provision a new Linux server using the automation framework in a consistent, secure, and auditable manner.
Ensure the archive file is present:
ls server_provisioning.tar.gz
Confirm you can connect using SSH key authentication:
ssh user@server_ip
Transfer the provisioning package:
scp server_provisioning.tar.gz user@server_ip:/home/user/
ssh user@server_ip
tar -xvf server_provisioning.tar.gz
cd server_provisioning
chmod +x main.sh
chmod +x scripts/*.sh
chmod +x lib/*.sh
Edit the configuration file:
nano settings.conf
From the script menu:
Run the main script:
./main.sh
Follow this order strictly.
After reboot:
cd server_provisioning
./main.sh
Verify users:
cat /etc/passwd | grep admin
Verify installation:
nginx -v
Ensure SSH port is allowed before enabling firewall.
Verify:
ufw status
Verify access before closing session:
ssh user@server_ip
Proceed only if login succeeds.
Verify key generation:
ls | grep key
This step:
systemctl status ssh
systemctl status fail2ban
systemctl status ufw
ufw status verbose
getent group sudo
cat logs/provision.log
Confirm:
Save provisioning logs:
cp logs/provision.log /var/log/server_build.log
Record:
If a step fails:
less logs/provision.log
At completion, the server will be: