1.安装phantomjslinux
ubuntu下sudo apt-get install phantomjs下载的不能用shell
—-下载程序文件ubuntu
到官网下载
1.安装phantomjspost
—-下载程序文件code
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
32位ubuntu下载连接是https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2。blog
—-解压文件get
tar -xvf phantomjs-1.9.7-linux-x86_64.tar.bz2
–将程序移到一个合适的位置it
sudo mv phantomjs-1.9.7-linux-x86_64 /usr/local/src/phantomjs
—-建立软连接到环境变量中。这样能够直接在shell中使用phantomjs命令class
sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
—-检查是否正常工做变量
phantomjs
若是你看到当前版本号,即表示正常工做了。