一、安装谷歌浏览器

​root​
su root

CentOS 7安装谷歌浏览器_shell

​yum​
cd /etc/yum.repos.d
vim 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

CentOS 7安装谷歌浏览器_linux_02

3、安装谷歌浏览器

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

​/home/tao/Desktop​​root​​/root/Desktop​
cd /usr/share/applications/
cp /usr/share/applications/google-chrome.desktop /home/tao/Desktop

​图形化界面不是root用户​​一把锁​​添加权限​
cd /home/tao/Desktop
chmod 777 * .

CentOS 7安装谷歌浏览器_google_03

6、现在可以看到桌面有谷歌浏览器的图标了。

CentOS 7安装谷歌浏览器_linux_04

7、打开我的网站看看。

CentOS 7安装谷歌浏览器_centos_05

二、解决google-chrome无法启动的问题

问题表现:

​(我的安装完成正常启动,以下方法没有测试)​

1、方法一:

桌面图标右击–>属性–>启动命令后添加“–no-sandbox”

即:/usr/bin/google-chrome-stable %U --no-sandbox

2、方法二:

vim  /usr/share/applications/google-chrome.desktop
修改:Exec=/usr/bin/google-chrome-stable %U
为:Exec=/usr/bin/google-chrome-stable %U --no-sandbox
cp /usr/share/applications/google-chrome.desktop /root/Desktop