Install PHANTOMJS + casperjs under Linux (CentOs)
is installed by referring to the blog of Cnmiss ' s blog http://ju.outofmemory.cn/entry/70691
1, installation Phantomjs
Download the installation package, because it is HTTPS, you need to have--no-check-certificate, otherwise you will be prompted with a security certificate problem
First look at whether the Linux system is 32-bit or 64-bit uname-a If the result is x86_64 then 64-bit system, otherwise 32-bit system
installation package links for 64-bit Linux systems
wget--no-check-certificate https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
installation package links for 32-bit Linux systems
wget--no-check-certificate https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2
2. Unzip the file
The name of the installation package I downloaded is rather strange:
Phantomjs-1.9.7-linux-x86_64.tar.bz2? signature=pkonkwxwh43fmhtxsvlh1bhbs1a=&expires=1433993026&awsaccesskeyid=0emwefsga12z1hf1tz82& Response-content-disposition=attachment; Filename= "PHANTOMJS-1.9.7-LINUX-X86_64.TAR.BZ2"
I'll just rename it. mv File name phantomjs-1.9.7-linux-x86_64.tar.bz2
Re-unzip the file tar xvfj phantomjs-1.9.7-linux-x86_64.tar.bz2
3. Create a PHANTOMJS soft connection to the environment variable so that you can use the PHANTOMJS command directly in the shell
The current path to my file is:/home/users/abc/work/js/phantomjs
Create soft connection: Ln-sf/home/users/abc/work/js/phantomjs/bin/phantomjs /usr/local/bin/ Phantomjs
4. Check whether PHANTOMJS is working properly
Phantomjs –version
If you can see the version number, it will work correctly.
5, Installation Casperjs
Use git to download the latest program:git clone git://github.com/n1k0/casperjs.git
If you don't have Git installed, you'll need to install Git first
6. Create a casperjs soft connection to the environment variable so that you can use the PHANTOMJS command directly in the shell
The current path to my file is:/home/users/abc/work/js/casperjs
Create soft connection: Ln-sf/home/users/abc/work/js/casperjs/bin/casperjs/usr/local/bin/casperjs
7. Check whether CASPERJS is working properly
Casperjs--version
Install PHANTOMJS + casperjs under Linux (CentOs)