一、安装phantomjs
1.从官网下载
2.加压 tar -zxvf phantomjs-2.1.1-linux-x86_64.tar.bz2
3.mv phantomjs-2.1.1-linux-x86_64 /usr/local/share/phantomjs
4.链接到bin下:ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
5.配置环境变量:sudo vim /etc/profile 添加export PATH=${PATH}:/usr/local/bin/phantomjs
二、安装chromedriver
1.从http://chromedriver.storage.googleapis.com/index.html下载对应的版本
2.解压 unzip chromedriver_linux64.zip
3.然后移动到 /usr/local/bin下
三、安装geckodriver
1.从https://github.com/mozilla/geckodriver/releases下载 后面安装和chromedriver相同