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
若是你看到當前版本號,即表示正常工做了。