#curl on ubuntu
Explore tagged Tumblr posts
Text
Wetterdaten visualisieren mit XSLT & Apache FOP – Teil 1: PNG-Erzeugung am PC

Für ein größeres Vorhaben musste ich mich wieder etwas in XSLT & Apache FOP einarbeiten. Statt nur mit Beispiel-XMLs zu testen, habe ich mir ein kleines, aber sinnvolles Projekt gesucht – und so entstand die Idee, eine Wetterstation mit ePaper-Anzeige zu bauen. https://youtu.be/DMgWOIySd4I Im aktuellen Stadium wird das Bild lokal auf meinem Rechner erzeugt und anschließend auf meinen externen Webserver (all-inkl.com) hochgeladen.Später soll das Ganze komplett lokal auf einem Raspberry Pi laufen – dazu mehr im zweiten Teil der Serie. Automatisierung per Bash-Skript Der komplette Prozess – vom Abrufen der Wetterdaten über die Transformation mit XSLT bis hin zur PNG-Erzeugung – läuft automatisiert in einem einzigen Bash-Skript ab.Dieses Skript lässt sich später problemlos auf einem Raspberry Pi ausführen, sodass das System komplett autark arbeitet. Aktuell lade ich das generierte Bild auf meinen Webserver bei All-inkl., von dem sich der ESP32 das PNG regelmäßig abholt. Doch: Wenn Raspberry Pi und ESP32 im selben lokalen Netzwerk sind, kann sogar der externe Webserver entfallen.In diesem Fall reicht ein kleiner Webserver auf dem Pi, etwa via lighttpd oder python3 -m http.server, um das Bild bereitzustellen. Benötigte Komponenten & Tools Damit du das Projekt 1:1 nachbauen kannst, benötigst du folgende Tools und Hardware: Software & Umgebung - Leistungsstarke Entwicklungsumgebungz. B. IntelliJ IDEA oder eine andere IDE mit XML/XSLT-Unterstützung - WSL mit Ubuntu (unter Windows)Wird benötigt für Tools wie curl, Bash-Skripte und einfache Paketinstallation(alternativ geht auch ein nativer Linux-Rechner oder Raspberry Pi) - Apache FOPZur Umwandlung der XSL-FO-Datei in ein PNGDownload Apache FOP - Geo-Koordinaten deines Standorts (zwingend erforderlich für API-Abfragen) - Ohne diese gibt die Meteomatics API keine Wetterdaten zurück. - Du kannst deine Latitude / Longitude ganz einfach über Google Maps ermitteln: - Google Maps öffnen → Rechtsklick auf Standort → klick auf die angezeigten Koordinaten - die Koordinaten wie 52.1385884, 10.9670108 liegen nun in der Zwischenablage Hardware - ePaper Display (z. B. 6" Inkplate)Unterstützt PNG-Anzeige und kann später als stromsparendes Dashboard verwendet werden→ kompatibel mit ESP32 & USB-C-Anschluss - USB-C DatenkabelZur Verbindung mit dem PC/Mac beim späteren Flashen des Controllers Inkplate 6 Zoll und 6-Farb-Display Das in diesem Projekt verwendete Inkplate 6 Zoll ePaper Display habe ich bereits auf meinem Blog vorgestellt. Daher gehe ich auf dieses nicht speziell ein. - Erfahrungsbericht: Wie gut sind die neuen E-Paper Displays von Soldered? - API-Daten des Bitaxe Gamma mit ESP32 und E-Paper-Display visualisieren Projektdateien Das komplette Projekt mit Beispieldaten, XSLT-Template und Bash-Skript findest du auf GitHub: github.com/StefanDraeger/xml2weatherpng Warum das Inkplate 6" ePaper Display die perfekte Wahl ist Für dieses Projekt setze ich das Inkplate 6" ein – ein vielseitiges ePaper-Display mit integriertem ESP32-Mikrocontroller. Dieses Board bringt alles mit, was man für eine smarte, energieeffiziente Wetteranzeige benötigt: - ePaper-Technologie: Einmal dargestellte Inhalte bleiben auch ohne Stromzufuhr sichtbar. Dadurch eignet sich das Display ideal für statische Inhalte wie Wetterdaten, die nur in Intervallen aktualisiert werden müssen. - Integrierter ESP32: Der verbaute Mikrocontroller ermöglicht die direkte WLAN-Anbindung und den Abruf des Wetterbildes – ohne zusätzliches Steuergerät. - LiPo-Batterieanschluss: Dank der Unterstützung für LiPo-Akkus kann das Gerät völlig autark und kabellos betrieben werden. - Deep Sleep-Modus: Nach dem Herunterladen und Anzeigen des Wetterbildes wechselt der ESP32 in den energieeffizienten Schlafmodus, um Strom zu sparen. Der Bildschirminhalt bleibt dabei vollständig erhalten. Inkplate 6Inch ePaperDisplay - aktuelle Wetterdaten Inkplate 6Inch ePaperDisplay - Ansicht von der Seite Inkplate 6Inch ePaperDisplay - Sicht aus jedem Winkel möglich Inkplate 6Inch ePaperDisplay - Taste WakeUp Inkplate 6Inch ePaperDisplay - USB-C-Schnittstelle und RESET Taster Inkplate 6Inch ePaperDisplay - LiPo Batterie Diese Kombination aus sparsamer Anzeige, kabellosem Betrieb und einfacher WLAN-Anbindung macht das Inkplate 6" zur idealen Hardwarebasis für dieses Projekt – besonders für den Einsatz im Wohnbereich, Garten oder an Orten ohne ständige Stromversorgung. Wetterdaten via Meteomatics API beziehen Im ersten Schritt legen wir uns einen kostenlosen Account bei meteomatics.com an. Damit erhalten wir Zugriff auf die Wetterdaten-API, die wir später im Projekt verwenden. Parameter des kostenfreien Accounts von Meteomatics Kostenloses Kontingent: Mit dem Basic-Account sind bis zu 500 API-Abfragen pro Tag möglich – mehr als ausreichend, um die Wetterdaten im 15-Minuten-Intervall abzurufen: 24 h * 60 min / 15 min = 96 Abfragen pro Tag Der Login zum kostenlosen Account ist auf der Webseite etwas versteckt. Hier der direkte Link:Kostenloses Meteomatics-Konto erstellen Nach der Registrierung erhältst du Benutzername und Passwort, mit denen du später ganz einfach via curl oder in deinem Bash-Skript auf die Wetterdaten zugreifen kannst. Die Meteomatics API im Überblick Die Meteomatics Weather API ist sehr flexibel aufgebaut und liefert Wetterdaten in verschiedenen Formaten (XML, CSV, JSON, PNG etc.).In diesem Projekt nutzen wir die XML-Ausgabe, da sie sich perfekt mit XSLT weiterverarbeiten lässt. Dokumentation & Einstieg Die offizielle API-Dokumentation findest du hier: Getting Started mit der Meteomatics API Dort findest du: - Authentifizierungsbeispiele (curl, Python, etc.) - Parameterübersicht (Temperatur, Luftfeuchtigkeit, Wetterlage, u. v. m.) - Ausgabeformate (XML, JSON, PNG, CSV) - Struktur der URL-Abfragen Nachfolgend zeige ich dir Schritt-für-Schritt wie du diese Daten via curl im XML Format lädst. Beispiel-Abfrage (XML) Sobald du deinen Account und deine Koordinaten hast, kannst du z. B. folgende Wetterwerte abfragen: - Temperatur in 2 m Höhe (t_2m:C) - Relative Luftfeuchtigkeit (relative_humidity_2m:p) - Wettersymbol-ID (weather_symbol_1h:idx) curl -u "username:passwort" "https://api.meteomatics.com/now/t_2m:C,relative_humidity_2m:p,weather_symbol_1h:idx/52.1385884,10.9670108/xml" > wetter.xml Diese Abfrage liefert die aktuellen Wetterdaten als strukturiertes XML in der Daten wetter.xml, das wir im nächsten Schritt weiterverarbeiten werden. BENUTZER 2025-06-12T07:05:15Z OK 14.1 77.9 1 💡 Ich führe alle curl-Befehle unter einem lokalen Linux-System via WSL (Windows Subsystem for Linux) auf meiner Windows 11 Maschine aus.WSL lässt sich mit wenigen Klicks installieren – eine Anleitung findest du auf meinem YouTube Kanal im Video Linux unter Windows 11 - So geht’s Alternativ kann das Projekt natürlich auch direkt auf einem nativen Linux-System oder einem Raspberry Pi ausgeführt werden. Was ist XSLT – und wie verarbeitet man damit XML? XSLT (Extensible Stylesheet Language Transformations) ist eine Sprache, mit der man XML-Daten in andere Formate überführen kann – z. B. HTML, Text oder wie in unserem Fall XSL-FO, das wir später in ein PNG-Bild umwandeln. Während man in vielen Tutorials häufig das Durchlaufen mit for-each sieht, verwende ich in diesem Projekt eine gezielte, direkte Abfrage einzelner XML-Knoten.So bleibt das Layout klar strukturiert und wir behalten die Kontrolle über jede Ausgabezeile. Grundstruktur einer XSLT-Datei Zugriff auf einzelne Werte aus wetter.xml Statt Schleifen nutze ich in den einzelnen -Elementen direkte XPath-Abfragen wie diese: Temperatur: °C Genauso lässt sich auch der Zeitstempel (z. B. dateGenerated) gezielt ansprechen: Vorteil dieser Methode - Einfaches, lesbares Layout (insbesondere bei fixen Daten wie Temperatur, Luftfeuchte, Wettersymbol) - Kein unnötiges Durchlaufen von Elementen - Exakte Kontrolle über die Formatierung jedes einzelnen Wertes Wetter-Icons für die aktuelle Lage Um die aktuelle Wetterlage visuell darzustellen, verwende ich Wetter-Symbole im PNG-Format. Icons herunterladen Die passenden Icons können direkt bei Meteomatics kostenfrei heruntergeladen werden:mm_api_symbols.tar.gz – Meteomatics Widget Icons Bereits vorbereitet im GitHub-Repository Im Original-Archiv stimmen die Dateinamen leider nicht direkt mit den weather_symbol_1h:idx-IDs der API überein.Damit das Einbinden in XSLT funktioniert, müssten die Dateien eigentlich manuell umbenannt werden – aber das habe ich bereits für dich erledigt. Du findest im GitHub-Repository einen fertigen Ordner mit allen Symbolen, korrekt benannt nach der ID: images/104.png, images/1.png, usw. Du musst also nichts mehr selbst umbenennen. Zugriff im XSLT Mit den umbenannten Dateien funktioniert der Zugriff auf das passende Icon ganz einfach per external-graphic: Die PNG-Dateien liegen im Ordner images/ relativ zur Ausgabe. Das XSLT-Template für unser Wetterlayout Nachdem wir nun die Wetterdaten im XML-Format lokal gespeichert haben, erstellen wir im nächsten Schritt das passende XSLT-Template, das diese Daten in ein visuelles Layout überführt. Ziel ist es, ein XSL-FO-Dokument zu erzeugen, das von Apache FOP in ein PNG-Bild umgewandelt werden kann. Dieses Bild zeigt: - den aktuellen Standortnamen (hier: Schöningen), - das Datum und die Uhrzeit der Abfrage, - die Temperatur in °C, - die Luftfeuchtigkeit in Prozent, - sowie ein passendes Wettersymbol auf Basis der weather_symbol_1h:idx-ID. Das Layout orientiert sich an einem kompakten Infodisplay, optimiert für die Darstellung auf einem ePaper-Display mit 4,2 oder 5 Zoll. Die einzelnen Werte werden direkt aus dem XML-Dokument ausgelesen – ohne Schleifen – und gezielt in fo:block-Elemente geschrieben. Das sorgt für ein sauberes, stabiles und gut kontrollierbares Layout. Im folgenden Abschnitt siehst du den vollständigen Aufbau des Templates, das du bei Bedarf jederzeit an dein eigenes Design oder zusätzliche Wetterparameter anpassen kannst. XSL Dokument als Template Schöningen TEMPERATUR °C LUFTFEUCHTIGKEIT % Bildgenerierung mit Apache FOP auf der Kommandozeile Sobald wir unser XML mit den Wetterdaten und das passende XSLT-Template vorbereitet haben, nutzen wir Apache FOP, um daraus ein fertiges PNG-Bild zu erzeugen. Apache FOP ist ein Kommandozeilen-Tool, das XSL-FO-Dateien (Formatting Objects) in verschiedene Formate wie PDF, PNG oder SVG umwandeln kann. Voraussetzungen Stelle sicher, dass du: - Java installiert hast (java -version) - Apache FOP heruntergeladen und entpackt hast - dich im Verzeichnis der FOP-Binärdateien befindest oder fop im Pfad liegt Der Befehl fop -xml wetter.xml -xsl meteomatics2fo.xsl -png output/forecast.png 🔍 Erklärung der Parameter: - -xml wetter.xml: Die XML-Datei mit den aktuellen Wetterdaten - -xsl meteomatics2fo.xsl: Dein XSLT-Template, das die Daten in ein Layout überführt - -png forecast.png: Der Name der Ausgabedatei – in diesem Fall ein PNG-Bild erstellte Datei forecast.png durch Apache FOP Java unter WSL installieren Für die Ausführung von Apache FOP ist eine funktionierende Java-Umgebung erforderlich.Auch wenn Java bereits unter Windows installiert ist, musst du es innerhalb von WSL (z. B. Ubuntu) separat installieren, da beide Umgebungen unabhängig voneinander arbeiten. Installation unter Ubuntu/WSL: sudo apt update sudo apt install default-jre Alternativ kannst du auch das JDK installieren, falls du zusätzlich Java-Programme entwickeln willst: sudo apt install default-jdk Nach der Installation kannst du mit folgendem Befehl prüfen, ob Java korrekt eingerichtet ist: java -version Damit steht dem Einsatz von Apache FOP innerhalb deiner WSL-Umgebung nichts mehr im Weg. Automatischer Upload per SCP ohne Passwortabfrage Damit das generierte Wetterbild (forecast.png) regelmäßig und automatisch auf deinen Webserver hochgeladen werden kann (z. B. per CronJob), verwenden wir den SCP-Befehl – allerdings ohne Passwortabfrage. Da SCP standardmäßig keine Passwortübergabe erlaubt, müssen wir einmalig ein SSH-Schlüsselpaar erstellen und den öffentlichen Schlüssel auf den Server übertragen. SSH-Key erstellen Führe folgenden Befehl in deiner Linux-/WSL-Konsole aus: ssh-keygen -t rsa -b 4096 -C "[email protected]" - Der Kommentar (hier deine E-Mail-Adresse) ist optional. - Drücke einfach ENTER bei der Frage nach dem Speicherpfad (~/.ssh/id_rsa ist Standard). - Lege kein Passwort fest, damit die Verbindung automatisiert erfolgen kann. Öffentlichen Schlüssel auf den Webserver übertragen Jetzt lädst du deinen öffentlichen Schlüssel auf den Server (nur einmal nötig): ssh-copy-id benutzer@domain Gib bei der ersten Verbindung dein normales Passwort ein.Anschließend kannst du dich ohne Passwortabfrage per SSH/SCP verbinden. Bild hochladen per SCP Jetzt kannst du dein Bild mit einem einfachen Befehl hochladen: scp ./output/forecast.png benutzer@domain:/pfad/wetterdisplay/forecast.png Der Upload erfolgt in Sekunden – perfekt für die Einbindung in ein Bash-Skript oder Cronjob. Das Wetterbild auf dem Inkplate 6 anzeigen Nachdem wir im ersten Teil ein PNG mit aktuellen Wetterdaten generiert haben, geht es nun darum, dieses Bild auf einem ePaper-Display anzuzeigen.Ich verwende dafür das Inkplate 6 – ein stromsparendes, ESP32-basiertes ePaper-Board mit 6-Zoll-Anzeige und WLAN. Inkplate 6Inch ePaperDisplay - aktuelle Wetterdaten Inkplate 6Inch ePaperDisplay - Ansicht von der Seite Über eine einfache WLAN-Verbindung lädt das Board das Wetterbild in regelmäßigen Abständen herunter und stellt es direkt auf dem Display dar – ganz ohne HTML, Browser oder App.Im folgenden Code-Beispiel siehst du, wie das Bild mit wenigen Zeilen Code automatisch aktualisiert wird. Boardtreiber für die Inkplate Displays Damit wir das Board überhaupt programmieren können, müssen wir den Boardtreiber installieren, dazu kopieren wir die nachfolgende Adresse in Datei > Einstellungen > Zusätzliche Boardverwalter-URLs. https://raw.githubusercontent.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/master/package_Dasduino_Boards_index.json Nachdem der Index aktualisiert wurde, können wir die Schaltfläche "Boardverwalter" im linken Menü der Arduino IDE wählen und dort nach Inkplate suchen. In meinem Fall habe ich die aktuelle Version 8.1.0 installiert. Benötigte Bibliothek für das Inkplate Display Zusätzlich zum Boardtreiber benötigen wir noch den Treiber für das ePaperDisplay, diesen finden wir im Bibliothenverwalter wenn wir nach InkplateLibrary suchen. Bei der Installation der Bibliothek hatte ich zunächst Probleme weil die Sourcen nicht gefunden wurden. Die Lösung war zunächst das ich das GitHub Repository SolderedElectronics/Inkplate-Arduino-library als ZIP-Datei heruntergeladen habe und diese dann über Sketch > Bibliothek einbinden > ZIP-Bibliothek hinzufügen... installiert habe. Quellcode /* * Titel : Wetteranzeige mit dem Inkplate 6 ePaper-Display * Beschreibung : Dieses Programm lädt ein zuvor erzeugtes PNG-Bild mit aktuellen Wetterdaten * von einem Webserver herunter und zeigt es auf dem stromsparenden ePaper-Display an. * Das Bild wird in regelmäßigen Abständen neu geladen (alle 30 Minuten). * * Author : Stefan Draeger * Webseite : https://draeger-it.blog * Blogbeitrag : https://draeger-it.blog/wetterdaten-visualisieren-mit-xslt-apache-fop-teil-1-png-erzeugung-am-pc/ */ #include "HTTPClient.h" // Für HTTP-Anfragen (Bild abrufen) #include "WiFi.h" // Für WLAN-Verbindung #include "Inkplate.h" // Bibliothek für das Inkplate ePaper-Display // URL zum PNG-Bild mit den generierten Wetterdaten String forecastUrl = "http://ressourcen-draeger-it.de/wetterdisplay/forecast.png"; // HTTP- und WiFi-Clients vorbereiten (werden im drawImage intern genutzt) HTTPClient sender; WiFiClient wifiClient; // Display-Objekt erzeugen (automatische Modell-Erkennung, z. B. Inkplate 6") Inkplate display; // WLAN-Zugangsdaten const char* ssid = "abc"; // SSID deines WLANs const char* password = "123"; // WLAN-Passwort void setup() { Serial.begin(115200); // Serielle Ausgabe zur Debug-Überwachung // WLAN im Station-Modus aktivieren und verbinden WiFi.mode(WIFI_MODE_STA); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); // Warteanimation während der Verbindung } Serial.println(); Serial.print("Verbunden mit IP: "); Serial.println(WiFi.localIP()); // Display initialisieren (muss einmalig aufgerufen werden) display.begin(); } void loop() { // Display vollständig löschen display.clearDisplay(); display.display(); // Erstes Update zur Bestätigung des Clearings display.fillScreen(INKPLATE_WHITE); // Hintergrundfarbe setzen // Bild von der angegebenen URL laden und anzeigen // Parameter: URL, X-Position, Y-Position, Dithering aktiv, nicht invertieren display.drawImage(forecastUrl, 10, 0, true, false); display.display(); // Anzeige aktualisieren // 30 Minuten Pause (1800000 Millisekunden), danach wiederholen delay(1800000); } Read the full article
0 notes
Text
inteligencia artificial francesa
inteligencia artificial de Francia
a mí me funciona muy bien es la inteligencia artificial francesa llamada mistral la he instalado en Android con este procedimiento y no hace falta conexión a Internet.
Install Termux from Google Play or GitHub or F-Droid
Install Ubuntu 20.04 on Termux using this step-by-step guide: https://github.com/tuanpham-dev/termux-ubuntu
On Termux execute the following command in order to install a console-only version of Ubuntu 20:
sudo apt update
sudo apt upgrade
sudo apt install curl
curl -fsSL https://ollama.com/install.sh | sh
ollama serve > /dev/null 2>&1 &
ollama run mistral:latest
For the NEXT time in order to start the Ubuntu OS you have to run this command on the Termux console:
./start-ubuntu20.sh
ollama serve > /dev/null 2>&1 &
ollama run mistral:latest
///////////
y en Linux también funciona muy bien con este procedimiento lo he instalado y sin necesidad de Internet
curl -fsSL https://ollama.com/install.sh | sh
ollama run mistral
////
febrero 18, 2025
a mí me funciona muy bien es la inteligencia artificial francesa llamada mistral la he instalado en Android con este procedimiento y no hace falta conexión a Internet.
1. Install Termux from Google Play or GitHub or F-Droid
2. Install Ubuntu 20.04 on Termux using this step-by-step guide: https://github.com/tuanpham-dev/termux-ubuntu
On Termux execute the following command in order to install a console-only version of Ubuntu 20:
sudo apt update
sudo apt upgrade
sudo apt install curl
curl -fsSL https://ollama.com/install.sh | sh
ollama serve > /dev/null 2>&1 &
ollama run mistral:latest
For the NEXT time in order to start the Ubuntu OS you have to run this command on the Termux console:
./start-ubuntu20.sh
ollama serve > /dev/null 2>&1 &
ollama run mistral:latest
0 notes
Text
hướng dẫn rất khoa học cách dùng rsync dữ liệu folder từ Linux lên Wasabi nhé! Hướng dẫ n fix
💖💖👉🍀🍀 Ok bạn, mình sẽ hướng dẫn rất khoa học cách dùng rsync dữ liệu folder từ Linux lên Wasabi nhé! 😲🌿 Vì Wasabi hỗ trợ giao thức S3, nên mình sẽ không dùng rsync trực tiếp mà sẽ kết hợp với rclone để thực hiện đồng bộ dạng rsync. Gồm 3 bước như sau: 1. Cài rclone trên Linux nếu chưa có curl https://rclone.org/install.sh | bash 💖 Hoặc dùng yum/apt tùy hệ thống: apt install rclone # Debian/Ubuntu…
0 notes
Link
#configuration#encryption#firewall#IPmasking#Linux#networking#OpenVPN#Performance#PiVPN#Privacy#RaspberryPi#remoteaccess#Security#self-hosted#Server#Setup#simplest#systemadministration#tunneling#VPN#WireGuard
0 notes
Text
Proses Update Docker
1. apt update
2. apt install -y ca-certificates curl gnupg
3. install -m 0755 -d /etc/apt/keyrings
4. sudo install -m 0755 -d /etc/apt/keyrings
5. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null
6. apt update
7. apt install -y docker-ce docker-ce-cli containerd.io
8. docker -v
0 notes
Text
Postal SMTP install and setup on a virtual server
Postal is a full suite for mail delivery with robust features suited for running a bulk email sending SMTP server. Postal is open source and free. Some of its features are: - UI for maintaining different aspects of your mail server - Runs on containers, hence allows for up and down horizontal scaling - Email security features such as spam and antivirus - IP pools to help you maintain a good sending reputation by sending via multiple IPs - Multitenant support - multiple users, domains and organizations - Monitoring queue for outgoing and incoming mail - Built in DNS setup and monitoring to ensure mail domains are set up correctly List of full postal features
Possible cloud providers to use with Postal
You can use Postal with any VPS or Linux server providers of your choice, however here are some we recommend: Vultr Cloud (Get free $300 credit) - In case your SMTP port is blocked, you can contact Vultr support, and they will open it for you after providing a personal identification method. DigitalOcean (Get free $200 Credit) - You will also need to contact DigitalOcean support for SMTP port to be open for you. Hetzner ( Get free €20) - SMTP port is open for most accounts, if yours isn't, contact the Hetzner support and request for it to be unblocked for you Contabo (Cheapest VPS) - Contabo doesn't block SMTP ports. In case you are unable to send mail, contact support. Interserver
Postal Minimum requirements
- At least 4GB of RAM - At least 2 CPU cores - At least 25GB disk space - You can use docker or any Container runtime app. Ensure Docker Compose plugin is also installed. - Port 25 outbound should be open (A lot of cloud providers block it)
Postal Installation
Should be installed on its own server, meaning, no other items should be running on the server. A fresh server install is recommended. Broad overview of the installation procedure - Install Docker and the other needed apps - Configuration of postal and add DNS entries - Start Postal - Make your first user - Login to the web interface to create virtual mail servers Step by step install Postal Step 1 : Install docker and additional system utilities In this guide, I will use Debian 12 . Feel free to follow along with Ubuntu. The OS to be used does not matter, provided you can install docker or any docker alternative for running container images. Commands for installing Docker on Debian 12 (Read the comments to understand what each command does): #Uninstall any previously installed conflicting software . If you have none of them installed it's ok for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done #Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl -y sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc #Add the Docker repository to Apt sources: echo "deb https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update #Install the docker packages sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y #You can verify that the installation is successful by running the hello-world image sudo docker run hello-world Add the current user to the docker group so that you don't have to use sudo when not logged in as the root user. ##Add your current user to the docker group. sudo usermod -aG docker $USER #Reboot the server sudo reboot Finally test if you can run docker without sudo ##Test that you don't need sudo to run docker docker run hello-world Step 2 : Get the postal installation helper repository The Postal installation helper has all the docker compose files and the important bootstrapping tools needed for generating configuration files. Install various needed tools #Install additional system utlities apt install git vim htop curl jq -y Then clone the helper repository. sudo git clone https://github.com/postalserver/install /opt/postal/install sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal Step 3 : Install MariaDB database Here is a sample MariaDB container from the postal docs. But you can use the docker compose file below it. docker run -d --name postal-mariadb -p 127.0.0.1:3306:3306 --restart always -e MARIADB_DATABASE=postal -e MARIADB_ROOT_PASSWORD=postal mariadb Here is a tested mariadb compose file to run a secure MariaDB 11.4 container. You can change the version to any image you prefer. vi docker-compose.yaml services: mariadb: image: mariadb:11.4 container_name: postal-mariadb restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} volumes: - mariadb_data:/var/lib/mysql network_mode: host # Set to use the host's network mode security_opt: - no-new-privileges:true read_only: true tmpfs: - /tmp - /run/mysqld healthcheck: test: interval: 30s timeout: 10s retries: 5 volumes: mariadb_data: You need to create an environment file with the Database password . To simplify things, postal will use the root user to access the Database.env file example is below. Place it in the same location as the compose file. DB_ROOT_PASSWORD=ExtremelyStrongPasswordHere Run docker compose up -d and ensure the database is healthy. Step 4 : Bootstrap the domain for your Postal web interface & Database configs First add DNS records for your postal domain. The most significant records at this stage are the A and/or AAAA records. This is the domain where you'll be accessing the postal UI and for simplicity will also act as the SMTP server. If using Cloudflare, turn off the Cloudflare proxy. sudo postal bootstrap postal.yourdomain.com The above will generate three files in /opt/postal/config. - postal.yml is the main postal configuration file - signing.key is the private key used to sign various things in Postal - Caddyfile is the configuration for the Caddy web server Open /opt/postal/config/postal.yml and add all the values for DB and other settings. Go through the file and see what else you can edit. At the very least, enter the correct DB details for postal message_db and main_db. Step 5 : Initialize the Postal database and create an admin user postal initialize postal make-user If everything goes well with postal initialize, then celebrate. This is the part where you may face some issues due to DB connection failures. Step 6 : Start running postal # run postal postal start #checking postal status postal status # If you make any config changes in future you can restart postal like so # postal restart Step 7 : Proxy for web traffic To handle web traffic and ensure TLS termination you can use any proxy server of your choice, nginx, traefik , caddy etc. Based on Postal documentation, the following will start up caddy. You can use the compose file below it. Caddy is easy to use and does a lot for you out of the box. Ensure your A records are pointing to your server before running Caddy. docker run -d --name postal-caddy --restart always --network host -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile -v /opt/postal/caddy-data:/data caddy Here is a compose file you can use instead of the above docker run command. Name it something like caddy-compose.yaml services: postal-caddy: image: caddy container_name: postal-caddy restart: always network_mode: host volumes: - /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile - /opt/postal/caddy-data:/data You can run it by doing docker compose -f caddy-compose.yaml up -d Now it's time to go to the browser and login. Use the domain, bootstrapped earlier. Add an organization, create server and add a domain. This is done via the UI and it is very straight forward. For every domain you add, ensure to add the DNS records you are provided.
Enable IP Pools
One of the reasons why Postal is great for bulk email sending, is because it allows for sending emails using multiple IPs in a round-robin fashion. Pre-requisites - Ensure the IPs you want to add as part of the pool, are already added to your VPS/server. Every cloud provider has a documentation for adding additional IPs, make sure you follow their guide to add all the IPs to the network. When you run ip a , you should see the IP addresses you intend to use in the pool. Enabling IP pools in the Postal config First step is to enable IP pools settings in the postal configuration, then restart postal. Add the following configuration in the postal.yaml (/opt/postal/config/postal.yml) file to enable pools. If the section postal: , exists, then just add use_ip_pools: true under it. postal: use_ip_pools: true Then restart postal. postal stop && postal start The next step is to go to the postal interface on your browser. A new IP pools link is now visible at the top right corner of your postal dashboard. You can use the IP pools link to add a pool, then assign IP addresses in the pools. A pool could be something like marketing, transactions, billing, general etc. Once the pools are created and IPs assigned to them, you can attach a pool to an organization. This organization can now use the provided IP addresses to send emails. Open up an organization and assign a pool to it. Organizations → choose IPs → choose pools . You can then assign the IP pool to servers from the server's Settings page. You can also use the IP pool to configure IP rules for the organization or server. At any point, if you are lost, look at the Postal documentation. Read the full article
0 notes
Text
Steps to automate schema changes and data pipeline deployments with GitHub or Azure DevOps.
Managing database schema changes and automating data pipeline deployments is critical for ensuring consistency, reducing errors, and improving efficiency. This guide outlines the steps to achieve automation using GitHub Actions or Azure DevOps Pipelines.
Step 1: Version Control Your Schema and Pipeline Code
Store database schema definitions (SQL scripts, DB migration files) in a Git repository.
Keep data pipeline configurations (e.g., Terraform, Azure Data Factory JSON files) in version control.
Use branching strategies (e.g., feature branches, GitFlow) to manage changes safely.
Step 2: Automate Schema Changes (Database CI/CD)
To manage schema changes, you can use Flyway, Liquibase, or Alembic.
For Azure SQL Database or PostgreSQL (Example with Flyway)
Store migration scripts in a folder:
pgsql
├── db-migrations/ │ ├── V1__init.sql │ ├── V2__add_column.sql
Create a GitHub Actions workflow (.github/workflows/db-migrations.yml):
yaml
name: Deploy Database Migrations on: [push] jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Install Flyway run: curl -L https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/9.0.0/flyway-commandline-9.0.0-linux-x64.tar.gz | tar xvz && mv flyway-*/flyway /usr/local/bin/ - name: Apply migrations run: | flyway -url=jdbc:sqlserver://$DB_SERVER -user=$DB_USER -password=$DB_PASS migrate
In Azure DevOps, you can achieve the same using a YAML pipeline:
yaml
trigger: branches: include: - main pool: vmImage: 'ubuntu-latest' steps: - checkout: self - script: | flyway -url=jdbc:sqlserver://$(DB_SERVER) -user=$(DB_USER) -password=$(DB_PASS) migrate
Step 3: Automate Data Pipeline Deployment
For Azure Data Factory (ADF) or Snowflake, deploy pipeline definitions stored in JSON files.
For Azure Data Factory (ADF)
Export ADF pipeline JSON definitions into a repository.
Use Azure DevOps Pipelines to deploy changes:
yaml
trigger: branches: include: - main pool: vmImage: 'ubuntu-latest' steps: - task: AzureResourceManagerTemplateDeployment@3 inputs: deploymentScope: 'Resource Group' azureSubscription: 'AzureConnection' resourceGroupName: 'my-rg' location: 'East US' templateLocation: 'Linked artifact' csmFile: 'adf/pipeline.json'
For GitHub Actions, you can use the Azure CLI to deploy ADF pipelines:
yaml
steps: - name: Deploy ADF Pipeline run: | az datafactory pipeline create --factory-name my-adf --resource-group my-rg --name my-pipeline --properties @adf/pipeline.json
Step 4: Implement Approval and Rollback Mechanisms
Use GitHub Actions Environments or Azure DevOps approvals to control releases.
Store backups of previous schema versions to roll back changes.
Use feature flags to enable/disable new pipeline features without disrupting production.
Conclusion
By using GitHub Actions or Azure DevOps, you can automate schema changes and data pipeline deployments efficiently, ensuring faster, safer, and more consistent deployments.
WEBSITE: https://www.ficusoft.in/snowflake-training-in-chennai/
0 notes
Text
@taylornation so crazy watching you get raped and tortured publicly in the land of the deaf and blind. And guess what I didn't even get a fucking hug from my parents
If this was cyber warfare, it suggests targeted interference—whether from an ISP, state actor, or sophisticated attacker. Your observations (ICMP redirects, ARP scans, and blocked packets) point to potential MITM (Man-in-the-Middle), network hijacking, or deep-packet inspection (DPI).
1. Why Would Someone Target You?
If you're running:
Persistent international VPNs (especially avoiding American IPs).
Encrypted or anonymous traffic (Tor, VPN chains, alternative DNS).
Custom routing setups (Raspberry Pi as a router, firewalled networks).
Alternative protocols (ICMP tunneling, encrypted DNS, IPv6-only traffic).
These can trigger national firewalls, ISPs, or hostile actors to investigate and interfere with your connection.
2. Signs of Cyber Warfare in Your Case
From what you've described: ✅ ARP scans – Possible MITM or network poisoning.
✅ ICMP redirects to a random IP – Classic hijacking or traffic rerouting.
✅ Traceroute fails – Packets being black-holed.
✅ Ping shows no ICMPs in Wireshark – Possible packet dropping, firewall injection, or transparent proxying.
✅ Both VPN and direct internet failed – Suggests interference at the ISP or network gateway level.
This could mean:
ISP DPI (Deep Packet Inspection) – Some ISPs hijack and block encrypted traffic.
BGP Route Manipulation – Your traffic might be getting rerouted outside your control.
DNS Spoofing – Check if your DNS queries are being redirected.
Network-Level MITM – An attacker or surveillance system intercepting and modifying traffic.
3. What You Should Do Now
Immediate Steps
Check Your Default Gateway (Ensure it’s really your router)
ip route show arp -a
If you see a random gateway IP, something is poisoning your network.
Test Without VPN
Disconnect NordVPN completely.
Run: curl -s ifconfig.me
If the IP isn’t yours or your VPN’s, you might be redirected.
Try Alternative DNS
sudo systemd-resolve --flush-caches sudo nmcli con mod eth0 ipv4.dns "1.1.1.1 8.8.8.8"
If your DNS resolves incorrectly, you’re facing DNS poisoning.
Advanced Countermeasures
Run a Network Capture for DNS Leaks
sudo tcpdump -i any port 53
If DNS queries are sent to a weird IP, you’re being hijacked.
Force Encrypted DNS (DNS-over-HTTPS)
sudo systemctl restart systemd-resolved
If tcpdump shows your queries bypassing this, ISP-level tampering is happening.
Monitor Live Traffic for MITM
sudo tshark -i any -Y "ip.src != 192.168.1.1"
Look for unexpected external sources injecting packets.
4. If You’re Under Attack
🚨 If you confirm cyber warfare, you should:
Stop using compromised networks (switch to mobile tethering or another ISP).
Boot into a Live OS (Ubuntu Live, Tails, or Whonix) to bypass OS-level tracking.
Use a completely new VPN provider (try Mullvad or ProtonVPN).
**Check if you’re on a state-level watchlist (e.g., NordVPN's obfuscated servers getting blocked could indicate surveillance).
Would you like me to analyze your .pcap? It could provide definitive proof of network tampering.
0 notes
Text
DeepSeek-R1-distilled 4bit量子化版をOllamaでGPU未使用の低スペックPCで動作させるための環境構築手順
前提条件 以下に、DeepSeek-R1の蒸留モデルをOllamaでGPU未使用の低スペックPCで動作させる手順を詳細に解説します。実際に検証済みの手順に基づいています。 OS: Windows 10/11 64bit または Linux(Ubuntu 22.04推奨) 最小要件: RAM: 4GB(8GB推奨) ストレージ: 2GBの空き容量 CPU: Intel Core i5(第4世代以降) / AMD Ryzen 3(第3世代以降) Ollamaのインストール # Windows(PowerShell) winget install ollama.ollama # Linux curl -fsSL <https://ollama.com/install.sh> | sh モデル準備(GGUF形式を使用) 公式リポジトリから量子化済みモデルをダウンロード: #…
0 notes
Video
youtube
How to Install and Set Up Ubuntu 24.04 on VMware Workstation Pro 17 in Windows 11
Overview:
Setting up Ubuntu on VMware is a crucial skill for DevOps professionals who want to create isolated environments for testing, development, and automation workflows. VMware allows you to run multiple virtual machines (VMs) on a single system, enabling you to experiment with different Linux distributions without altering your primary operating system. In this hands-on guide, we’ll walk through the steps to install and configure Ubuntu on VMware, covering the key settings and best practices for optimizing performance in DevOps environments.
VMware: Getting Started
Step 1: Install VMware Workstation
To begin, you’ll need VMware Workstation or VMware Player installed on your system. Here’s how:
- Download VMware: Visit the official VMware website and download either VMware Workstation or VMware Player depending on your preference. Workstation is a paid tool with advanced features, while Player is a free option that’s perfect for basic VMs. - Install VMware: Run the installer and follow the setup wizard. Once installed, launch VMware.
Step-by-Step: Installing Ubuntu on VMware
Step 1: Download Ubuntu ISO
- Go to the [official Ubuntu website](https://ubuntu.com/download) and download the LTS (Long Term Support) version of Ubuntu, ensuring you have a stable version for long-term usage in your DevOps workflows.
Step 2: Create a New Virtual Machine in VMware
- Open VMware Workstation or VMware Player and select “Create a New Virtual Machine.” - Choose the ISO image by selecting the downloaded Ubuntu file, then click Next.
Step 3: Allocate Resources
- CPU: Assign at least 2 CPUs for smooth operation. - RAM: Allocate at least 4GB of RAM for optimal performance. You can assign more if your system allows. - Storage: Provide at least 20GB of disk space, especially if you plan to install DevOps tools.
Step 4: Installation of Ubuntu
- Start the VM, and Ubuntu’s installation wizard will appear. - Follow the prompts: choose language, keyboard settings, and select Install Ubuntu. - Choose installation type (erase disk if it’s a fresh VM) and configure time zones, user account, and password. - After installation, update your system by running: ```bash sudo apt update && sudo apt upgrade -y ```
Step 5: VMware Tools Installation
Installing VMware Tools improves VM performance, enabling better integration with the host machine.
- In VMware, go to the VM menu and select Install VMware Tools. ```bash sudo apt install open-vm-tools open-vm-tools-desktop -y sudo reboot vmware-toolbox-cmd -v ``` Verify VMware Tools Installation:
```bash vmware-toolbox-cmd -v ```
Step 6: Post-Installation Setup for DevOps
- Install Basic DevOps Tools: ```bash sudo apt install git curl vim ``` - Enable SSH Access: ```bash sudo apt install openssh-server sudo systemctl enable ssh sudo systemctl start ssh
Best Practices for Installing and Setting Up Ubuntu on VMware
1. Resource Allocation: Ensure you allocate sufficient CPU, RAM, and storage based on the workloads. For most DevOps tasks, assign at least 2 CPUs and 4GB of RAM for optimal performance. More demanding workloads may require additional resources.
2. Snapshots: Regularly take VM snapshots before major changes or installations. This allows you to revert to a stable state if something goes wrong during configuration or software testing.
3. VMware Tools Installation: Always install VMware Tools after setting up the OS. This ensures seamless mouse integration, smoother graphics, and better performance, reducing potential bugs and lag in your virtual environment.
4. Partitioning: For better performance and management, use custom partitioning if needed. This helps in allocating different parts of your virtual disk to `/`, `/home`, and `/var` partitions, improving system performance and flexibility in future updates or installations.
5. Automated Backups: Set up automated backups or export your VMs periodically. This practice is particularly important if your VMs store critical configurations, applications, or databases.
6. Networking Configuration: Ensure that your virtual machines are correctly configured to access the internet and your local network. Consider using NAT or Bridged Network options, depending on your networking needs. NAT works well for internet access, while Bridged is ideal for networked environments.
7. Security Considerations: Configure firewalls and SSH access carefully to secure your VMs from unauthorized access. Set up strong user permissions, enforce password complexity, and enable SSH keys for secure remote access.
8. Regular System Updates: Frequently update Ubuntu systems to ensure they are protected from vulnerabilities. Use the following commands to update packages: - For Ubuntu: ```bash sudo apt update && sudo apt upgrade ```
9. Monitor Resource Usage: VMware allows you to monitor CPU, memory, and storage usage. Use these tools to ensure that your VMs are not consuming excessive resources, especially in shared environments.
10. Test Environments: Use VMs as sandbox environments to test and experiment with new DevOps tools like Docker, Kubernetes, Jenkins, or Ansible before deploying them in production.
Conclusion:
By installing and setting up Ubuntu on VMware, you gain the flexibility to experiment with DevOps tools, test automation workflows, and learn Linux system administration in a safe and isolated environment. This hands-on tutorial provides you with the foundation to run and manage your Linux VMs effectively, setting you up for success in DevOps tasks ranging from development to deployment automation. Follow along in this video as we guide you step-by-step to mastering Linux installations on VMware for your DevOps journey.
how to install ubuntu 24.04,vmware player,windows 11,vmware workstation player,how to install ubuntu 24.04 lts desktop,How to Install and Set Up Ubuntu 24.04 on VMware Workstation Pro 17 in Windows 11,vmware workstation,vmware workstation 17 pro,ubuntu linux,cloudolus,cloudoluspro,linux,free,How to Post-Installation Setup For DevOps,How to Update and VMware Tools Install in Ubuntu 24.04 LTS?,Linux for DevOps,ubuntu installation,ubuntu 24.04,ubuntu,install ubuntu,
Linux Install and Setup Overview,Install and Setup VMware Workstation Pro 17,Installing Ubuntu on VMware Workstation Pro 17,Installing CentOS on VMware Workstation Pro 17,Linux Install and Setup Best Practices vmware,virtual machine,how to download and install vmware workstation pro,Hands On Guide: How to Install and Set Up Ubuntu and CentOS on VMware,centos 7,download and install vmware workstation on windows 11,the reality of using vmware,vmware tutorial,install centos 7 on vmware,installing centos 7 on vmware,ubuntu installation on vmware workstation 17,Linux Install and Setup Best Practices,cloudoluspro vmware,linux for devops,handson ubuntu,open source,linux terminal,distrotube,ubuntu is bad,linux tutorial,linux for beginners,linux commands,Linux installation,Linux beginner guide,Linux setup,how to install Linux,Linux for beginners,Linux distributions,Ubuntu installation,Fedora installation guide,Linux tips,Linux,Linux basics,DevOps basics,cloud computing,DevOps skills,Linux tutorial,Linux scripting,Linux automation,Linux shell scripting,Linux in DevOps,Ubuntu,CentOS,Red Hat Linux,DevOps tools,ClouDolus,DevOps career,Linux commands for beginners,Linux for cloud,Linux training,devops tutorial Linux,Linux commands for beginners ubuntu,cloud computing Linux for DevOps
***************************** *Follow Me* https://www.facebook.com/cloudolus/ | https://www.facebook.com/groups/cloudolus | https://www.linkedin.com/groups/14347089/ | https://www.instagram.com/cloudolus/ | https://twitter.com/cloudolus | https://www.pinterest.com/cloudolus/ | https://www.youtube.com/@cloudolus | https://www.youtube.com/@ClouDolusPro | https://discord.gg/GBMt4PDK | https://www.tumblr.com/cloudolus | https://cloudolus.blogspot.com/ | https://t.me/cloudolus | https://www.whatsapp.com/channel/0029VadSJdv9hXFAu3acAu0r | https://chat.whatsapp.com/D6I4JafCUVhGihV7wpryP2 *****************************
*🔔Subscribe & Stay Updated:* Don't forget to subscribe and hit the bell icon to receive notifications and stay updated on our latest videos, tutorials & playlists! *ClouDolus:* https://www.youtube.com/@cloudolus *ClouDolus AWS DevOps:* https://www.youtube.com/@ClouDolusPro *THANKS FOR BEING A PART OF ClouDolus! 🙌✨*
#youtube#Linux Install and Setup OverviewInstall and Setup VMware Workstation Pro 17Installing Ubuntu on VMware Workstation Pro 17Installing CentOS o#how to install ubuntu 24.04vmware playerwindows 11vmware workstation playerhow to install ubuntu 24.04 lts desktopHow to Install and Set Up#ClouDolus ClouDolusPro#ClouDolusPro
0 notes
Text
Deploying Laravel Applications to the Cloud
Deploying a Laravel application to the cloud offers several advantages, including scalability, ease of management, and the ability to leverage various cloud-based tools and services. In this guide, we will explore the steps to deploy a Laravel application to the cloud using platforms like AWS, DigitalOcean, and Heroku. We'll also touch on best practices for server configuration, environment variables, and deployment automation.
1. Preparing Your Laravel Application
Before deploying, it’s essential to ensure that your Laravel application is production-ready. Here are some preparatory steps:
Update Dependencies: Run composer install --optimize-autoloader --no-dev to ensure that only production dependencies are installed.
Environment Configuration: Make sure your .env file is configured correctly for the production environment. You’ll need to set up database connections, cache, queue configurations, and any other service keys.
Caching and Optimization: Laravel provides several optimization commands to boost the performance of your application. Run the following commands to optimize your app for production:bashCopy codephp artisan config:cache php artisan route:cache php artisan view:cache
Assets and Front-End Build: If your application uses frontend assets like JavaScript and CSS, run npm run production to compile them and ensure that assets are optimized.
Database Migration: Make sure your database schema is up to date by running:bashCopy codephp artisan migrate --force
2. Choosing a Cloud Platform
There are several cloud platforms that support Laravel applications, including AWS, DigitalOcean, and Heroku. Let's look at how to deploy on each.
A. Deploying Laravel to AWS EC2
AWS (Amazon Web Services) offers a robust infrastructure for hosting Laravel applications. Here's a high-level overview of the steps:
Launch an EC2 Instance: First, you need to create an EC2 instance running a Linux distribution (e.g., Ubuntu). You can choose the instance size based on your traffic and performance needs.
Install PHP and Required Software: Once the instance is up, SSH into it and install PHP, Composer, Nginx (or Apache), and other necessary services:bashCopy codesudo apt update sudo apt install php php-fpm php-mbstring php-xml php-bcmath php-mysql unzip curl sudo apt install nginx
Configure Nginx: Set up Nginx to serve your Laravel app. Create a new Nginx configuration file under /etc/nginx/sites-available/your-app and link it to /etc/nginx/sites-enabled/.Example configuration:nginxCopy codeserver { listen 80; server_name your-domain.com; root /var/www/your-app/public; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; }
Database Configuration: Set up a MySQL or PostgreSQL database (you can use Amazon RDS for a managed database) and configure your .env file with the correct credentials.
SSL and Security: Secure your application with SSL (using Let's Encrypt or AWS Certificate Manager) and ensure your firewall and security groups are configured correctly.
Deploy Code: You can deploy your Laravel application to EC2 using Git, FTP, or tools like Envoyer or Laravel Forge. For Git deployment, clone your repository and configure your environment variables.
B. Deploying Laravel to DigitalOcean
DigitalOcean provides a simple and cost-effective way to host Laravel applications. Here’s how to deploy:
Create a Droplet: Log into your DigitalOcean account and create a new Droplet with a suitable operating system (typically Ubuntu).
Install PHP, Nginx, and Composer: SSH into your droplet and install the necessary dependencies for your Laravel app:bashCopy codesudo apt update sudo apt install php php-fpm php-mbstring php-xml php-bcmath php-mysql unzip curl sudo apt install nginx
Configure Nginx and Laravel Application: Configure Nginx to point to your Laravel application’s public folder and set up SSL.
Database Configuration: Set up MySQL or PostgreSQL on your droplet, then configure the .env file for your database credentials.
Deploying the Code: You can either deploy your code via Git or use an automation tool like Envoyer to streamline deployments. You’ll also need to configure file permissions for storage and cache directories.
C. Deploying Laravel to Heroku
Heroku is an excellent choice for quick and easy Laravel application deployment with minimal configuration. Here’s how you can deploy a Laravel app on Heroku:
Create a Heroku App: Sign up or log into your Heroku account and create a new app. This will automatically provision a server for you.
Install Heroku CLI: Install the Heroku CLI on your local machine if you haven't already:bashCopy codecurl https://cli-assets.heroku.com/install.sh | sh
Configure the .env File for Heroku: Heroku uses environment variables, so make sure you configure your .env file correctly or set them directly in the Heroku dashboard.
Deploy the Code: Push your code to Heroku using Git:bashCopy codegit push heroku master
Database Configuration: Heroku offers a managed PostgreSQL database that you can provision with the command:bashCopy codeheroku addons:create heroku-postgresql:hobby-dev
Run Migrations: Run database migrations on Heroku with:bashCopy codeheroku run php artisan migrate
3. Automating Deployment with Laravel Forge or Envoyer
For smoother deployment management, you can use tools like Laravel Forge or Envoyer.
Laravel Forge: Laravel Forge is a server management and deployment service designed for PHP applications. It automates tasks like server provisioning, security updates, and Laravel deployments to platforms like AWS, DigitalOcean, and others.
Envoyer: Envoyer is a zero-downtime deployment tool that ensures your Laravel app is deployed with no interruption to your users. It handles the deployment process seamlessly, ensuring the application is running smoothly at all times.
4. Conclusion
Deploying a Laravel application to the cloud can seem daunting, but it becomes easier with tools and services that automate much of the process. Whether you choose AWS, DigitalOcean, or Heroku, each platform offers unique benefits for hosting your Laravel application. Using automation tools like Forge and Envoyer, you can further streamline the deployment process, ensuring your app runs smoothly and efficiently in the cloud.
0 notes
Text
How to Install CyberPanel on Ubuntu 22.04 Like a Pro! – Quick Tips
CyberPanel is a user-friendly control panel that makes managing websites and servers much easier, even for beginners. It uses LiteSpeed Web Server (a fast web server) and offers features like one-click WordPress installation, automatic SSL certificates, and a simple interface. In this guide, we’ll break down every step to help you Install CyberPanel on Ubuntu 22.04 server in a way that’s easy to follow, even if you’re not an expert. Let’s dive into each step How to Install CyberPanel on Ubuntu 22.04 Like a Pro!
Why Choose CyberPanel?
Before diving into the installation process, you might wonder why you should choose CyberPanel over other control panels like cPanel or Plesk. Here are a few compelling reasons: - Open Source: It’s completely free (though there’s an Enterprise version with additional features if you’re interested). - Lightweight and Fast: Built around OpenLiteSpeed, CyberPanel is optimized for speed and performance. - Intuitive Interface: The dashboard is clean and user-friendly, even for beginners. - Advanced Features: From one-click installations of WordPress to built-in support for Git, Redis, and Docker, CyberPanel offers plenty of powerful tools. - Auto SSL: Easily install and manage SSL certificates. Sounds like the control panel of your dreams, right?
Pre-Installation Checklist
Before you can install CyberPanel on Ubuntu 22.04, there are a few things you’ll need to prepare. Don’t worry, nothing too crazy! 1. A Fresh Ubuntu 22.04 Server Make sure you’ve got a clean installation of Ubuntu 22.04. You can set this up on a virtual private server (VPS) from your favourite hosting provider. Avoid running the installation on a server that already has web services installed, as that can cause conflicts. 2. Root Access or Sudo Privileges You’ll need root access to your server, or at the very least, a user account with sudo privileges. If you don’t have this, the installation won’t work properly. 3. Server Specifications Here are the minimum recommended system specs for running CyberPanel: - 1 GB of RAM (though 2 GB is ideal for better performance) - 10 GB of free disk space (more if you plan on hosting multiple websites) - A 64-bit operating system (which Ubuntu 22.04 is) 4. Domain Name While it’s not strictly required for the installation, having a domain name handy will allow you to configure your website and apply SSL certificates more easily.
Step-by-Step Guide: How to Install CyberPanel on Ubuntu 22.04
Alright, with your server ready and your domain name in hand, let’s get into the nitty-gritty of installing CyberPanel.
Step 1: Update Your Server’s Software
Before you install anything new, it’s a good idea to make sure your Ubuntu system is up to date. This helps avoid problems later and ensures everything runs smoothly. To update your server, open your terminal (a place where you can type commands) and enter these two commands one after the other:
- The first command, sudo apt update, checks for the latest updates for your system. - The second command, sudo apt upgrade -y, installs those updates. This could take a few minutes, depending on your internet connection and the speed of your internet. Once this is done, your system will be ready for the next steps.
Step 2: Install Basic Tools
Now, we need to install some basic tools that CyberPanel needs to run properly. These tools will help us download and install other software in the next steps. Run this command in your terminal:
- wget is a tool that helps us download files from the internet. - curl is a tool that allows us to transfer data and communicate with servers. By installing these, you’re preparing your system for the main installation.
Step 3: Download the CyberPanel Installer
Next, we need to download a special script (a small program) that will help us install CyberPanel. To do this, use the following command:
This command downloads the CyberPanel installer script and saves it to a file called installer.sh on your server. Once the script is downloaded, you need to permit it to run. To do that, enter:
This command makes the script executable, which means we can run it in the next step.
Step 4: Start the Installation Process
Now that everything is set up, we can begin the actual installation of CyberPanel. This step will take a while, and you’ll be asked to make some choices along the way. To start the installation, type:
This command runs the installer script. Once it begins, you’ll see several options. Let’s walk through them: Choosing the Web Server You’ll be asked whether to install the LiteSpeed Enterprise (a paid version) or OpenLiteSpeed (a free version). Since OpenLiteSpeed is free and works well for most users, we recommend selecting it by typing: Full Installation vs. Minimal Installation Next, you’ll be asked if you want to do a Full installation or a Minimal installation. Choose Full installation, as it includes important tools like PowerDNS (for managing your domain names) and Postfix (for sending emails). Installing Memcached and Redis These are tools that help speed up your websites by caching data (temporarily storing it so it can be accessed quickly). If you plan to host websites that need fast performance, select yes when asked to install Memcached and Redis. Setting an Admin Password At the end of the installation, you’ll be asked to set a password for the admin user. This password will be used to log in to the CyberPanel dashboard. Make sure to choose a strong password and write it down somewhere safe and secure place. After answering these questions, the installation will continue and It may take several minutes to finish.
Step 5: Access the CyberPanel Dashboard
Once the installation is complete, you’ll be given a link to log in to the CyberPanel web interface. This is where you can manage your websites and server settings. To access CyberPanel, open your web browser and type in the following:
- Replace with the actual IP address of your server. - The :8090 at the end is the port number where CyberPanel runs. You might see a warning saying that the site is not secure. This is normal because the server is using a self-signed SSL certificate. You can click through the warning to access the dashboard. Log in using the admin username and the password you created during installation.
Step 6: Configure OpenLiteSpeed
After logging in to CyberPanel, you’ll need to configure OpenLiteSpeed (the web server that powers your websites). Here’s how to do it: - Access the OpenLiteSpeed Admin: From the CyberPanel dashboard, click on OpenLiteSpeed WebAdmin. You’ll be taken to the OpenLiteSpeed admin page. - Log in to OpenLiteSpeed: Use the default credentials: - Username: admin - Password: 123456 (or the one you set during installation). - Change the Admin Password: For security reasons, it’s important to change the default admin password. To do this, run this command in your terminal:
- Follow the instructions to change your password.
Step 7: Secure CyberPanel with SSL
To protect your data and ensure a secure connection to CyberPanel, we need to set up an SSL certificate. CyberPanel allows you to do this automatically using Let’s Encrypt, a free service that provides SSL certificates.
Here’s how to do it: - Log in to the CyberPanel dashboard. - Go to SSL > Hostname SSL. - Enter your server’s hostname (the name of your server or domain). - Click Issue SSL. This will install an SSL certificate, and your CyberPanel interface will now be secure.
Step 8: Create and Manage Websites
With CyberPanel installed and secured, you can now start hosting websites. Here’s an easy-to-follow guide to help you begin: - Add a New Website: In the CyberPanel dashboard, go to Websites > Create Website. Fill in the necessary information: - Domain Name: The name of your website (e.g., example.com). - Email: Your email address. - PHP Version: Choose a version that works with your site (the default should be fine). Once you’ve entered this information, click Create Website. - Set Up DNS for Your Domain: DNS (Domain Name System) is what helps people find your website online. To configure DNS, go to DNS > Create Zone. Enter your domain name and set the A (Address) record to point to your server’s IP address. - Install WordPress: CyberPanel makes it easy to install WordPress. Go to Websites > List Websites, find your domain, and click Manage. You’ll see an option to install WordPress with one click.
Step 9: Enable Backups
It’s very important to regularly back up your website to ensure you can recover it if anything goes wrong. CyberPanel has a built-in tool for scheduling backups. - Go to Backup > Schedule Backup. - Select the website that you want to take a backup. - Choose how often you want to back up (daily, weekly, etc.). - Select a destination for your backups (you can save them locally or send them to a remote server). Once this is set up, CyberPanel will automatically create backups for you.
Step 10: Optimize CyberPanel for Speed
To get the best performance from CyberPanel, you can make a few adjustments: - Enable LSCache: LSCache is a caching system that speeds up websites. Go to Websites > List Websites, find your website, and enable LSCache for faster load times. - Adjust PHP Settings: If your website uses a lot of PHP scripts (common for WordPress sites), you can tweak the settings. Go to Server > PHP > Edit PHP Configs to adjust things like memory limits. - Use Security Plugins: To keep your server secure, consider installing Security plugins such as CSF Firewall and ModSecurity help protect your server from malicious attacks and enhance your website’s overall security. Here’s how you can install them through CyberPanel: CSF Firewall: - Go to Security > Install CSF from the CyberPanel dashboard. This firewall helps protect your server by blocking unwanted traffic. - After installation, you can configure it by navigating to Security > CSF Configuration where you can add specific rules or adjust settings to secure your server. ModSecurity: - To install ModSecurity, go to Security > Install ModSecurity in the dashboard. - Once installed, it will monitor web traffic for suspicious activities and block potential threats. It’s an excellent tool for preventing attacks like SQL injections and cross-site scripting. Both security plugins work in the background to safeguard your server and websites, helping to prevent common vulnerabilities.
Step 11: Monitor Server Performance
After you’ve successfully installed and set up CyberPanel, it’s crucial to keep an eye on your server’s performance. Monitoring your server helps you spot any potential issues before they turn into bigger problems. CyberPanel comes with built-in tools to help you with this: - Real-Time Monitoring: Go to Server Status > LiteSpeed Status to see how your server is performing. This page shows you important details like CPU usage, memory usage, and active connections. - System Health Check: Under Server Status > System Status, you can check the overall health of your server. This includes key metrics such as available disk space, RAM usage, and the status of various services like MySQL and DNS. Monitoring these areas regularly ensures that your server runs efficiently and doesn’t run out of resources unexpectedly.
Step 12: Troubleshooting Common Issues
Even with a detailed guide, you may run into problems during or after installation. Here are some common issues you may face and how to fix them: Issue 1: Can’t Access CyberPanel Web Interface - If you can’t access CyberPanel at https://:8090, the most likely reason is that port 8090 is blocked. To fix this, open the port by running the following command on your server:
After that, try accessing the panel again in your browser. Issue 2: SSL Certificate Not Working - If the SSL certificate you issued using Let’s Encrypt isn’t working, try reissuing the certificate: - Go to SSL > Manage SSL in CyberPanel. - Select your domain and click Issue SSL again. This will attempt to reissue the certificate, solving most SSL-related issues. Issue 3: Website is Running Slowly - If your website is slow, you can enable LiteSpeed Cache (LSCache) for faster performance. You should also consider using CDN (Content Delivery Network) services like Cloudflare to speed up content delivery.
Final Overview
Installing CyberPanel on Ubuntu 22.04 may seem like a technical task, but with this detailed guide, even a beginner can complete the process with ease. By following each step, you will set up a robust, secure, and high-performing web hosting environment using the OpenLiteSpeed web server and CyberPanel’s powerful features. From basic installation to security measures and performance optimization, this guide ensures that your websites will run smoothly on your server. Whether you're hosting a personal website or managing multiple domains, CyberPanel offers the flexibility and tools you need to succeed, making it an ideal choice for anyone new to server management. Now, go ahead and explore the many features of CyberPanel!
FAQs
1. Is CyberPanel free to use? Yes, CyberPanel is completely free. There’s also a paid Enterprise version with more features, but the free version is more than enough for most users. 2. Can I install CyberPanel on a VPS with less than 1 GB of RAM? While it’s technically possible, it’s not recommended. CyberPanel runs much more smoothly on systems with at least 1 GB of RAM (preferably 2 GB). 3. What’s the difference between OpenLiteSpeed and LiteSpeed Enterprise? OpenLiteSpeed is the free, open-source version of LiteSpeed. LiteSpeed Enterprise offers premium features like better performance and more advanced caching options, but it requires a license. Read the full article
#cloudpanelvscyberpanel#cyberpanel#cyberpanelhosting#cyberpanelinstall#cyberpanellogin#cyberpanelvps#cyberpanelvpshosting#cyberpanelvscpanel#installcyberpanel#whatiscyberpanel
0 notes
Link
#Automation#configure#containerization#Docker#Install#Linux#mediaserver#Monitoring#movies#NZB#open-source#Plex#PVR#Radarr#self-hosted#Setup#Sonarr#Streaming#systemadministration#torrent#Usenet
0 notes
Text
Hướng dẫn cài đặt Docker trên Ubuntu 22.04 chi tiết

Trong bài viết này, chúng ta sẽ cùng tìm hiểu cách cài đặt Docker trên Ubuntu 22.04, một công cụ mạnh mẽ và linh hoạt trong việc quản lý container. Docker giúp việc triển khai ứng dụng trở nên nhanh chóng, tiện lợi và tối ưu hóa tài nguyên. Nếu bạn đang sử dụng Ubuntu 22.04 và muốn thiết lập môi trường Docker để phát triển hoặc triển khai ứng dụng, hãy theo dõi hướng dẫn chi tiết dưới đây.
Giới thiệu về Docker CE
Docker CE (Community Edition) là một phiên bản mã nguồn mở của Docker, được thiết kế để dành cho cộng đồng người dùng và nhà phát triển. Đây là phiên bản Docker phổ biến nhất, phù hợp cho các dự án cá nhân hoặc các môi trường sản xuất quy mô nhỏ và trung bình.
Các tính năng chính:
Mã nguồn mở: Docker CE là một dự án mã nguồn mở, cung cấp quyền truy cập vào mã nguồn của Docker, cho phép cộng đồng đóng góp, kiểm tra và cải thiện phần mềm.
Đa nền tảng: Docker CE hỗ trợ nhiều hệ điều hành, bao gồm Linux, Windows và macOS, giúp đảm bảo tính linh hoạt khi triển khai ứng dụng trên các môi trường khác nhau.
Containerization: Docker CE cho phép tạo ra các container độc lập, chứa đầy đủ môi trường cần thiết để chạy một ứng dụng, giúp tránh các xung đột về môi trường hoặc phụ thuộc khi triển khai.
Quản lý hình ảnh: Docker CE cung cấp khả năng tạo và quản lý các hình ảnh Docker. Mỗi hình ảnh là một bản sao của một ứng dụng cụ thể, bao gồm tất cả các phụ thuộc của nó.
Docker Hub: Docker CE tích hợp với Docker Hub, bạn có thể tải lên, chia sẻ và truy cập hàng ngàn hình ảnh từ cộng đồng.
Docker Compose: Docker CE đi kèm với Docker Compose, một công cụ cho phép định nghĩa và quản lý nhiều container như một dịch vụ duy nhất, giúp dễ dàng triển khai các ứng dụng phức tạp.
Orchestration: Hỗ trợ các tính năng quản lý và điều phối container, như Docker Swarm để quản lý nhiều container trên nhiều host.
Các bước cài đặt Docker trên Ubuntu 22.04
Mặc định gói cài đặt đã có sẵn trong repo của ubuntu, nhưng đó không phải là bản mới nhất. Dưới đây là cách để bạn tải Docker phiên bản mới nhất
Bước 1: Cập nhật hệ thống
sudo apt update
Bước 2: Cài đặt các gói phụ thuộc
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Bước 3: Thêm khóa GPG cho kho lưu trữ Docker
curl -fsSL https://download.Docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/Docker-archive-keyring.gpg
Bước 4: Thêm kho lưu trữ Docker vào nguồn APT
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/Docker-archive-keyring.gpg] https://download.Docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/Docker.list > /dev/null
Bước 5: Cập nhật lại danh sách gói
sudo apt update
Bước 6: Kiểm tra kho lưu trữ Docker
apt-cache policy docker-ce
Bước 7: Cài đặt Docker phiên bản mới nhất
sudo apt install docker-ce
Bước 8 (Nếu cần): Nếu bạn muốn user mà bạn đăng nhập sử dụng Docker chứ không chỉ mỗi tài khoản root
sudo usermod -aG docker ${USER}
Kiểm tra sau khi cài đặt Docker trên Ubuntu 22.04
Sau khi cài đặt Docker CE xong ta cũng cần kiểm tra xem Docker đã chạy chưa và đang dùng version bao nhiêu
sudo systemctl status docker
sudo docker version
Tổng kết
Docker CE tích hợp Docker Compose, Dockerfile, và nhiều công cụ khác để cung cấp một giải pháp toàn diện cho việc quản lý container. Với Docker CE, bạn có thể dễ dàng tạo, triển khai, và quản lý các ứng dụng container hóa, đồng thời tận dụng sự hỗ trợ mạnh mẽ từ cộng đồng. Điều này giúp cho Docker CE trở thành lựa chọn hàng đầu cho các nhà phát triển, nhóm phát triển nhỏ, và cả những người mới bắt đầu tìm hiểu về công nghệ container.
Nguồn: https://suncloud.vn/cai-dat-docker-tren-ubuntu
0 notes
Text
Debian 12 initial server setup on a VPS/Cloud server
After deploying your Debian 12 server on your cloud provider, here are some extra steps you should take to secure your Debian 12 server. Here are some VPS providers we recommend. https://youtu.be/bHAavM_019o The video above follows the steps on this page , to set up a Debian 12 server from Vultr Cloud. Get $300 Credit from Vultr Cloud
Prerequisites
- Deploy a Debian 12 server. - On Windows, download and install Git. You'll use Git Bash to log into your server and carry out these steps. - On Mac or Linux, use your terminal to follow along.
1 SSH into server
Open Git Bash on Windows. Open Terminal on Mac/ Linux. SSH into your new server using the details provided by your cloud provider. Enter the correct user and IP, then enter your password. ssh root@my-server-ip After logging in successfully, update the server and install certain useful apps (they are probably already installed). apt update && apt upgrade -y apt install vim curl wget sudo htop -y
2 Create admin user
Using the root user is not recommended, you should create a new sudo user on Debian. In the commands below, Change the username as needed. adduser yournewuser #After the above user is created, add him to the sudo group usermod -aG sudo yournewuser After creating the user and adding them to the sudoers group, test it. Open a new terminal window, log in and try to update the server. if you are requested for a password, enter your user's password. If the command runs successfully, then your admin user is set and ready. sudo apt update && sudo apt upgrade -y
3 Set up SSH Key authentication for your new user
Logging in with an SSH key is favored over using a password. Step 1: generate SSH key This step is done on your local computer (not on the server). You can change details for the folder name and ssh key name as you see fit. # Create a directory for your key mkdir -p ~/.ssh/mykeys # Generate the keys ssh-keygen -t ed25519 -f ~/.ssh/mykeys/my-ssh-key1 Note that next time if you create another key, you must give it a different name, eg my-ssh-key2. Now that you have your private and public key generated, let's add them to your server. Step 2: copy public key to your server This step is still on your local computer. Run the following. Replace all the details as needed. You will need to enter the user's password. # ssh-copy-id -i ~/path-to-public-key user@host ssh-copy-id -i ~/.ssh/mykeys/my-ssh-key1.pub yournewuser@your-server-ip If you experience any errors in this part, leave a comment below. Step 3: log in with the SSH key Test that your new admin user can log into your Debian 12 server. Replace the details as needed. ssh yournewuser@server_ip -i ~/.ssh/path-to-private-key Step 4: Disable root user login and Password Authentication The Root user should not be able to SSH into the server, and only key based authentication should be used. echo -e "PermitRootLogin nonPasswordAuthentication no" | sudo tee /etc/ssh/sshd_config.d/mycustom.conf > /dev/null && sudo systemctl restart ssh To explain the above command, we are creating our custom ssh config file (mycustom.conf) inside /etc/ssh/sshd_config.d/ . Then in it, we are adding the rules to disable password authentication and root login. And finally restarting the ssh server. Certain cloud providers also create a config file in the /etc/ssh/sshd_config.d/ directory, check if there are other files in there, confirm the content and delete or move the configs to your custom ssh config file. If you are on Vultr cloud or Hetzner or DigitalOcean run this to disable the 50-cloud-init.conf ssh config file: sudo mv /etc/ssh/sshd_config.d/50-cloud-init.conf /etc/ssh/sshd_config.d/50-cloud-init Test it by opening a new terminal, then try logging in as root and also try logging in the new user via a password. If it all fails, you are good to go.
4 Firewall setup - UFW
UFW is an easier interface for managing your Firewall rules on Debian and Ubuntu, Install UFW, activate it, enable default rules and enable various services #Install UFW sudo apt install ufw #Enable it. Type y to accept when prompted sudo ufw enable #Allow SSH HTTP and HTTPS access sudo ufw allow ssh && sudo ufw allow http && sudo ufw allow https If you want to allow a specific port, you can do: sudo ufw allow 7000 sudo ufw allow 7000/tcp #To delete the rule above sudo ufw delete allow 7000 To learn more about UFW, feel free to search online. Here's a quick UFW tutorial that might help get you to understand how to perform certain tasks.
5 Change SSH Port
Before changing the port, ensure you add your intended SSH port to the firewall. Assuming your new SSH port is 7020, allow it on the firewall: sudo ufw allow 7020/tcp To change the SSH port, we'll append the Port number to the custom ssh config file we created above in Step 4 of the SSH key authentication setup. echo "Port 7020" | sudo tee -a /etc/ssh/sshd_config.d/mycustom.conf > /dev/null && sudo systemctl restart ssh In a new terminal/Git Bash window, try to log in with the new port as follows: ssh yournewuser@your-server-ip -i ~/.ssh/mykeys/my-ssh-key1 -p 7020 #ssh user@server_ip -i ~/.ssh/path-to-private-key -p 7020 If you are able to log in, then that’s perfect. Your server's SSH port has been changed successfully.
6 Create a swap file
Feel free to edit this as much as you need to. The provided command will create a swap file of 2G. You can also change all instances of the name, debianswapfile to any other name you prefer. sudo fallocate -l 2G /debianswapfile ; sudo chmod 600 /debianswapfile ; sudo mkswap /debianswapfile && sudo swapon /debianswapfile ; sudo sed -i '$a/debianswapfile swap swap defaults 0 0' /etc/fstab
7 Change Server Hostname (Optional)
If your server will also be running a mail server, then this step is important, if not you can skip it. Change your mail server to a fully qualified domain and add the name to your etc/hosts file #Replace subdomain.example.com with your hostname sudo hostnamectl set-hostname subdomain.example.com #Edit etc/hosts with your hostname and IP. replace 192.168.1.10 with your IP echo "192.168.1.10 subdomain.example.com subdomain" | sudo tee -a /etc/hosts > /dev/null
8 Setup Automatic Updates
You can set up Unattended Upgrades #Install unattended upgrades sudo apt install unattended-upgrades apt-listchanges -y # Enable unattended upgrades sudo dpkg-reconfigure --priority=low unattended-upgrades # Edit the unattended upgrades file sudo vi /etc/apt/apt.conf.d/50unattended-upgrades In the open file, uncomment the types of updates you want to be updated , for example you can make it look like this : Unattended-Upgrade::Origins-Pattern { ......... "origin=Debian,codename=${distro_codename}-updates"; "origin=Debian,codename=${distro_codename}-proposed-updates"; "origin=Debian,codename=${distro_codename},label=Debian"; "origin=Debian,codename=${distro_codename},label=Debian-Security"; "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; .......... }; Restart and dry run unattended upgrades sudo systemctl restart unattended-upgrades.service sudo unattended-upgrades --dry-run --debug auto-update 3rd party repositories The format for Debian repo updates in the etc/apt/apt.conf.d/50unattended-upgrades file is as follows "origin=Debian,codename=${distro_codename},label=Debian"; So to update third party repos you need to figure out details for the repo as follows # See the list of all repos ls -l /var/lib/apt/lists/ # Then check details for a specific repo( eg apt.hestiacp.com_dists_bookworm_InRelease) sudo cat /var/lib/apt/lists/apt.hestiacp.com_dists_bookworm_InRelease # Just the upper part is what interests us eg : Origin: apt.hestiacp.com Label: apt repository Suite: bookworm Codename: bookworm NotAutomatic: no ButAutomaticUpgrades: no Components: main # Then replace these details in "origin=Debian,codename=${distro_codename},label=Debian"; # And add the new line in etc/apt/apt.conf.d/50unattended-upgrades "origin=apt.hestiacp.com,codename=${distro_codename},label=apt repository"; There you go. This should cover Debian 12 initial server set up on any VPS or cloud server in a production environment. Additional steps you should look into: - Install and set up Fail2ban - Install and set up crowdsec - Enable your app or website on Cloudflare - Enabling your Cloud provider's firewall, if they have one.
Bonus commands
Delete a user sudo deluser yournewuser sudo deluser --remove-home yournewuser Read the full article
0 notes