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