Linux_Casperjs_Phantomjs 安装笔记

本文介绍了如何在CentOS 7上安装PhantomJS 2.1.1及CasperJS 1.1.0。安装过程包括下载安装包、配置依赖环境、解压并设置环境变量等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

环境:Vmware Workstation 10,CentOS-7-x86_64-DVD-1511.iso,Xshell 4.0,ip:192.168.216.140.

Phantomjs 安装

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

[root@topscience ~]# yum install gcc gcc-c++ make flex bison gperf ruby openssl-devel freetype-devel fontconfig-devel libicu-devel sqlite-devel libpng-devel libjpeg-devel

[root@topscience ~]# yum install bzip2

[root@topscience ~]# tar -jxvf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/

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

[root@topscience ~]# vim /etc/profile

export PATH=/usr/local/phantomjs/bin:$PATH

[root@topscience ~]# source /etc/profile

[root@topscience ~]# phantomjs - -version

2.1.1


Casperjs 安装

[root@topscience ~]# wget -O casperjs-casperjs-1.1.0-0-gaf0955c.tar.gz https://github.com/casperjs/casperjs/tarball/1.1.0

[root@topscience ~]# tar -zxvf casperjs-casperjs-1.1.0-0-gaf0955c.tar.gz -C /usr/local/

[root@topscience ~]# mv /usr/local/casperjs-casperjs-b5c59e1/ /usr/local/casperjs

[root@topscience ~]# vim /etc/profile

export PATH=/usr/local/casperjs/bin:$PATH

[root@topscience ~]# source /etc/profile

[root@topscience ~]# casperjs - -version

1.1.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值