Linux_Casperjs_Phantomjs 安装笔记

来源:互联网 发布:淘宝直通车在哪开 编辑:程序博客网 时间:2024/05/18 09:13

环境: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