Wiki.js 寻求帮助

Wiki.js Serve Help Wanted

OS: centos 7.6

节点版本:v12.11.1

NPM 版本:6.11.3

我在虚拟服务器上安装和配置 wiki.js,我想为其提供服务,问题是我不熟悉 Node.js,我设置了 wiki.js基于 Linux 安装文档:https://docs.requarks.io/en/install/linux

现在我 运行 node server 并且它的服务正确:

[root@localhost html]# node server
Loading configuration from /var/www/html/config.yml... OK
2019-10-16T08:48:21.178Z [MASTER] info: =======================================
2019-10-16T08:48:21.182Z [MASTER] info: = Wiki.js 2.0.0-beta.303 ==============
2019-10-16T08:48:21.183Z [MASTER] info: =======================================
2019-10-16T08:48:21.183Z [MASTER] info: Initializing...
2019-10-16T08:48:21.808Z [MASTER] info: Connecting to database...
2019-10-16T08:48:21.936Z [MASTER] info: Database Connection Successful [ OK ]
2019-10-16T08:48:22.072Z [MASTER] warn: DB Configuration is empty or incomplete. Switching to Setup mode...
2019-10-16T08:48:22.073Z [MASTER] info: Starting setup wizard...
2019-10-16T08:48:22.420Z [MASTER] info: Starting HTTP server on port 3000...
2019-10-16T08:48:22.420Z [MASTER] info: HTTP Server on port: [ 3000 ]
2019-10-16T08:48:22.427Z [MASTER] info: HTTP Server: [ RUNNING ]
2019-10-16T08:48:22.427Z [MASTER] info: 
2019-10-16T08:48:22.427Z [MASTER] info:
2019-10-16T08:48:22.427Z [MASTER] info: Browse to http://localhost:3000/ to complete setup!
2019-10-16T08:48:22.427Z [MASTER] info:
2019-10-16T08:48:22.428Z [MASTER] info: 

但问题是我现在怎样才能运行呢?我的虚拟机 IP 是:192.168.1.54 和我 运行 192.168.1.54:3000 但它说:This site can’t be reached.

我该怎么办?

您必须在虚拟机防火墙中打开 3000 端口。你可以这样做:

$ sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent
$ sudo firewall-cmd --reload

然后查看是否添加成功:

$ sudo firewall-cmd --list-ports