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