I den här guiden går vi igenom hur du installerar Discourse, ett populärt forumprogram, med Nginx på Rocky Linux 9. Denna installation kan vara särskilt användbar för användare av en VPS-server.

Förutsättningar

  • Rocky Linux 9 installerat på din server.
  • Root-åtkomst eller sudo-rättigheter.
  • En aktiv internetanslutning.
  • Docker installerat på systemet.
  • Nginx installerat som webbserver.

Steg 1: Uppdatera systemet

Öppna terminalen och kör följande kommando för att uppdatera systempaketen:

sudo dnf update -y

Steg 2: Installera nödvändiga beroenden

Kör följande kommando för att installera nödvändiga paket:

sudo dnf install -y epel-release

Steg 3: Installera Docker

Kör följande kommando för att installera Docker:

sudo dnf install -y docker

Starta och aktivera Docker-tjänsten:

sudo systemctl start docker
sudo systemctl enable docker

Steg 4: Skapa en Discourse-mapp

Kör följande kommando för att skapa en mapp för Discourse:

mkdir ~/discourse
cd ~/discourse

Steg 5: Ladda ner Discourse-docker

Klonar Discourse-docker-repo:

git clone https://github.com/discourse/discourse_docker.git .

Steg 6: Konfigurera Discourse

Kör följande kommando för att kopiera exempelkonfigurationsfilen:

cp samples/standalone.yml containers/app.yml

Redigera app.yml-filen:

nano containers/app.yml

Ange dina specifika inställningar, inklusive domännamn och e-postinställningar.

Steg 7: Starta Discourse med Docker

Kör följande kommando för att starta Discourse:

sudo ./launcher bootstrap app
sudo ./launcher start app

Steg 8: Konfigurera Nginx för Discourse

Lägg till en ny konfigurationsfil för Nginx:

sudo nano /etc/nginx/conf.d/discourse.conf

Lägg till följande innehåll i filen:

server {
        listen 80;
        server_name your_domain;

        location / {
            proxy_pass http://localhost:8080;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }

Ersätt `your_domain` med ditt faktiska domännamn.

Steg 9: Starta om Nginx

Kör följande kommando för att starta om Nginx:

sudo systemctl restart nginx

Avslutning

Ditt Discourse-forum är nu installerat och klart för användning. Genom att använda denna metod kan du enkelt hantera ditt forum från en VPS-server.

Linux VPS

Linux VPS UK

Linux VPS

VPS Windows

Serwer VPS Windows

VPS Linux VPSDeutschland

Linux VPS Hosting

VPS Linux VPSEspaña

Linux VPS Nederland

VPS Linux VPSItalia

VPS Linux VPSPortugal

VPS Linux VPS??????

VPS Linux VPS???????

VPS Linux VPS??

VPS Linux VPSSverige

VPS Linux VPSNorge

VPS Linux VPS????

VPS Linux VPSTürkiye

Remote Desktop Services (RDS)

RDS CAL (Client Access License)

Remote Desktop VPS

Keywords: windows vps uk, windows vps, uk windows vps, windows vps hosting uk, vps windows server, uk vps windows, vps windows, servidor vps windows, vps uk windows, vps with windows, virtual private server windows, windows virtual private server, windows vps server uk, vps for windows, servidores vps windows, vps windows uk, windows vps hosting, vps windows hosting, windows vps server, windows virtual private servers, vps on windows, vps windows servers, cheap windows vps uk, windowsvps, windows desktop vps, buy vps windows, windows server vps, windows 10 vps uk, rds services, rds cal, remote desktop services, remote desktop hosting

#windowsvps #vpshosting #ukvps #virtualserver #windowsvpsuk #vpsserver #hostingvps #cloudvps #windowsvpshosting #cheapvps #vpswithwindows #windowsserver #servervps #vpssolutions #vpswindows #rdscal #remotedesktop #remotedesktopvps #rds #windowsrds

vps windows