База знань

Ubuntu Server Initial Setup Guide

The first steps to take on a fresh Ubuntu server to make it secure and ready for use.

1. Update all packages

sudo apt update && sudo apt upgrade -y

2. Set the timezone and hostname

sudo timedatectl set-timezone UTC
sudo hostnamectl set-hostname my-server

3. Create a working user

sudo adduser deploy
sudo usermod -aG sudo deploy

4. Enable the firewall

sudo ufw allow OpenSSH
sudo ufw enable

5. Enable automatic security updates

sudo apt install -y unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades

Your server is now updated, secured with a firewall, and ready to install a web server, database or your application.

Ця відповідь Вам допомогла?

0 Користувачі, які знайшли це корисним

Powered by WHMCompleteSolution