StuRa:Server/Ghost: Unterschied zwischen den Versionen

Aus Wiki StuRa HTW Dresden
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „Host: srs100034 ; pauschale Aktualisierung (auf die Schnelle) <code>pkg update && pkg upgrade -y</code> ; Aktivierung zum Zugriff per SSH : <code>sysrc s…“)
 
 
(21 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
Host: [[srs100034]]
= [[{{PAGENAME}}]] =


; pauschale Aktualisierung (auf die Schnelle)
== Intsallation ==
<code>pkg update && pkg upgrade -y</code>


; Aktivierung zum Zugriff per SSH
* https://docs.ghost.org/docs/install
: <code>sysrc sshd_enable=YES</code>
* https://ghost.org/docs/install/
: <code>service sshd start</code>


; Erstellung Account ''rj''
 
: <code>adduser</code>
= [[Ubuntu]] =
 
Zum Testen wurde für das [[Referat Öffentlichkeitsarbeit]] im Zusammenwirken mit dem [[Bereich Administration Rechentechnik]] eine Instanz [[Server/Ghost]] als [[LXC]] ([[Ubuntu]] 16.04) bei [[srs2709]] ([[srs27090]]/[[srs27091]]/…) erstellt.
 
----
 
https://ghost.org/docs/install/ubuntu/
 
----
 
: <code>adduser stura</code>
 
: <code>usermod -aG sudo stura</code>
 
: <code>su - stura</code>
 
----
 
: <code>sudo apt install -y ddate</code>
 
: <code>sudo apt update && sudo apt upgrade -y</code>
 
: <code>sudo apt install -y nginx</code>
 
: <code>sudo ufw allow 'Nginx Full'</code>
 
: <code>sudo apt install -y mysql-server</code>
 
Passwort (g…oll) für ''root'' von MySQL gesetzt
 
: <code>sudo apt install -y curl</code>
 
: <code>curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash</code>
 
: <code>sudo apt install -y nodejs</code>
 
: <code>sudo npm i -g ghost-cli</code>
 
: <code>sudo mkdir -p /var/www/ghost</code>
 
: <code>sudo chown `whoami`:`whoami` /var/www/ghost</code>
 
: <code>sudo chmod 775 /var/www/ghost</code>
 
: <code>cd /var/www/ghost && ghost install && cd -</code>
<pre>
✔ Checking system Node.js version
✔ Checking logged in user
✔ Checking current folder permissions
✔ Checking operating system compatibility
✔ Checking for a MySQL installation
✔ Checking memory availability
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v1.25.3
✔ Finishing install process
</pre>
<pre>
? Enter your blog URL: http://ghost.stura-dresden.de
</pre>
<pre>
? Enter your MySQL hostname: localhost
</pre>
<pre>
? Enter your MySQL username: root
</pre>
<pre>
? Enter your MySQL password: [hidden]
</pre>
<pre>
? Enter your Ghost database name: ghost_prod
</pre>
<pre>
✔ Configuring Ghost
✔ Setting up instance
Running sudo command: useradd --system --user-group ghost
Running sudo command: chown -R ghost:ghost /var/www/ghost/content
✔ Setting up "ghost" system user
</pre>
<pre>
? Do you wish to set up "ghost" mysql user? Yes
</pre>
<pre>
✔ Setting up "ghost" mysql user
</pre>
<pre>
? Do you wish to set up Nginx? Yes
✔ Creating nginx config file at /var/www/ghost/system/files/ghost.stura-dresden.de.conf
Running sudo command: ln -sf /var/www/ghost/system/files/ghost.stura-dresden.de.conf /etc/nginx/sites-available/ghost.stura-dresden.de.conf
Running sudo command: ln -sf /etc/nginx/sites-available/ghost.stura-dresden.de.conf /etc/nginx/sites-enabled/ghost.stura-dresden.de.conf
Running sudo command: nginx -s reload
✔ Setting up Nginx
</pre>
<pre>
? Do you wish to set up SSL? Yes
Uh-oh! It looks like your domain isn't set up correctly yet. Because of this, SSL setup won't work correctly.Once you've set up your domain and pointed it at this server's IP, try running `ghost setup ssl` again.
✔ Setting up SSL
</pre>
<pre>
<pre>
Username: pv
? Do you wish to set up Systemd? Yes
Full name: PV
✔ Creating systemd service file at /var/www/ghost/system/files/ghost_ghost-stura-dresden-de.service
Uid (Leave empty for default):
Running sudo command: ln -sf /var/www/ghost/system/files/ghost_ghost-stura-dresden-de.service /lib/systemd/system/ghost_ghost-stura-dresden-de.service
Login group [pv]:
Running sudo command: systemctl daemon-reload
Login group is pv. Invite pv into other groups? []: wheel
✔ Setting up Systemd
Login class [default]:  
Running sudo command: /var/www/ghost/current/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/ghost/current
Shell (sh csh tcsh git-shell zsh rzsh nologin) [sh]: zsh
✔ Running database migrations
Home directory [/home/pv]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:  
Enter password again:
Lock out the account after creation? [no]:
Username  : pv
Password  : *****
Full Name  : PV
Uid        : 1001
Class      :
Groups    : pv wheel
Home      : /home/pv
Home Mode  :
Shell      : /usr/local/bin/zsh
Locked    : no
OK? (yes/no): yes
adduser: INFO: Successfully added (pv) to the user database.
Add another user? (yes/no): no
Goodbye!
</pre>
</pre>
<pre>
? Do you want to start Ghost? Yes
Running sudo command: systemctl is-active ghost_ghost-stura-dresden-de
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
Running sudo command: systemctl is-active ghost_ghost-stura-dresden-de
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
Running sudo command: systemctl start ghost_ghost-stura-dresden-de
✔ Starting Ghost
Running sudo command: systemctl is-enabled ghost_ghost-stura-dresden-de
Running sudo command: systemctl enable ghost_ghost-stura-dresden-de --quiet
✔ Starting Ghost
You can access your publication at http://ghost.stura-dresden.de
Next, go to to your admin interface at http://ghost.stura-dresden.de/ghost/ to complete the setup of your publication


; Erstellung Account ''rj''
Ghost uses direct mail by default
: <code>adduser</code>
To set up an alternative email method read our docs at https://docs.ghost.org/docs/mail-config
</pre>
 
----
 
http://ghost.stura-dresden.de/ghost/
 
Einrichtung per WUI
 
; : StuRa HTW Dresden
; : Studentinnen- und Studentenrat der Hochschule für Technik und Wirtschaft Dresden
; : [[mail-verteiler:ghost|ghost]]@stura.htw-dresden.de
; Passwort: (g…0ll)
 
; "Einladung" von anderen:
:* remyjane@
:* pv@
 
----
 
: <code>sudo apt install -y tmux</code>
: <code>tmux</code>
: <code>tmux a</code>
 
----
 
; Anpassung der Konfiguration für das Versenden von Mails
: <code>diff /var/www/ghost/config.production.created-by-install-gui /var/www/ghost/config.production.json</code>
<pre>
17c17,21
<    "transport": "Direct"
---
>    "transport": "SMTP",
>    "options": {
>        "host": "mail.stura.htw-dresden.de",
>        "port": 25
>    }
</pre>
: <code>cd /var/www/ghost && ghost restart && cd -</code>
 
----
 
: <code>ghost setup ssl</code>
<pre>
? Enter your email (used for Let's Encrypt notifications) cert@stura.htw-dresden.de
</pre>
<pre>
Running sudo command: mkdir -p /etc/letsencrypt
? Password [hidden]
</pre>
<pre>
Running sudo command: ./acme.sh --install --home /etc/letsencrypt
Running sudo command: /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --domain ghost.stura-dresden.de --webroot /var/www/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail cert@stura.htw-dresden.de
Running sudo command: openssl dhparam -out /etc/nginx/snippets/dhparam.pem 2048
Running sudo command: mv /tmp/ssl-params.conf /etc/nginx/snippets/ssl-params.conf
✔ Creating ssl config file at /var/www/ghost/system/files/ghost.stura-dresden.de-ssl.conf
Running sudo command: ln -sf /var/www/ghost/system/files/ghost.stura-dresden.de-ssl.conf /etc/nginx/sites-available/ghost.stura-dresden.de-ssl.conf
Running sudo command: ln -sf /etc/nginx/sites-available/ghost.stura-dresden.de-ssl.conf /etc/nginx/sites-enabled/ghost.stura-dresden.de-ssl.conf
Running sudo command: nginx -s reload
✔ Setting up SSL
</pre>
: <code>ghost restart</code>
<pre>
<pre>
Username: rj
Running sudo command: systemctl is-active ghost_ghost-stura-dresden-de
Full name: RJ
Running sudo command: systemctl restart ghost_ghost-stura-dresden-de
Uid (Leave empty for default):
✔ Restarting Ghost
Login group [rj]:
Login group is rj. Invite rj into other groups? []: wheel
Login class [default]:  
Shell (sh csh tcsh git-shell zsh rzsh nologin) [sh]: zsh
Home directory [/home/rj]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username  : rj
Password  : *****
Full Name  : RJ
Uid        : 1002
Class      :
Groups    : rj wheel
Home      : /home/rj
Home Mode  :
Shell      : /usr/local/bin/zsh
Locked    : no
OK? (yes/no): yes
adduser: INFO: Successfully added (rj) to the user database.
Add another user? (yes/no): no
Goodbye!
</pre>
</pre>


----
----
<!--
: <code></code>
<pre>
<pre>
</pre>
</pre>
-->
== Ubuntu siehe auch ==
https://computingforgeeks.com/how-to-install-ghost-blogging-platform-on-ubuntu-16-04-debian/
= [[FreeBSD]] =
: <code>pkg install -y node8 npm-node8</code>
: <code>pkg install -y mariadb103-server</code>
: <code>pkg install -y nginx</code>
: <code>pkg install -y bash python3 sudo</code>
= [[TurnKey]] =
=== [[TurnKey]] Anwendungen ===
; Datenbank: MariaDB
; Webserver: Nginx
=== [[TurnKey]] Konten ===
==== Konto ''ghost'' ====
Das Konto ''ghost''
* ist das Konto für den Betrieb der Anwendung Ghost
* ist standardmäßig durch [[TurnKey]] erstellt
.
==== Konto ''ghost_user'' ====
Das Konto ''ghost_user''
* ist das Konto für das Verwalten der Anwendung Ghost
* ist standardmäßig durch [[TurnKey]] erstellt
* bekommt bei der Initialisierung mit [[TurnKey]] ein Passwort gesetzt
* gehört der Gruppe ''sudo'' an, um dann selbst mit <code>sudo</code> administrative Berechtigung erlangen zu können und dafür das gesetzte Passwort abzufragen
.
== [[TurnKey]] auf [[Proxmox]] ==
[[Server/Proxmox#Containerisierung für TurnKey ab Version 16]]
= [[CentOS]] =
https://computingforgeeks.com/how-to-install-and-configure-ghost-on-centos-rhel/
[[Kategorie:Server]]
[[Kategorie:Software]]
[[Kategorie:Website]]

Aktuelle Version vom 19. September 2020, 16:27 Uhr

Server/Ghost[Bearbeiten]

Intsallation[Bearbeiten]


Ubuntu[Bearbeiten]

Zum Testen wurde für das Referat Öffentlichkeitsarbeit im Zusammenwirken mit dem Bereich Administration Rechentechnik eine Instanz Server/Ghost als LXC (Ubuntu 16.04) bei srs2709 (srs27090/srs27091/…) erstellt.


https://ghost.org/docs/install/ubuntu/


adduser stura
usermod -aG sudo stura
su - stura

sudo apt install -y ddate
sudo apt update && sudo apt upgrade -y
sudo apt install -y nginx
sudo ufw allow 'Nginx Full'
sudo apt install -y mysql-server

Passwort (g…oll) für root von MySQL gesetzt

sudo apt install -y curl
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash
sudo apt install -y nodejs
sudo npm i -g ghost-cli
sudo mkdir -p /var/www/ghost
sudo chown `whoami`:`whoami` /var/www/ghost
sudo chmod 775 /var/www/ghost
cd /var/www/ghost && ghost install && cd -
✔ Checking system Node.js version
✔ Checking logged in user
✔ Checking current folder permissions
✔ Checking operating system compatibility
✔ Checking for a MySQL installation
✔ Checking memory availability
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v1.25.3
✔ Finishing install process
? Enter your blog URL: http://ghost.stura-dresden.de
? Enter your MySQL hostname: localhost
? Enter your MySQL username: root
? Enter your MySQL password: [hidden]
? Enter your Ghost database name: ghost_prod
✔ Configuring Ghost
✔ Setting up instance
Running sudo command: useradd --system --user-group ghost
Running sudo command: chown -R ghost:ghost /var/www/ghost/content
✔ Setting up "ghost" system user
? Do you wish to set up "ghost" mysql user? Yes
✔ Setting up "ghost" mysql user
? Do you wish to set up Nginx? Yes
✔ Creating nginx config file at /var/www/ghost/system/files/ghost.stura-dresden.de.conf
Running sudo command: ln -sf /var/www/ghost/system/files/ghost.stura-dresden.de.conf /etc/nginx/sites-available/ghost.stura-dresden.de.conf
Running sudo command: ln -sf /etc/nginx/sites-available/ghost.stura-dresden.de.conf /etc/nginx/sites-enabled/ghost.stura-dresden.de.conf
Running sudo command: nginx -s reload
✔ Setting up Nginx
? Do you wish to set up SSL? Yes
Uh-oh! It looks like your domain isn't set up correctly yet. Because of this, SSL setup won't work correctly.Once you've set up your domain and pointed it at this server's IP, try running `ghost setup ssl` again.
✔ Setting up SSL
? Do you wish to set up Systemd? Yes
✔ Creating systemd service file at /var/www/ghost/system/files/ghost_ghost-stura-dresden-de.service
Running sudo command: ln -sf /var/www/ghost/system/files/ghost_ghost-stura-dresden-de.service /lib/systemd/system/ghost_ghost-stura-dresden-de.service
Running sudo command: systemctl daemon-reload
✔ Setting up Systemd
Running sudo command: /var/www/ghost/current/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/ghost/current
✔ Running database migrations
? Do you want to start Ghost? Yes
Running sudo command: systemctl is-active ghost_ghost-stura-dresden-de
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
Running sudo command: systemctl is-active ghost_ghost-stura-dresden-de
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
Running sudo command: systemctl start ghost_ghost-stura-dresden-de
✔ Starting Ghost
Running sudo command: systemctl is-enabled ghost_ghost-stura-dresden-de
Running sudo command: systemctl enable ghost_ghost-stura-dresden-de --quiet
✔ Starting Ghost
You can access your publication at http://ghost.stura-dresden.de
Next, go to to your admin interface at http://ghost.stura-dresden.de/ghost/ to complete the setup of your publication

Ghost uses direct mail by default
To set up an alternative email method read our docs at https://docs.ghost.org/docs/mail-config

http://ghost.stura-dresden.de/ghost/

Einrichtung per WUI

StuRa HTW Dresden
Studentinnen- und Studentenrat der Hochschule für Technik und Wirtschaft Dresden
ghost@stura.htw-dresden.de
Passwort
(g…0ll)
"Einladung" von anderen
  • remyjane@
  • pv@

sudo apt install -y tmux
tmux
tmux a

Anpassung der Konfiguration für das Versenden von Mails
diff /var/www/ghost/config.production.created-by-install-gui /var/www/ghost/config.production.json
17c17,21
<     "transport": "Direct"
---
>     "transport": "SMTP",
>     "options": {
>         "host": "mail.stura.htw-dresden.de",
>         "port": 25
>     }
cd /var/www/ghost && ghost restart && cd -

ghost setup ssl
? Enter your email (used for Let's Encrypt notifications) cert@stura.htw-dresden.de
Running sudo command: mkdir -p /etc/letsencrypt
? Password [hidden]
Running sudo command: ./acme.sh --install --home /etc/letsencrypt
Running sudo command: /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --domain ghost.stura-dresden.de --webroot /var/www/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail cert@stura.htw-dresden.de
Running sudo command: openssl dhparam -out /etc/nginx/snippets/dhparam.pem 2048
Running sudo command: mv /tmp/ssl-params.conf /etc/nginx/snippets/ssl-params.conf
✔ Creating ssl config file at /var/www/ghost/system/files/ghost.stura-dresden.de-ssl.conf
Running sudo command: ln -sf /var/www/ghost/system/files/ghost.stura-dresden.de-ssl.conf /etc/nginx/sites-available/ghost.stura-dresden.de-ssl.conf
Running sudo command: ln -sf /etc/nginx/sites-available/ghost.stura-dresden.de-ssl.conf /etc/nginx/sites-enabled/ghost.stura-dresden.de-ssl.conf
Running sudo command: nginx -s reload
✔ Setting up SSL
ghost restart
Running sudo command: systemctl is-active ghost_ghost-stura-dresden-de
Running sudo command: systemctl restart ghost_ghost-stura-dresden-de
✔ Restarting Ghost


Ubuntu siehe auch[Bearbeiten]

https://computingforgeeks.com/how-to-install-ghost-blogging-platform-on-ubuntu-16-04-debian/

FreeBSD[Bearbeiten]

pkg install -y node8 npm-node8
pkg install -y mariadb103-server
pkg install -y nginx
pkg install -y bash python3 sudo

TurnKey[Bearbeiten]

TurnKey Anwendungen[Bearbeiten]

Datenbank
MariaDB
Webserver
Nginx

TurnKey Konten[Bearbeiten]

Konto ghost[Bearbeiten]

Das Konto ghost

  • ist das Konto für den Betrieb der Anwendung Ghost
  • ist standardmäßig durch TurnKey erstellt

.

Konto ghost_user[Bearbeiten]

Das Konto ghost_user

  • ist das Konto für das Verwalten der Anwendung Ghost
  • ist standardmäßig durch TurnKey erstellt
  • bekommt bei der Initialisierung mit TurnKey ein Passwort gesetzt
  • gehört der Gruppe sudo an, um dann selbst mit sudo administrative Berechtigung erlangen zu können und dafür das gesetzte Passwort abzufragen

.

TurnKey auf Proxmox[Bearbeiten]

Server/Proxmox#Containerisierung für TurnKey ab Version 16

CentOS[Bearbeiten]

https://computingforgeeks.com/how-to-install-and-configure-ghost-on-centos-rhel/