Wiki-Quellcode von MySQL-Datenbank LogoDB neu aufbauen
Version 6.1 von Jonas Mayer am 2022/05/19 19:19
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:#000000" %)Wechseln Sie in den logosrv Container und stoppen sie dort den ldserver Dienst und den darin enthaltenen ldcatalogd Dienst: | ||
5 | |||
6 | (% class="box" %) | ||
7 | ((( | ||
8 | (% style="color:#000000" %)##/etc/init.d/ldcatalogd stop | ||
9 | ldserver stop## | ||
10 | ))) | ||
11 | |||
12 | |||
13 | (% style="color:#000000" %)Im Anschluß daran führen Sie die beiden folgenden Befehle aus | ||
14 | |||
15 | (% class="box" %) | ||
16 | ((( | ||
17 | (% style="color:#000000" %)##ldwebfilter ~-~-expire-surflog 0## | ||
18 | ))) | ||
19 | |||
20 | (% class="box" %) | ||
21 | ((( | ||
22 | (% style="color:#000000" %)ldwebfilter ~-~-update-surflog | ||
23 | ))) | ||
24 | |||
25 | |||
26 | (% style="color:#000000" %)Nun lesen Sie mit folgendem Befehl das logodb secret aus, dies wird später benötigt | ||
27 | |||
28 | (% class="box" %) | ||
29 | ((( | ||
30 | (% style="color:#000000" %)cat /etc/logodb.secret | ||
31 | ))) | ||
32 | |||
33 | |||
34 | (% style="color:#000000" %)Anschließend droppen Sie die logodb Datenbank | ||
35 | |||
36 | (% class="box" %) | ||
37 | ((( | ||
38 | (% style="color:#000000" %)##mmysql drop database logodb;## | ||
39 | ))) | ||
40 | |||
41 | |||
42 | (% 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 | ||
43 | |||
44 | (% class="box" %) | ||
45 | ((( | ||
46 | (% style="color:#000000" %)##dpkg-reconfigure ld-mysql-logodb## | ||
47 | ))) | ||
48 | |||
49 | (% class="box" %) | ||
50 | ((( | ||
51 | (% style="color:#000000" %)##reset_logodb_password {##(% style="color:#e74c3c" %)##logodb.secret##(% style="color:#000000" %)##}## | ||
52 | ))) | ||
53 | |||
54 | |||
55 | (% style="color:#000000" %)Importieren Sie nun die Workstations | ||
56 | |||
57 | (% class="box" %) | ||
58 | ((( | ||
59 | (% style="color:#000000" %)##import_workstations## | ||
60 | ))) | ||
61 | |||
62 | |||
63 | (% style="color:#000000" %)Danach starten Sie den ldserver neu | ||
64 | |||
65 | (% class="box" %) | ||
66 | ((( | ||
67 | (% style="color:#000000" %)##ldserver start## | ||
68 | ))) | ||
69 | |||
70 | |||
71 | (% style="color:#000000" %)Zum Schluß starten Sie die ldacatalog Datenbank wieder. | ||
72 | |||
73 | (% class="box" %) | ||
74 | ((( | ||
75 | (% style="color:#000000" %)##/etc/init.d/ldcatalogd start## | ||
76 | ))) | ||
77 | |||
78 | |||
79 | (% style="color:#27ae60" %)Optional:(%%) | ||
80 | (% style="color:#000000" %)~-~-~-~-~-~-~-~-- | ||
81 | Als optionalen Schritt können Sie vor dem Neuaufbau der LogoDB die Webfilter Listen und Kategorien sichern. | ||
82 | |||
83 | (% 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. | ||
84 | |||
85 | (% class="box" %) | ||
86 | ((( | ||
87 | (% style="color:#000000" %)##ldwebfilter -l ##(%%) | ||
88 | (% style="color:#000000" %)##ldwebfilter -c## | ||
89 | ))) | ||
90 | |||
91 | (% style="color:#000000" %)Sichern sie Sich nun diese Daten. | ||
92 | |||
93 | |||
94 | (% style="color:#000000" %)Um die Daten wieder einzulesen gehen sie folgendermaßen vor: | ||
95 | |||
96 | |||
97 | (% style="color:#000000" %)Einlesen der Blacklist | ||
98 | |||
99 | (% class="box" %) | ||
100 | ((( | ||
101 | (% style="color:#000000" %)##while read line; do ldwebfilter -b "$line"; done < /root/webfilter_blacklist.list## | ||
102 | ))) | ||
103 | |||
104 | |||
105 | (% style="color:#000000" %)Einlesen der Whitelist | ||
106 | |||
107 | (% class="box" %) | ||
108 | ((( | ||
109 | (% style="color:#000000" %)##while read line; do ldwebfilter -w "$line"; done < /root/webfilter_whitelist.list## | ||
110 | ))) | ||
111 | |||
112 | |||
113 | (% style="color:#000000" %)Einlesen der Blacklistkategorien | ||
114 | |||
115 | (% class="box" %) | ||
116 | ((( | ||
117 | (% style="color:#000000" %)##while read line; do ldwebfilter -e "$line"; done < /root/webfilter_categories_B.list## | ||
118 | ))) | ||
119 | |||
120 | |||
121 | (% style="color:#000000" %)Einlesen der Whitelistkategorien | ||
122 | |||
123 | (% class="box" %) | ||
124 | ((( | ||
125 | (% style="color:#000000" %)##while read line; do ldwebfilter -E "$line"; done < /root/webfilter_categories_W.list## | ||
126 | ))) | ||
127 | |||
128 |