centos安装chrome及chromedriver

一、安装chrome

1 首先安装google的epel源

vi /etc/yum.repos.d/google.repo

2 插入

[google]
name=Google-x86_64
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enabled=1
gpgcheck=0
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub 

3 保存退出,然后安装

1 yum update
2 yum install google-chrome-stable

4 查看chrome版本

google-chrome --version

 

二、安装chromedriver

在此查看chromedriver对应版本

1 把*.*.*.*换成chrome版本,下载安装包

wget https://chromedriver.storage.googleapis.com/*.*.*.*/chromedriver_linux64.zip

2 解压

unzip chromedriver_linux64.zip

(若报错没有解压,运行

yum -y install zip

安装解压工具)

3 更改权限

chmod 755 chromedriver

 

posted @ 2021-02-01 12:40  五夜  阅读(2336)  评论(1)    收藏  举报