1

Splash 的安装

 2 years ago
source link: https://cuiqingcai.com/31071.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Splash 的安装

作者 崔庆才 发表于 2021-10-03 分类于 安装配置 阅读次数: 7 本文字数: 457 阅读时长 ≈ 1 分钟

Splash 是一个 JavaScript 渲染的工具,本节来介绍一下它的安装方式。

Splash 建议的安装方式是通过 Docker,安装是通过 Docker 安装,在这之前请确保已经正确安装好了 Docker,可以参考:https://setup.scrape.center/docker。

有了 Docker,只需要一键启动 Splash 即可,命令如下:

docker run -p 8050:8050 scrapinghub/splash

安装完成之后会有类似的输出结果:

nqfy3.png

这样就证明 Splash 已经在 8050 端口上运行了。

这时我们打开:http://localhost:8050 即可看到 Splash 的主页,如图所示:

umgr5.png

当然 Splash 也可以直接安装在远程服务器上,我们在服务器上运行以守护态运行 Splash 即可,命令如下:

docker run -d -p 8050:8050 scrapinghub/splash

在这里多了一个 -d 参数,它代表将 Docker 容器以守护态运行,这样在中断远程服务器连接后不会终止 Splash 服务的运行。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK