我试图安装Prewikka
一个基于仿生 Web 界面的安全信息和事件管理系统包。
我按照终端上的说明进行操作,当我开始设置Prewikka
软件包时,会出现确认信息:
我从不提供为Prewikka
数据库配置密码,我尝试在站点文档上查找,但我找不到任何问题。
我怎么知道我的Prewikka
密码dbconfig-common
?因为我在之前的说明中选择了dbconfig-common
数据库作为默认值,见下文!
编辑#1
Prewikka 的开发者说,至于 Prelude,我们选择使用 dbconfig-common,给管理员密码,输入 DB 密码。在此文档上用于与 Prelude Manager 集成,因此我dbconfig-common
在前面的说明中选择。当我阅读 Prelude Developer 的所有文档时,我忘记为我的 Prewikka! 创建一个数据库!哦,那是我的假。而这一刻,我得到了一些我不明白的错误!但是我在确认密码时仍然有点困惑,我必须在 Prewikka 的 MySQL 数据库或 Prelude 的 DBConfig-Common 之间输入密码?
编辑#2
此刻,我得到了一些我不理解并且对我来说真的很复杂的错误!当我打开 Prewikka 的默认端口时,出现错误:
在我的终端上出现:
$ sudo prewikka-httpd
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 59, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 489, in __init__
dh.apply()
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 74, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 424, in apply
self._apply()
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 91, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 415, in _apply
[ update.apply() for update in self.list() ]
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 415, in <listcomp>
[ update.apply() for update in self.list() ]
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 87, in inner
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 221, in apply
self.run()
File "/usr/lib/python3/dist-packages/prewikka/sql/install.py", line 72, in run
""")
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 211, in query
self.db.query(q)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 547, in query
return preludedb.SQL.query(self, sql)
RuntimeError: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 277, in process
response = self._process_static(webreq) or self._process_dynamic(webreq)
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 244, in _process_dynamic
self._prewikka_init_if_needed()
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 134, in _prewikka_init_if_needed
raise self._prewikka_initialized
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 122, in _prewikka_init_if_needed
env.db = database.Database(env.config.database)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 873, in __new__
return MySQLDatabase(config)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 61, in inner
raise DatabaseError(message=text_type(e))
prewikka.database.DatabaseError: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/bin/prewikka-httpd", line 62, in application
return wsgi.application(environ, start_response)
File "/usr/lib/python3/dist-packages/prewikka/web/wsgi.py", line 161, in application
core.process(WSGIRequest(environ, start_response))
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 280, in process
response = err.respond()
File "/usr/lib/python3/dist-packages/prewikka/error.py", line 106, in respond
return self._html_respond()
File "/usr/lib/python3/dist-packages/prewikka/error.py", line 90, in _html_respond
from prewikka import baseview
File "/usr/lib/python3/dist-packages/prewikka/baseview.py", line 27, in <module>
from prewikka import error, history, hookmanager, resource, response, template, utils, view
File "/usr/lib/python3/dist-packages/prewikka/history.py", line 102, in <module>
crontab.schedule("search_history", N_("Search history deletion"), "0 * * * *", _regfunc=history._history_cron, enabled=True)
File "/usr/lib/python3/dist-packages/prewikka/crontab.py", line 240, in schedule
self._init_system_job(ext_type, name, schedule, enabled, _regfunc)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 91, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/crontab.py", line 152, in _init_system_job
res = env.db.query("SELECT 1 FROM Prewikka_Crontab WHERE ext_type=%s AND userid IS NULL", ext_type)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 547, in query
return preludedb.SQL.query(self, sql)
RuntimeError: Table 'prewikka.Prewikka_Crontab' doesn't exist
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 59, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 489, in __init__
dh.apply()
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 74, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 424, in apply
self._apply()
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 91, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 415, in _apply
[ update.apply() for update in self.list() ]
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 415, in <listcomp>
[ update.apply() for update in self.list() ]
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 87, in inner
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 221, in apply
self.run()
File "/usr/lib/python3/dist-packages/prewikka/sql/install.py", line 72, in run
""")
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 211, in query
self.db.query(q)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 547, in query
return preludedb.SQL.query(self, sql)
RuntimeError: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 277, in process
response = self._process_static(webreq) or self._process_dynamic(webreq)
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 244, in _process_dynamic
self._prewikka_init_if_needed()
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 134, in _prewikka_init_if_needed
raise self._prewikka_initialized
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 122, in _prewikka_init_if_needed
env.db = database.Database(env.config.database)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 873, in __new__
return MySQLDatabase(config)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 61, in inner
raise DatabaseError(message=text_type(e))
prewikka.database.DatabaseError: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/bin/prewikka-httpd", line 62, in application
return wsgi.application(environ, start_response)
File "/usr/lib/python3/dist-packages/prewikka/web/wsgi.py", line 161, in application
core.process(WSGIRequest(environ, start_response))
File "/usr/lib/python3/dist-packages/prewikka/main.py", line 280, in process
response = err.respond()
File "/usr/lib/python3/dist-packages/prewikka/error.py", line 106, in respond
return self._html_respond()
File "/usr/lib/python3/dist-packages/prewikka/error.py", line 90, in _html_respond
from prewikka import baseview
File "/usr/lib/python3/dist-packages/prewikka/baseview.py", line 27, in <module>
from prewikka import error, history, hookmanager, resource, response, template, utils, view
File "/usr/lib/python3/dist-packages/prewikka/history.py", line 102, in <module>
crontab.schedule("search_history", N_("Search history deletion"), "0 * * * *", _regfunc=history._history_cron, enabled=True)
File "/usr/lib/python3/dist-packages/prewikka/crontab.py", line 240, in schedule
self._init_system_job(ext_type, name, schedule, enabled, _regfunc)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 91, in inner
ret = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/prewikka/crontab.py", line 152, in _init_system_job
res = env.db.query("SELECT 1 FROM Prewikka_Crontab WHERE ext_type=%s AND userid IS NULL", ext_type)
File "/usr/lib/python3/dist-packages/prewikka/database.py", line 547, in query
return preludedb.SQL.query(self, sql)
RuntimeError: Table 'prewikka.Prewikka_Crontab' doesn't exist
编辑#3
我试图从这个问题开始,他解决了以下问题:
- 删除 Prewikka 数据库
- 重新创建 Prewikka 数据库
- 重试运行 Prewikka
但这对我不起作用,我还使用了上面提到的Howto 指令:https ://www.prelude-siem.org/projects/prelude/wiki/InstallingPackageUbuntu 。所以我错过了什么伙计们?
希望任何人都可以帮助我!,在此先感谢。
首次安装 Prelude 和 Prewikka 包:
安装前我们需要一个数据库来存储警报,我选择在 MySQL 中创建数据库
需要 Prelude 和 Prewikka 安装
在
dpkg
配置时,我们将创建一个用户数据库、名称数据库和密码数据库,存储在dbconfig-common
. 如果我们像我的情况一样忘记了它们,我们可以在/etc/prewikka/prewikka.conf
文件中检查它们。代理注册的配置。
Manager Agent 和 LML Client Agent 需要在 Prelude 管理员上作为分析器日志运行命令包。
首先要添加 Manager Agent 与以下内容:
注册 LML 代理的第二件事如下:
在 Manager 代理上运行:
证书验证后,不要
/etc/prelude/default/client.conf
忘记在文件、/etc/prelude/default/global.conf
文件、/etc/prelude-manager/prelude-manager.conf
文件和文件上配置服务器的监听/etc/prelude-lml/prelude-lml.conf
器。然后我们可以启动 Prelude 的服务:最后在执行
/usr/bin/prewikka
python脚本后,我们将得到监听服务器0.0.0.0:8000
,我们可以输入浏览localhost:8000
,如果没有出现输出错误,那么它将如下所示:来源:Prelude-WikiStart、Installing-from-SourcesCode、Installing-from-PackageUbuntu。