# 安装依赖软件
yum -y install wget fontconfig

# 下载PhantomJS
wget -P /tmp/ https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2

# 解压
tar xjf /tmp/phantomjs-2.1.1-linux-i686.tar.bz2 -C /usr/local/ (-C换目录解压)

# 重命名
mv /usr/local/phantomjs-2.1.1-linux-i686 /usr/local/phantomjs

# 建立软链接
ln -s /usr/local/phantomjs/bin/phantomjs /usr/bin/

在终端执行phantomjs命令,如果跟我下图的结果一样就表示安装成功了。
[root@localhost~]# phantomjs
phantomjs>

相关文章:

  • 2021-10-31
  • 2022-03-03
  • 2022-12-23
  • 2021-06-09
  • 2021-09-28
  • 2021-10-01
  • 2022-12-23
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2021-05-23
  • 2021-06-11
  • 2022-12-23
相关资源
相似解决方案