今天需要在Linux上放一個selenium的小程序,所以安裝一下Chrome以及ChromeDriver
一、Linux安裝Chrome
我這里環境是Centos7.x,采取了最快的安裝最新 Chrome 版本的最簡單方法
curl https://intoli.com/install-google-chrome.sh | bash

有其他版本需求可以參考:https://intoli.com/blog/installing-google-chrome-on-centos/
安裝完成,驗證一下是否成功,以及Chrome的版本,后續會用到
google-chrome --version

二、Linux安裝ChromeDriver
chrome官方:http://chromedriver.storage.googleapis.com/index.html
淘寶源:https://npm.taobao.org/mirrors/chromedriver
我們下載對應版本,從上面我們可知版本為91.0.4472.114
那我們從中找到進行下載


wget http://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_linux64.zip
進行解壓
unzip chromedriver_linux64.zip /usr/bin
驗證一下,成功安裝

