liunx 安装chrome的方法
2020-01-10 17:02 Tanwheey 阅读(247) 评论(0) 编辑 收藏 举报1.修改/etc/yum.repos.d/CentOS-Base.repo为
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.jd.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.jd.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.jd.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing
packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.jd.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
2./etc/yum.repos.d/目录下新建文件google-chrome.repo,向其中添加如下内容:
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
安装:
yum clean all
yum makecache
yum update
yum install google-chrome-stable --nogpgcheck
3.安装XVFB
yum install Xvfb install libXfont xorg-x11-fonts*
/usr/bin/Xvfb :7 -ac -screen 0 1024x768x8 &
export DISPLAY=:7
4.chromediver 放到 /usr/bin chmod 777 chromediver
------------------------------------------------------Tanwheey-------------------------------------------------------------------------
爱生活,爱工作。