UB: Pro
[stratum0-wiki.git] / Gapadriel.mw
1 {{Hardware
2 |kontakt=[[Benutzer:Kasalehlia|Kasalehlia]], [[Benutzer:Daniel Bohrer|Daniel Bohrer]]
3 |status=working
4 |ort=[[endor]]
5 |beschreibung=VM für [[Etherpad]]
6 |links=https://pad.stratum0.org
7 }}
8
9 == SSH-Keys ==
10 -----BEGIN PGP SIGNED MESSAGE-----
11 Hash: SHA512
12
13 $ for i in /etc/ssh/ssh_host_*.pub; do ssh-keygen -lf $i; done
14 1024 59:75:2b:98:88:d7:a0:ed:62:54:c4:78:07:2b:0c:3f /etc/ssh/ssh_host_dsa_key.pub (DSA)
15 256 25:95:d4:0b:eb:67:fc:7e:b1:4a:eb:59:dc:f1:0a:b0 /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
16 256 80:60:fb:21:d3:e1:2d:12:53:83:e8:bc:cb:9a:2b:17 /etc/ssh/ssh_host_ed25519_key.pub (ED25519)
17 2048 4d:e6:78:d4:9c:21:c4:da:ae:7f:b0:ba:60:b6:96:51 /etc/ssh/ssh_host_rsa_key.pub (RSA)
18
19 -----BEGIN PGP SIGNATURE-----
20 Version: GnuPG v1
21
22 iQEcBAEBCgAGBQJVXhO2AAoJEMOZylE6vjlS+Q0H/3uXhm9edAb14iLA4KVm54Cn
23 7raApgCyAxX7OdDffRr41N9tT2BJobmYLFx9tla7EekE2lijCSF4YGDDXdamH2nT
24 TxCSIl9711W8BZA+zVg/u7UKcL20HenqzQRW2VSz+u7580uIQ8oJ8SWTtfWbcNdj
25 YswKrESRxd6NrIbEHTpzhYe2yQ/DTlRwLituN1F5VwMon5xjQHRHllBH55re5oTo
26 NgXxJ1LcpbkqlvJ7fy1qnx22gtAqt8Z7p8ZaL7G9Bh/gW6v6WV0RqG7+1uQIbASR
27 /MSoOVKGnxrFUgfOCRxv5dI/f14KcY6Z78eZ/AY945zRLa+fqAW7BtL6bBsgQy0=
28 =nmaB
29 -----END PGP SIGNATURE-----
30
31 == Doku ==
32 * Debian jessie, systemd
33 * 1 GB RAM mit Option bis 2 GB
34 * 8 GB Platte
35 * 4 CPU-Kerne
36 * Netzwerk intern, per DHCP
37 * HTTP kommt über [[gandolf]] als (SSL-)Proxy
38
39 === Node.js / npm ===
40
41 Debian hat kein npm mehr. Etherpad braucht npm. (Keine schöne, aber eine) Lösung: [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions]
42
43 sudo apt install apt-transport-https
44 NODEREPO="node_10.x"
45 DISTRO=$(lsb_release -c -s)
46 echo "deb https://deb.nodesource.com/${NODEREPO} ${DISTRO} main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
47 wget https://deb.nodesource.com/gpgkey/nodesource.gpg.key
48 sudo apt-key add nodesource.gpg.key
49 sudo apt update
50 sudo apt install nodejs # bringt npm mit
51
52 === Etherpad ===
53 Etherpad-Lite liegt als Git-Repo in <tt>/var/lib/etherpad/etherpad-lite</tt>, wird aus <tt>[https://stratum0.org/wiki/Gapadriel/etherpad-service?action=raw /etc/systemd/system/etherpad.service]</tt> als User <tt>etherpad</tt> gestartet und loggt nach <tt>/var/log/syslog</tt>.
54
55 Einige Änderungen sind als Commits im Branch <tt>deploy</tt> eingepflegt. Diese beim Update bitte rebasen.
56
57 MySQL als Datenbank, siehe <tt>/var/lib/etherpad/etherpad-lite/settings.json</tt>.
58
59 Etherpad-Updates etc. bitte per <tt>sudo</tt>, nicht <tt>sudo -u etherpad</tt>. Aus Sicherheitsgründen soll der etherpad-Benutzer möglichst wenig irgendwohin schreiben können.
60
61 ==== Update ====
62 cd /var/lib/etherpad/etherpad-lite
63 sudo git fetch
64 sudo systemctl stop etherpad.service
65 sudo git rebase -i $version
66 sudo bin/installDeps.sh # und dann warten.
67 # falls wd failt: (siehe https://github.com/admc/wd/issues/483#issuecomment-410725658 )
68 # sudo npm install --unsafe-perm wd
69 # sudo bin/installDeps.sh # und dann warten.
70
71 sudo chmod go-w .
72 sudo chown root:etherpad .
73 sudo chmod g+rw -R var/ # CSS minified cache muss schreibbar sein
74 sudo chown etherpad:etherpad -R var/
75 sudo chmod g+r -R settings.json # config muss lesbar sein
76 sudo chown root:etherpad settings.json
77
78 # damit etherpad Plugins initialisieren und ep_$module/.ep_initialized anlegen kann -.-
79 sudo chmod g+w node_modules/ep_*
80
81 sudo systemctl start etherpad.service
82 sudo chmod g-w node_modules/ep_*
83
84 ==== Plugins installieren ====
85 Admin-Login auf der Weboberfläche funktioniert zwar lesend, aber kann halt keine Packages installieren, weil der etherpad-User in <tt>node_modules/</tt> nicht schreiben soll. Stattdessen:
86
87 cd /var/lib/etherpad/etherpad-lite
88 sudo npm install ep_$plugin
89 # damit etherpad beim restart eine node_modules/ep_$plugin/.ep-initialized anlegen kann: -.-
90 sudo chown etherpad node_modules/ep_$plugin
91 sudo systemctl restart etherpad.service
92 sudo chown -R root:root node_modules/ep_$plugin
93
94 ==== Sonstiges ====
95 * <tt>/var/lib/etherpad/etherpad-lite/var/</tt> muss für die Gruppe <tt>etherpad</tt> schreibbar sein, dort werden beim Start des Dienstes die minifizierten CSS/JS-Files abgelegt.
96
97 ==== Installierte Plugins ====
98 for module in \
99 ep_ether-o-meter \
100 ep_headings2 \
101 ep_infopanel \
102 ep_latexexport \
103 ep_markdown \
104 ep_pad_activity_nofication_in_title \
105 ep_scrollto \
106 ep_subscript \
107 ep_superscript \
108 ep_table_of_contents \
109 ep_mediawiki \
110 https://gitli.stratum0.org/rohieb/ep_hide_referrer/-/archive/feature/auto-redirect/ep_hide_referrer-feature-auto-redirect.tar.gz \
111 https://gitli.stratum0.org/stratum0/ep_stratum_faqlink/-/archive/master/ep_stratum_faqlink-master.tar.gz \
112 https://gitli.stratum0.org/kasalehlia/ep_stratum0_blogpreview/-/archive/master/ep_stratum0_blogpreview-master.tar.gz \
113 ; do
114 sudo npm i $module
115 done
116 # Abhängigkeit von ep_headings, kann aber danach wieder gelöscht werden, ep_headings2 ist ausreichend:
117 sudo rm -rf node_modules/ep_headings
118
119 == Log ==
120 * Update auf etherpad-lite 1.6.5, deploy-Branch angelegt und [https://github.com/ether/etherpad-lite/pull/3280 font-size-Änderungen] revertet --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 23:16, 11. Apr. 2018 (CEST)
121 * Update etherpad 1.6.1, ep_hide_referrer 0.0.13 + autoredirect --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 03:38, 21. Mär. 2017 (CET)
122 * Update <tt>ep_hide_referrer</tt>, fix URL detection: [https://github.com/JohnMcLear/ep_hide_referrer/pull/16/files]
123 * Update auf Etherpad-Lite v1.5.7 --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 00:35, 29. Jan. 2016 (CET)
124 * Unicode-Issues behoben, die den Server abstürzen ließen: [https://github.com/ether/etherpad-lite/issues/2516#issuecomment-79659984], [https://github.com/ether/etherpad-lite/pull/2862/files] --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 00:34, 29. Jan. 2016 (CET)
125 * Update auf Debian 8.3 --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 22:27, 25. Jan. 2016 (CET)
126 * <tt>Restart=always</tt> in /etc/systemd/system/etherpad.service gesetzt, das stirbt gern mal mit errors. --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 04:24, 9. Sep. 2015 (CEST)
127 * Datenbankmigration vom alten Pad-Server erfolgreich. --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 03:58, 2. Aug. 2015 (CEST)
128 * unattended-upgrades eingerichtet, erstmal nur aus debian-security. siehe <tt>/etc/apt/apt.conf.d/02.periodic</tt> und <tt>/etc/cron.daily/apt</tt> für Doku --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 01:32, 23. Mai 2015 (CEST)
129 * Hardware: -CDROM, -Tablet, -3 USB Redirectors, -Sound, RAM auf 1024-2048 MB festgelegt. --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 00:09, 22. Mai 2015 (CEST)
130 * initial install: --[[Benutzer:Daniel Bohrer|Daniel Bohrer]] 23:48, 21. Mai 2015 (CEST)
131 ** apt-get install npm curl nodejs-legacy (letzters für Symlink /usr/bin/node -> nodejs)
132 ** überflüssige Pakete entfernt: eject, m4, nfs-common, rpcbind, laptop-detect, procmail, mutt, tasksel, [wi]{american,british}, ungenutze Libs und ungenutzte automatisch installierte Pakete
133 *** pinentry-gtk2 -> pinentry-curses, vim-tiny -> vim-runtime
134 ** git clone etherpad, checkout releases/1.5.6
135 ** einmal sudo bin/run.sh, um Abhängigkeiten zu installieren
136 ** chgrp etherpad, chmod g+rwxs /var/lib/etherpad/etherpad-lite/var/
137 ** Plugins per npm installiert
138 ** systemd-Unit-File für etherpad geschrieben und unter /etc/systemd/system abgelegt
139 * System aufgesetzt von [[Benutzer:shoragan|shoragan]], 21. Mai 2015 (CEST)
140
141 [[Kategorie:Virtuelle Maschine]]
142 [[Kategorie:Infrastruktur]]
This page took 0.059587 seconds and 5 git commands to generate.