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