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/
验证安装情况