1.配置yum源
vim /etc/yum.repos.d/google.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
2.安装chrome
yum -y install google-chrome-stable --nogpgcheck #此时会报错,缺少依赖性
font下载地址:
http://mirror.centos.org/centos/7/os/x86_64/Packages/liberation-fonts-1.07.2-16.el7.noarch.rpm
libvulkan下载地址:
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/vulkan-1.1.97.0-1.el7.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libwayland-client-1.15.0-1.el7.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/vulkan-filesystem-1.1.97.0-1.el7.noarch.rpm
用yum把依赖性安装后,再次安装chrome
3.启动
默认超户不能用google-chrome命令。
vim /opt/google/chrome/google-chrome
最后一行添加 --user-date-dir --no-sandbox
如图:
至此,超户可以调用命令了