1.root用户下进入到etc/yum.repos.d目录下
[root@f7d6b9f2-1291-4d2f-8805-aef94deac9f7 yum.repos.d]# pwd
/etc/yum.repos.d
2.vim 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
5.解压chromedriver
unzip chromedriver_linux64.zip
6.移动chromedriver
mv /tmp/chromedriver /bin/centos7安装google-chrome