https://www.bonusbits.com/wiki/HowTo:Install_PhantomJS_on_CentOS
One way to extract the archive and preserve the included files and structure is to extract to an folder and set the path to the bin.
- Create Directory
-
mkdir -p /opt/phantomjs
- Extract
-
tar -xjvf ~/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 --strip-components 1 /opt/phantomjs/ - Create Symlink
-
ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs
Test
phantomjs /opt/phantomjs/examples/hello.js
本文档详细介绍了如何在CentOS系统上安装PhantomJS无头浏览器。具体步骤包括创建安装目录、解压PhantomJS文件、设置符号链接以及最后的安装测试。此教程适用于希望在服务器环境中使用PhantomJS执行自动化任务的开发者。
845

被折叠的 条评论
为什么被折叠?



