一、问题描述:
centos8默认安装firefox,打开总是很慢,又是需要很长时间,因此决定安装chrome,结果发现在linux系统中chrome打开非常迅捷,使用体验很好。硬件:e5-2680v3,内存32G。但是在安装过程中出了不少小问题,记载如下。
二、源文件的下载问题
网上提供了很多下载地址,但还是官网比较放心,实际上https://www.google.cn/chrome/比较放心,而且是当时最稳定的版本,关键是官网能够根据系统自己确定是windows还是linux版本,省心,当然前提是用centos自带的firefox浏览器。
网上有些提示wget https:
//dl
.google.com
/linux/direct/google-chrome-stable_current_x86_64
.rpm下载,但是由于网络等方面的问题,慢的不得了。
三、安装过程
1、安装依赖包,
当然是先运用国内的镜像源(阿里、163或者清华都不错),我这里是用阿里:
(1)进入:https://developer.aliyun.com/mirror/
(2)选择 Centos,找到 centos8
(3)备份 :mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
(4) wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
或者curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
(5)yum makecache 或者dnf makecache
2、如果是通过这个https://www.google.cn/chrome/网站在图形界面下,会自动启动centos系统的软件安装程序并安装完成,如果是下载rpm包,则需要rpm -ivh google-chrome-stable_current_x86_64.rpm,期间可能会出现很多依赖包,则yum安装就好。
3、在root账户下,启动chrome没有反应,用命令/usr/bin/google-chrome %U -user-data-dir查看chrome的报错如下:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not
supported. See https://crbug.com/638180.
解决办法:打开文件管理器,或者是命令进入 usr/share/applications目录,修改命令 vi google-chrome.desktop或者图形化界面则右键,在运行命令后面加上-user-data-dir --no-sandbox,即如下面所示:
/usr/bin/google-chrome-stable %U -user-data-dir --no-sandbox
三、效果
chrome确实比firefox快很多很多,几乎是秒开,使用非常好。