Wiki-Quellcode von MySQL-Datenbank LogoDB neu aufbauen
Zuletzt geändert von Alexander Kruck am 2022/05/23 11:12
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | (% style="color:#000000" %)Falls Sie die MySQL Datenbank LogoDB neu aufbauen wollen, gehen Sie bitte wie folgt vor: | ||
2 | |||
3 | |||
4 | (% style="color:#27ae60" %)Optional:(%%) | ||
5 | (% style="color:#000000" %)~-~-~-~-~-~-~-~-- | ||
6 | Als optionalen Schritt können Sie vor dem Neuaufbau der LogoDB die Webfilter Listen und Kategorien sichern. | ||
7 | |||
8 | |||
9 | (% style="color:#000000" %)Hierbei handelt es sich um die Listen die Sie im im itb einsehen können. | ||
10 | |||
11 | (% style="color:#000000" %)Hier als Beispiel einmal die Blacklist: | ||
12 | |||
13 | (% style="color:#000000" %)[[image:itb_blacklist.png]] | ||
14 | |||
15 | (% style="color:#000000" %)Mit diesen Befehlen im Container (% style="color:#3498db" %)logosrv (% style="color:#000000" %)können Sie sich die aktuellen Regeln und Kategorien des Webfilters anzeigen lassen. | ||
16 | |||
17 | (% class="box" %) | ||
18 | ((( | ||
19 | (% style="color:#000000" %)##ldwebfilter -l ##(%%) | ||
20 | (% style="color:#000000" %)##ldwebfilter -c## | ||
21 | ))) | ||
22 | |||
23 | (% style="color:#000000" %)Sichern sie Sich nun diese Daten. | ||
24 | |||
25 | |||
26 | (% style="color:#000000" %)Um die Daten wieder einzulesen gehen sie folgendermaßen vor: | ||
27 | |||
28 | |||
29 | (% style="color:#000000" %)Einlesen der Blacklist | ||
30 | |||
31 | (% class="box" %) | ||
32 | ((( | ||
33 | (% style="color:#000000" %)##while read line; do ldwebfilter -b "$line"; done < /root/webfilter_blacklist.list## | ||
34 | ))) | ||
35 | |||
36 | |||
37 | (% style="color:#000000" %)Einlesen der Whitelist | ||
38 | |||
39 | (% class="box" %) | ||
40 | ((( | ||
41 | (% style="color:#000000" %)##while read line; do ldwebfilter -w "$line"; done < /root/webfilter_whitelist.list## | ||
42 | ))) | ||
43 | |||
44 | |||
45 | (% style="color:#000000" %)Einlesen der Blacklistkategorien | ||
46 | |||
47 | (% class="box" %) | ||
48 | ((( | ||
49 | (% style="color:#000000" %)##while read line; do ldwebfilter -e "$line"; done < /root/webfilter_categories_B.list## | ||
50 | ))) | ||
51 | |||
52 | |||
53 | (% style="color:#000000" %)Einlesen der Whitelistkategorien | ||
54 | |||
55 | (% class="box" %) | ||
56 | ((( | ||
57 | (% style="color:#000000" %)##while read line; do ldwebfilter -E "$line"; done < /root/webfilter_categories_W.list## | ||
58 | ))) | ||
59 | |||
60 | (% style="color:#000000" %)Wechseln Sie in den logosrv Container und stoppen sie dort den ldserver Dienst und den darin enthaltenen ldcatalogd Dienst: | ||
61 | |||
62 | (% class="box" %) | ||
63 | ((( | ||
64 | (% style="color:#000000" %)##/etc/init.d/ldcatalogd stop | ||
65 | ldserver stop## | ||
66 | ))) | ||
67 | |||
68 | |||
69 | (% style="color:#000000" %)Im Anschluss daran führen Sie die beiden folgenden Befehle aus | ||
70 | |||
71 | (% class="box" %) | ||
72 | ((( | ||
73 | (% style="color:#000000" %)##ldwebfilter ~-~-expire-surflog 0## | ||
74 | ))) | ||
75 | |||
76 | (% class="box" %) | ||
77 | ((( | ||
78 | (% style="color:#000000" %)ldwebfilter ~-~-update-surflog | ||
79 | ))) | ||
80 | |||
81 | |||
82 | (% style="color:#000000" %)Nun lesen Sie mit folgendem Befehl das logodb secret aus, dies wird später benötigt | ||
83 | |||
84 | (% class="box" %) | ||
85 | ((( | ||
86 | (% style="color:#000000" %)cat /etc/logodb.secret | ||
87 | ))) | ||
88 | |||
89 | |||
90 | (% style="color:#000000" %)Anschließend droppen Sie die logodb Datenbank | ||
91 | |||
92 | (% class="box" %) | ||
93 | ((( | ||
94 | (% style="color:#000000" %)##mmysql drop database logodb;## | ||
95 | ))) | ||
96 | |||
97 | |||
98 | (% style="color:#000000" %)Fühen Sie nun folgende Befehle aus.(%%) (% style="color:#e74c3c" %)logodb.secret(% style="color:#000000" %) ersetzen Sie mit dem Secret von weiter oben | ||
99 | |||
100 | (% class="box" %) | ||
101 | ((( | ||
102 | (% style="color:#000000" %)##dpkg-reconfigure ld-mysql-logodb## | ||
103 | ))) | ||
104 | |||
105 | (% class="box" %) | ||
106 | ((( | ||
107 | (% style="color:#000000" %)##reset_logodb_password {##(% style="color:#e74c3c" %)##logodb.secret##(% style="color:#000000" %)##}## | ||
108 | ))) | ||
109 | |||
110 | |||
111 | (% style="color:#000000" %)Importieren Sie nun die Workstations | ||
112 | |||
113 | (% class="box" %) | ||
114 | ((( | ||
115 | (% style="color:#000000" %)##import_workstations## | ||
116 | ))) | ||
117 | |||
118 | |||
119 | (% style="color:#000000" %)Danach starten Sie den ldserver neu | ||
120 | |||
121 | (% class="box" %) | ||
122 | ((( | ||
123 | (% style="color:#000000" %)##ldserver start## | ||
124 | ))) | ||
125 | |||
126 | |||
127 | (% style="color:#000000" %)Zum Schluß starten Sie die ldacatalog Datenbank wieder. | ||
128 | |||
129 | (% class="box" %) | ||
130 | ((( | ||
131 | (% style="color:#000000" %)##/etc/init.d/ldcatalogd start## | ||
132 | ))) |