1.root用戶下進入到etc/yum.repos.d目錄下 [root@f7d6b9f2-1291-4d2f-8805-aef94deac9f7 yum.repos.d]# pwd cd /etc/yum.repos.d 2.vi google-chrome.repo[google-chrome] ...
1.root用戶下進入到etc/yum.repos.d目錄下
[root@f7d6b9f2-1291-4d2f-8805-aef94deac9f7 yum.repos.d]# pwd
cd /etc/yum.repos.d
2.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
如果執行到這裡出現
執行面的命令
vi /usr/libexec/urlgrabber-ext-down
把 #! /usr/bin/python 修改成 #! /usr/bin/python2
4.下載chromedriver
wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip
5.解壓chromedriver
unzip chromedriver_linux64.zip
6.移動chromedriver
mv chromedriver /usr/bin/
7.最後驗證安裝情況
[root@centos-s-1vcpu-1gb-sfo1-01-niuyongliang yum.repos.d]# chromedriver
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 9515
Only local connections are allowed.
註釋:如有侵權請聯繫博主
轉發請標明出處:https://www.cnblogs.com/zzxd/p/10906939.html