Centos7安装chrome浏览器

1. 配置yum源html

在目录 /etc/yum.repos.d/ 下新建文件 google-chrome.repolinux

cd /ect/yum.repos.d/
vim google-chrome.repo

写入以下内容:chrome

[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

安装google chrome浏览器:vim

yum -y install google-chrome-stable

Google官方源可能在中国没法使用,致使安装失败或者在国内没法更新,能够添加如下参数来安装:浏览器

yum -y install google-chrome-stable --nogpgcheck

运行chrome
google

找到chrome路径,并作个软链接,方便使用:url

which google-chrome-stable
ln -s xxx /bin/chrome

使用root用户启动chrome示例时会提示添加参数–no-sandbox flagcode

chrome --no-sandbox flag