分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 代码编程

Centos安装PhantomJS

发布时间:2023-09-06 02:20责任编辑:沈小雨关键词:暂无标签

1.下载PhantomJS

[root@liuge ~]# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

2.解压,重命名

[root@liuge ~]# bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2 [root@liuge ~]# ??????????????????????[root@liuge ~]# tar xf phantomjs-2.1.1-linux-x86_64.tar -C /usr/local/#上面吧解压后的文件放到/usr/local文件下

重命名(方便以后使用phantomjs命令)

[root@liuge ~]# mv /usr/local/phantomjs-2.1.1-linux-x86_64/ /usr/local/phantomjs

3.安装依赖软件fontconfig

yum -y install wget fontconfig

4.建立软连接

在/usr/bin/目录下生产一个phantomjs的软连接

[root@liuge ~]# ln -s /usr/local/phantomjs/bin/phantomjs /usr/bin/[root@liuge ~]# ll /usr/bin/ph*lrwxrwxrwx 1 root root 34 Apr 26 20:24 /usr/bin/phantomjs -> /usr/local/phantomjs/bin/phantomjs[root@liuge ~]# 

5.命令测试

[root@liuge ~]# phantomjs phantomjs> 

Centos安装PhantomJS

原文地址:https://www.cnblogs.com/liuge36/p/9882897.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved