Ich bin gerade dabei, das Backend für den HWAudit und SWAudit auf MySQL umzustellen und halte mich dabei an die Doku.
Ich habe also den MySQL Server konfiguriert und
Code: Alles auswählen
opsi-setup --configure-mysqlAnschließend habe ich die Datei '/etc/opsi/backendManager/dispatch.conf' bearbeitet, nun sieht sie so aus:
Code: Alles auswählen
# -*- coding: utf-8 -*-
# = = = = = = = = = = = = = = = = = = = = = = =
# =      backend dispatch configuration       =
# = = = = = = = = = = = = = = = = = = = = = = =
#
# This file configures which methods are dispatched to which backends.
# Entries has to follow the form:
# <regular expression to match method name(s)> : <comma separated list of backend name(s)>
#
# Backend names have to match a backend configuraton file basename <backend name>.conf beneath /etc/opsi/backends.
# For every method executed on backend dispatcher the first matching regular expression will be decisive.
#
# Typical configurations:
#    file, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       .*                 : file
#
#    jsonrpc, opsipxeconfd and dhcpd backend:
#       backend_.*         : jsonrpc, opsipxeconfd, dhcpd
#       .*                 : jsonrpc
#
#    file as main backend, mysql as hw/sw invent and license management backend, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, mysql, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       license.*          : mysql
#       softwareLicense.*  : mysql
#       audit.*            : mysql
#       .*                 : file
#
backend_.*         : file, mysql, opsipxeconfd
host_.*            : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.*     : file, opsipxeconfd
license.*          : mysql
softwareLicense:*  : mysql
audit.*            : mysql
.*                 : file
Code: Alles auswählen
######@######:/etc/opsi/backendManager# opsi-setup --init-current-config
[2] [Jun 19 12:04:29] Traceback: (Logger.py|753)
[2] [Jun 19 12:04:29]   File "/usr/bin/opsi-setup", line 2182, in <module>
    main()
 (Logger.py|753)
[2] [Jun 19 12:04:29]   File "/usr/bin/opsi-setup", line 2130, in main
    initializeBackends()
 (Logger.py|753)
[2] [Jun 19 12:04:29]   File "/usr/bin/opsi-setup", line 1792, in initializeBackends
    depotbackend=False
 (Logger.py|753)
[2] [Jun 19 12:04:29]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 265, in __init__
    self._backend = BackendDispatcher(context=self, **kwargs)
 (Logger.py|753)
[2] [Jun 19 12:04:29]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 377, in __init__
    self.__loadBackends()
 (Logger.py|753)
[2] [Jun 19 12:04:29]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 431, in __loadBackends
    raise BackendConfigurationError(u"Backend config file '%s' not found" % backendConfigFile)
 (Logger.py|753)
[2] [Jun 19 12:04:29]      ==>>> Backend configuration error: Backend config file '/etc/opsi/backends/*  : mysql.conf' not found (opsi-setup|2186)
ERROR: Backend configuration error: Backend config file '/etc/opsi/backends/*  : mysql.conf' not foundCode: Alles auswählen
######@######:/etc/opsi/backends# ll
insgesamt 40
drwxrwx--- 2 opsiconfd opsiadmin 4096 Jun 19 11:16 ./
drwxrwx--- 6 opsiconfd opsiadmin 4096 Mär 28 11:23 ../
-rw-rw---- 1 opsiconfd opsiadmin  412 Jan 17  2017 dhcpd.conf
-rw-rw---- 1 opsiconfd opsiadmin  139 Jan 13  2017 file.conf
-rw-rw---- 1 opsiconfd opsiadmin  232 Apr 25  2017 hostcontrol.conf
-rw-rw---- 1 opsiconfd opsiadmin  142 Jan 13  2017 jsonrpc.conf
-rw-rw---- 1 opsiconfd opsiadmin  416 Jan 13  2017 multiplex.conf
-rw-rw---- 1 opsiconfd opsiadmin  261 Jun 19 11:03 mysql.conf
-rw-rw---- 1 opsiconfd opsiadmin  120 Jan 13  2017 opsipxeconfd.conf
-rw-rw---- 1 opsiconfd opsiadmin  103 Jan 13  2017 sqlite.confCode: Alles auswählen
######@######:/etc/opsi/backends# nano mysql.conf
# -*- coding: utf-8 -*-
module = 'MySQL'
config = {
"username" : "opsi",
"connectionPoolMaxOverflow" : 10,
"database" : "opsi",
"connectionPoolTimeout" : 30,
"address" : "localhost",
"password" : "######", #zensiert
"databaseCharset" : "utf8",
"connectionPoolSize" : 20
}
Code: Alles auswählen
opsi-setup --init-current-configHat jemand einen Tipp für mich?
Viele Grüße
RaphaelB