diff --git a/README.md b/README.md index a42f38b..79c5303 100644 --- a/README.md +++ b/README.md @@ -55,16 +55,16 @@ Please note that **Web Push Notifications** and the **Service Worker** require a ### 🚀 Installation Guide -#### 0. System Pre-requisites (Critical) -Before installing Python dependencies, install the necessary system compilers and pip/venv tools. On Debian/Ubuntu: +#### 0. Root Privileges +All installation steps must be executed as the `root` user. Before starting, elevate your privileges by running: ```bash -sudo apt update -sudo apt install build-essential python3-dev libssl-dev libffi-dev python3-pip python3-venv +apt update +apt install build-essential python3-dev libssl-dev libffi-dev python3-pip python3-venv ``` #### 1. Clone Repository Clone the repository into the /opt directory to ensure all systemd paths work correctly: ```bash -sudo git clone https://tuo-gitea.com/utente/fleet-control-server.git /opt/fleet-control-server +git clone https://tuo-gitea.com/utente/fleet-control-server.git /opt/fleet-control-server cd /opt/fleet-control-server ``` #### 2. Virtual Environment Setup (Recommended) @@ -86,10 +86,10 @@ pip install -r requirements.txt #### 4. Running as a Service To run the server continuously in production using Gunicorn: ```bash -sudo cp fleet-console.service /etc/systemd/system/ -sudo systemctl daemon-reload -sudo systemctl enable fleet-console -sudo systemctl start fleet-console +cp fleet-console.service /etc/systemd/system/ +systemctl daemon-reload +systemctl enable fleet-console +systemctl start fleet-console ``` *(Ensure the `.service` file points to the `gunicorn` executable inside your `venv`)*. @@ -144,16 +144,16 @@ Si prega di notare che le **Notifiche Web Push** e il **Service Worker** richied ### 🚀 Guida all'Installazione -#### 0. Requisiti di Sistema (Critici) -Prima di installare le dipendenze Python, installa i compilatori di base e gli strumenti per gli ambienti virtuali. Su Debian/Ubuntu: +#### 0. Privilegi di Root +Tutti i passaggi di installazione devono essere eseguiti come utente `root`. Prima di iniziare, eleva i tuoi privilegi eseguendo: ```bash -sudo apt update -sudo apt install build-essential python3-dev libssl-dev libffi-dev python3-pip python3-venv +apt update +apt install build-essential python3-dev libssl-dev libffi-dev python3-pip python3-venv ``` #### 1. Clonazione dei Repository Clona il repository nella cartella /opt per assicurarti che tutti i percorsi dei servizi systemd siano corretti: ```bash -sudo git clone https://tuo-gitea.com/utente/fleet-control-server.git /opt/fleet-control-server +git clone https://tuo-gitea.com/utente/fleet-control-server.git /opt/fleet-control-server cd /opt/fleet-control-server ``` #### 2. Setup Ambiente Virtuale (Consigliato) @@ -175,10 +175,10 @@ pip install -r requirements.txt #### 4. Esecuzione come Servizio (systemd) Per eseguire il server in produzione in modo continuo e stabile con Gunicorn: ```bash -sudo cp fleet-console.service /etc/systemd/system/ -sudo systemctl daemon-reload -sudo systemctl enable fleet-console -sudo systemctl start fleet-console +cp fleet-console.service /etc/systemd/system/ +systemctl daemon-reload +systemctl enable fleet-console +systemctl start fleet-console ``` *(Assicurati che il file `.service` punti all'eseguibile `gunicorn` situato all'interno della cartella `venv`).* diff --git a/install.txt b/install.txt index 8a22a6a..0a70297 100644 --- a/install.txt +++ b/install.txt @@ -2,6 +2,13 @@ INSTALLATION GUIDE - FLEET CONTROL CONSOLE (SERVER) ============================================================ +------------------------------------------------------------ +0. IMPORTANT: ROOT PRIVILEGES +------------------------------------------------------------ +All installation steps must be executed as the "root" user. +Before starting, elevate your privileges by running: + sudo su + ------------------------------------------------------------ 1. PRE-REQUISITES (CRITICAL) ------------------------------------------------------------ @@ -9,8 +16,8 @@ Before installing Python dependencies, you must install system compilers, development libraries, and pip/venv tools. Debian/Ubuntu: - sudo apt update - sudo apt install build-essential python3-dev libssl-dev libffi-dev python3-pip python3-venv + apt update + apt install build-essential python3-dev libssl-dev libffi-dev python3-pip python3-venv Create and activate a virtual environment (CRITICAL on Debian 12+): cd /opt/fleet-control-server @@ -62,14 +69,21 @@ ExecStart=/opt/fleet-control-server/venv/bin/gunicorn -k ... Configuration: 1. Copy .service file to '/etc/systemd/system/': sudo cp fleet-console.service /etc/systemd/system/ -2. Reload systemd: sudo systemctl daemon-reload -3. Enable on boot: sudo systemctl enable fleet-console -4. Start service: sudo systemctl start fleet-console +2. Reload systemd: systemctl daemon-reload +3. Enable on boot: systemctl enable fleet-console +4. Start service: systemctl start fleet-console ============================================================ GUIDA ALL'INSTALLAZIONE - SERVER (ITALIANO) ============================================================ +------------------------------------------------------------ +0. IMPORTANTE: PRIVILEGI DI ROOT +------------------------------------------------------------ +Tutti i passaggi di installazione devono essere eseguiti +come utente "root". Prima di iniziare, eleva i tuoi privilegi: + sudo su + ------------------------------------------------------------ 1. REQUISITI PRELIMINARI (CRITICI) ------------------------------------------------------------ @@ -123,6 +137,6 @@ ExecStart=/opt/fleet-control-server/venv/bin/gunicorn -k ... Passaggi: 1. Copia il file in systemd: sudo cp fleet-console.service /etc/systemd/system/ -2. Ricarica la configurazione: sudo systemctl daemon-reload -3. Abilita all'avvio: sudo systemctl enable fleet-console -4. Avvia il servizio: sudo systemctl start fleet-console +2. Ricarica la configurazione: systemctl daemon-reload +3. Abilita all'avvio: systemctl enable fleet-console +4. Avvia il servizio: systemctl start fleet-console