Install PHANTOMJS + casperjs under Linux (CentOs)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.