Linux 服务器安装 Chrome 浏览器
系统版本:CentOS Stream 8
安装 wget
yum install -y wget下载 chrome 安装包
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm安装依赖
直接安装 chrome 会提示缺少依赖
使用 repoquery 命令查询依赖提供方
比如,我要查询 libnss3.so 依赖的提供方,可以使用
repoquery --nvr --whatprovides libnss3.solibnss3.so 由 nss 提供,可以使用 yum 安装 nss
yum install -y nss-3.90.0-3.el8其他缺失依赖都可以使用此方法安装
安装 chrome
rpm -ivh google-chrome-stable_current_x86_64.rpm将浏览器启动模式调整为 no-sandbox
vi /opt/google/chrome/google-chrome将光标移到最下面,最后一行,在 "@$" 后面添加 "--no-sandbox"
安装 MobaXterm
MobaXterm 没有中文,可以使用 Github 的汉化版
项目地址:[https://github.com/RipplePiam/MobaXterm-Chinese-Simplified]()
安装 xorg
yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-font-utils xorg-x11-fonts-Type1启用 X11Forwarding
vi /etc/ssh/sshd_config找到 X11Forwarding 改成 YES
启动 chrome
cd /opt/google/chrome/
./google-chrome报错是正常的,等一分钟,就会出现 chrome 的欢迎界面
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »