安装google-chrome
curl https://intoli.com/install-google-chrome.sh | bash
检查是否缺少依赖,返回为空说明正常:
ldd /opt/google/chrome/chrome | grep "not found"
安装对应版本的Chromedriver
http://npm.taobao.org/mirrors/chromedriver/
检查服务器chrome版本:
google-chrome-stable -version
下载完之后,解压至对应目录即可
将其移至/usr/bin/:
mv chromedriver /usr/bin/
最后验证安装情况
Starting ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881) on port 9515
Only local connections are allowed.