cd /etc/yum.repos.d

vi google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
3.運行命令
yum -y install google-chrome-stable --nogpgcheck


4.下載chromedriver
wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip

若無法連接則在這里去下載,進入網站:
http://npm.taobao.org/mirrors/chromedriver
找到對應的版本(linux 查看Chrome版本號:google-chrome --version)
下載:
wget http://npm.taobao.org/mirrors/chromedriver/86.0.4240.22/chromedriver_linux64.zip

若一次沒成功,多試幾次
解壓chromedriver
unzip chromedriver_linux64.zip
移動chromedriver
mv chromedriver /usr/bin/

驗證安裝情況

