StuRa Diskussion:Server/Ghost: Unterschied zwischen den Versionen
(10 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 51: | Zeile 51: | ||
::; Nesting: [X] | ::; Nesting: [X] | ||
Starten! | Starten! | ||
Verbinden per ssh | Verbinden per ssh | ||
Zeile 101: | Zeile 90: | ||
:; Reboot: '''Select''' | :; Reboot: '''Select''' | ||
::; (Confirm): '''Yes''' | ::; (Confirm): '''Yes''' | ||
Verbinden per ssh | |||
: <code>ssh root@test.ghost.htw.stura-dresden.de</code> | |||
: <code>confconsole</code> | |||
; Lets encrypt: '''Select''' | |||
; Get certificate: '''Select''' | |||
; DNS must be configured before … <br />Do you wish to continue?: '''Yes''' | |||
; Before getting als Lets's Encrypt certificate …<br />Do you agree to the Lets's Encrypt Terms of Service?: '''Yes''' | |||
; Certificate Certificate Wildcard: | |||
:; Donmain 1: <tt>test.ghost.htw.stura-dresden.de</tt> | |||
:; Donmain 2: '''Apply''' | |||
; This will override… <br />. Continue?: '''Yes''' | |||
; Cert auto renew: '''Select''' | |||
; Automatic…<br />disabled: '''Toggle''' | |||
; Automatic…<br />enabled: '''Ok''' | |||
; Lets encrypt: '''Back''' | |||
; Region config: '''Select''' | |||
; Tzdata: '''Select''' | |||
; Please select …<br />Geographic area: Europe | |||
; Please select …<br />Time zone: Berlin | |||
; Region config: '''Back''' | |||
; Quit: '''Select''' | |||
; (Confirm): '''Yes''' | |||
<s> | |||
: <code>apt update</code> | |||
: <code>apt upgrade</code> | |||
</s> | |||
---- | |||
; Datacenter (cluster): | |||
:; HA: | |||
::; Resources: | |||
:::; Add: | |||
::::; VM: <tt>113</tt> | |||
::::; Group: ''HA_cluster'' | |||
::::; Add: | |||
== Konfiguration einer Instanz zum Testen von Ghost als Container für TurnKey Linux auf Proxmox == | |||
=== Probleme und Lösungen für die Konfiguration einer Instanz zum Testen von Ghost als Container für TurnKey Linux auf Proxmox === | |||
; Problem: Das Hochladen von Dateien ist<!-- mit der Fehlermeldung ''please insert errror message here'' !--> nicht möglich. | |||
: Das Problem ergibt sich beispielsweise, wenn ein Datei für ein Theme hochgeladen werden soll. | |||
:: Das Problem betrifft die andere Dateien, also auch Dateien wie Bilder, Videos und so weiter, die über die Website hochgeladen werden sollen. | |||
; Lösung: Ändern (Erhöhen) der standardmäßigen maximalen Größe für Dateien, die durch einen Client beim Webserver hochgeladen werden dürfen. | |||
Bearbeiten der Datei für die Konfiguration der Anwendung Nginx | |||
: <code>$EDITOR /etc/nginx/nginx.conf</code> | |||
: <code>nano /etc/nginx/nginx.conf</code> | |||
:: Hinzufügen der Festlegung für die Variable ''[https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size client_max_body_size] auf die maximale Größe von 5 MB (im bestehenden Abschnitt ''http'' von ''Basic Settings'') | |||
<pre></pre> | |||
<pre> | |||
http { | |||
</pre> | |||
<pre></pre> | |||
<pre> | |||
client_max_body_size 5M; | |||
</pre> | |||
<pre></pre> | |||
<pre> | |||
} | |||
</pre> | |||
<pre></pre> | |||
Neuladen der Konfiguration der Anwendung Nginx | |||
: <code>systemctl reload nginx</code> | |||
* Es lassen sich nun Dateien hochladen, die die Größe von 5 MB nicht überschreiten. | |||
* Der Wert von 5 MB könnte auch auf eine andere Größe angepasst werden. | |||
== Aktualisierung einer Instanz zum Testen von Ghost als Container für TurnKey Linux auf Proxmox == | |||
Aktualisierungen der Anwendung Ghost werden mit Ghost CLI vorgenommen. | |||
===== Aktualisierung vom Paket ''npm'' ===== | |||
Aktualisieren vom Paket ''npm'', der Verwaltung von Paketen von Node.js | |||
<code>sudo npm install -g npm</code> | |||
; Beispiel zum Hinweis auf eine verfügbare neuere Version: | |||
Bei der Verwendung von <code>npm</code> wird darauf hingewiesen, wenn eine aktuellere Version von <code>npm</code> selbs verfügbar von ist. | |||
<pre> | |||
╭────────────────────────────────────────────────────────────────╮ | |||
│ │ | |||
│ New patch version of npm available! 6.14.4 -> 6.14.8 │ | |||
│ Changelog: https://github.com/npm/cli/releases/tag/v6.14.8 │ | |||
│ Run npm install -g npm to update! │ | |||
│ │ | |||
╰────────────────────────────────────────────────────────────────╯ | |||
</pre> | |||
===== Aktualisierung vom Paket ''ghost-cli'' ===== | |||
Vor der Aktualisierung vom Paket ''ghost-cli'' sollte eine [[#Aktualisierung vom Paket ''npm'']] durchgeführt werden, wenn eine Aktualisierung verfügbar ist. | |||
Aktualisieren vom Paket ''ghost-cli'' mit ''npm'', der Verwaltung von Paketen von Node.js | |||
<code>sudo npm install -g ghost-cli@latest</code> | |||
===== Aktualisierung von der Anwendung ''ghost'' ===== | |||
Vor der Aktualisierung von Ghost sollte eine [[#Aktualisierung vom Paket ''ghost-cli'']] durchgeführt werden, wenn eine Aktualisierung verfügbar ist. | |||
: Im Übrigen sollte die Version nach der [[#Aktualisierung vom Paket ''ghost-cli'']] mindestens so aktuell wie die Version für die [[#Aktualisierung von ''ghost'']] sein. | |||
Im Anschluss wird via Ghost CLI | |||
<s><!-- v@ 4 3b@: Problem, statt richtiges Vorgehen !--> | |||
Aktualisieren der Anwendung Ghost mit ''ghost'', dem Programm vom Paket ''ghost-cli'' | |||
: <code>ghost update</code> | |||
Dabei wird folgender Fehler ausgeworfen | |||
<pre> | |||
Working directory is not a recognisable Ghost installation. | |||
</pre> | |||
<pre> | |||
Run`ghost update` again within a folder where Ghost was installed with Ghost-CLI. | |||
</pre> | |||
Grund dafür ist, dass bei der Installation via TurnKey das Verzeichnis für die Installation nicht in <code>/var/www/</code> abgelegt wird, stattdessen ist dieses in <code>/opt/</code> anzufinden. | |||
: Des Weiteren lässt sich der nicht via root ausführen, sonder den automatisch angelegten Benutzer ''ghost_user''. | |||
</s> | |||
Wechseln in das Verzeichnis der Anwendung Ghost | |||
: <code>cd /opt/ghost/</code> | |||
Im Anschluss das Update via Ghost CLI mit dem Benutzer ghost_user ausführen. | |||
Aktualisieren der Anwendung Ghost mit ''ghost'', dem Programm vom Paket ''ghost-cli'', als Account ''ghost_user'' | |||
: <code>su ghost_user -c 'ghost update'</code> | |||
<pre></pre> | |||
<pre> | |||
+ sudo systemctl is-active ghost_localhost | |||
</pre> | |||
: ''8'' | |||
<pre></pre> | |||
<pre> | |||
+ sudo systemctl stop ghost_localhost | |||
</pre> | |||
: ''8'' | |||
<pre></pre> | |||
<pre> | |||
+ sudo systemctl start ghost_localhost | |||
</pre> | |||
: ''8'' | |||
<pre></pre> | |||
Alle Komponenten der Anwendung Ghost sind nun aktuell. |
Aktuelle Version vom 18. September 2020, 22:28 Uhr
Ghost meets FreeBSD[Bearbeiten]
Installation einer Instanz zum Testen von Ghost als Container für TurnKey Linux auf Proxmox[Bearbeiten]
- Vorarbeit
- Erstellen vom Eintrag für DNS
- Eintrag A für test.ghost.htw.stura-dresden.de auf 141.56.51.194
- Verbinden mit dem Proxmox (Cluster)
- Herunterladen von der Vorlage (für Ghost) für TurnKey für Proxmox
- Server/Proxmox#Containerisierung für bestimmte Anwendungen
- …
chephfs debian-10-turnkey-ghost_16.0-1_amd64.tar.gz
- Create CT
-
- General
-
- Node
- Hostname
- dev ghost
- Unprivileged container
- [X]
- Password
- 8
- Template
-
- Storage
- cephfs
- Type
- rdb
- Template
- debian-10-turnkey-ghost_16.0-1_amd64.tar.gz
- Root Disk
-
- Storage
- storage
- Disk size (GiB)
- 16
- CPU
-
- Cores
- 1
- Memory
-
- Memory (MiB)
- 1024
- Swap (MiB)
- 1024
- Network
-
- Bridge
- vmbr1
- IPv4
- Static
- IPv4/CIDR
- 141.56.51.194/24
- Gateway (IPv4)
- 141.56.51.254
- DNS
-
- DNS domain
- DNS servers
- 141.56.1.1
- Confirm
-
- Start after created
- [ ]
- Finish
Erstellt! (Nicht gestartet!)
Container (linke Spalte) auswählen
- Options
-
- Features
-
- Nesting
- [X]
Starten!
Verbinden per ssh
ssh root@test.ghost.htw.stura-dresden.de
- Ghost Password
- 8
- Confirm
- 8
- Ghost Email
- ghost@stura…
- Ghost Account Name
- Test StuRa HTW Dresden
- Ghost Domain
- htps://test.ghost.htw.stura-dresden.de
- Initialize Hub services
- Skip
- System Notifications and Critical Security Alerts
- Skip
- Security updates
- Install
┌──────────────DEV-GHOST appliance services────────────────┐ │ │ │ Ghost: https://141.56.51.194 │ │ Blog Admin: https://141.56.51.194/ghost │ │ Web shell: https://141.56.51.194:12320 │ │ Webmin: https://141.56.51.194:12321 │ │ SSH/SFTP: root@141.56.51.194 (port 22) │ │ │ │ TKLBAM (Backup and Migration): NOT INITIALIZED │ │ │ │ │ │ │ │ │ │ │ │ │ │ TurnKey Backups and Cloud Deployment │ │ https://hub.turnkeylinux.org │ ├──────────────────────────────────────────────────────────┤ │ <Advanced Menu> │ └──────────────────────────────────────────────────────────┘
- DEV-GHOST appliance services
- Advanced Menu
- Advanced Menu
-
- Reboot
- Select
- (Confirm)
- Yes
Verbinden per ssh
ssh root@test.ghost.htw.stura-dresden.de
confconsole
- Lets encrypt
- Select
- Get certificate
- Select
- DNS must be configured before …
Do you wish to continue? - Yes
- Before getting als Lets's Encrypt certificate …
Do you agree to the Lets's Encrypt Terms of Service? - Yes
- Certificate Certificate Wildcard
-
- Donmain 1
- test.ghost.htw.stura-dresden.de
- Donmain 2
- Apply
- This will override…
. Continue? - Yes
- Cert auto renew
- Select
- Automatic…
disabled - Toggle
- Automatic…
enabled - Ok
- Lets encrypt
- Back
- Region config
- Select
- Tzdata
- Select
- Please select …
Geographic area - Europe
- Please select …
Time zone - Berlin
- Region config
- Back
- Quit
- Select
- (Confirm)
- Yes
apt update
apt upgrade
- Datacenter (cluster)
-
- HA
-
- Resources
-
- Add
-
- VM
- 113
- Group
- HA_cluster
- Add
Konfiguration einer Instanz zum Testen von Ghost als Container für TurnKey Linux auf Proxmox[Bearbeiten]
Probleme und Lösungen für die Konfiguration einer Instanz zum Testen von Ghost als Container für TurnKey Linux auf Proxmox[Bearbeiten]
- Problem
- Das Hochladen von Dateien ist nicht möglich.
- Das Problem ergibt sich beispielsweise, wenn ein Datei für ein Theme hochgeladen werden soll.
- Das Problem betrifft die andere Dateien, also auch Dateien wie Bilder, Videos und so weiter, die über die Website hochgeladen werden sollen.
- Lösung
- Ändern (Erhöhen) der standardmäßigen maximalen Größe für Dateien, die durch einen Client beim Webserver hochgeladen werden dürfen.
Bearbeiten der Datei für die Konfiguration der Anwendung Nginx
$EDITOR /etc/nginx/nginx.conf
nano /etc/nginx/nginx.conf
- Hinzufügen der Festlegung für die Variable client_max_body_size auf die maximale Größe von 5 MB (im bestehenden Abschnitt http von Basic Settings)
http {
client_max_body_size 5M;
}
Neuladen der Konfiguration der Anwendung Nginx
systemctl reload nginx
- Es lassen sich nun Dateien hochladen, die die Größe von 5 MB nicht überschreiten.
- Der Wert von 5 MB könnte auch auf eine andere Größe angepasst werden.
Aktualisierung einer Instanz zum Testen von Ghost als Container für TurnKey Linux auf Proxmox[Bearbeiten]
Aktualisierungen der Anwendung Ghost werden mit Ghost CLI vorgenommen.
Aktualisierung vom Paket npm[Bearbeiten]
Aktualisieren vom Paket npm, der Verwaltung von Paketen von Node.js
sudo npm install -g npm
- Beispiel zum Hinweis auf eine verfügbare neuere Version
Bei der Verwendung von npm
wird darauf hingewiesen, wenn eine aktuellere Version von npm
selbs verfügbar von ist.
╭────────────────────────────────────────────────────────────────╮ │ │ │ New patch version of npm available! 6.14.4 -> 6.14.8 │ │ Changelog: https://github.com/npm/cli/releases/tag/v6.14.8 │ │ Run npm install -g npm to update! │ │ │ ╰────────────────────────────────────────────────────────────────╯
Aktualisierung vom Paket ghost-cli[Bearbeiten]
Vor der Aktualisierung vom Paket ghost-cli sollte eine #Aktualisierung vom Paket npm durchgeführt werden, wenn eine Aktualisierung verfügbar ist.
Aktualisieren vom Paket ghost-cli mit npm, der Verwaltung von Paketen von Node.js
sudo npm install -g ghost-cli@latest
Aktualisierung von der Anwendung ghost[Bearbeiten]
Vor der Aktualisierung von Ghost sollte eine #Aktualisierung vom Paket ghost-cli durchgeführt werden, wenn eine Aktualisierung verfügbar ist.
- Im Übrigen sollte die Version nach der #Aktualisierung vom Paket ghost-cli mindestens so aktuell wie die Version für die #Aktualisierung von ghost sein.
Im Anschluss wird via Ghost CLI
Aktualisieren der Anwendung Ghost mit ghost, dem Programm vom Paket ghost-cli
ghost update
Dabei wird folgender Fehler ausgeworfen
Working directory is not a recognisable Ghost installation.
Run`ghost update` again within a folder where Ghost was installed with Ghost-CLI.
Grund dafür ist, dass bei der Installation via TurnKey das Verzeichnis für die Installation nicht in /var/www/
abgelegt wird, stattdessen ist dieses in /opt/
anzufinden.
- Des Weiteren lässt sich der nicht via root ausführen, sonder den automatisch angelegten Benutzer ghost_user.
Wechseln in das Verzeichnis der Anwendung Ghost
cd /opt/ghost/
Im Anschluss das Update via Ghost CLI mit dem Benutzer ghost_user ausführen.
Aktualisieren der Anwendung Ghost mit ghost, dem Programm vom Paket ghost-cli, als Account ghost_user
su ghost_user -c 'ghost update'
+ sudo systemctl is-active ghost_localhost
- 8
+ sudo systemctl stop ghost_localhost
- 8
+ sudo systemctl start ghost_localhost
- 8
Alle Komponenten der Anwendung Ghost sind nun aktuell.