核心逻辑
- Centos 7 安装google-chrome
- 配置chrome-driver环境
安装google-chrome
- 如果网络yum网络不好,可以更换源为阿里云
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
2.安装google-chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum install google-chrome-stable_current_x86_64.rpm
google-chrome --version
安装对应版本的chromedriver (必须与google-chrome版本对应)
mv chromedriver /usr/bin