在Linux中安装Google Chrome
第1步:启用Google YUM存储库
创建一个名为 /etc/yum.repos.d/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
第2步:安装Chrome Web浏览器
首先,检查是否可以从Google自己的存储库中使用以下yum命令获取最新版本。# yum info google-chrome-stable
示例输出
检查Google Chrome包裹信息
Loaded plugins: fastestmirror, langpacks, versionlock Loading mirror speeds from cached hostfile * base: centosmirror.go4hosting.in * epel: epel.scopesky.iq * extras: centosmirror.go4hosting.in * remi-safe: mirror.cedia.org.ec * rpmforge: mirror.smartmedia.net.id * updates: centosmirror.go4hosting.in Available Packages Name : google-chrome-stable Arch : x86_64 Version : 53.0.2785.116 Release : 1 Size : 47 M Repo : google-chrome Summary : Google Chrome URL : https://chrome.google.com/ License : Multiple, see https://chrome.google.com/ Description : The web browser from Google : : Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.您是否看到上面突出显示的输出,清楚地告诉我们可以从存储库中获取最新版本的chrome。所以,让我们使用 yum命令来安装它,如下图所示,它会自动安装所有需要的依赖关系。
# yum install google-chrome-stable
示例输出
在Linux中安装Google Chrome
Loaded plugins: fastestmirror, langpacks, versionlock Loading mirror speeds from cached hostfile * base: centosmirror.go4hosting.in * epel: mirror.premi.st * extras: centosmirror.go4hosting.in * remi-safe: mirror.cedia.org.ec * rpmforge: mirror.smartmedia.net.id * updates: centosmirror.go4hosting.in Resolving Dependencies --> Running transaction check ---> Package google-chrome-stable.x86_64 0:53.0.2785.116-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================== Package Arch Version Repository Size ======================================================================================================== Installing: google-chrome-stable x86_64 53.0.2785.116-1 google-chrome 47 M Transaction Summary ======================================================================================================== Total download size: 47 M Installed size: 181 M Is this ok [y/d/N]: y更新 :可悲的是, 谷歌Chrome浏览器不再支持最著名的商业分布 RHEL 6.x和它的自由克隆,如 CentOS的与 科学的Linux。 是的,他们已经停产 RHEL 6.x版本 都支持, 谷歌浏览器和其他方面,最新的 Firefox和 Opera浏览器在同一平台上成功运行。 幸运的是,通过开发一个脚本 理查德·劳埃德 ,自动下载并从最近公布的发行采摘库安装最新的 谷歌Chrome浏览器,并把这些库中 (/选择/谷歌/铬/ lib目录 )目录下,然后你可以能在 RHEL / CentOS的6.x的版本中运行 谷歌浏览器 。
# wget http://chrome.richardlloyd.org.uk/install_chrome.sh # chmod u+x install_chrome.sh # ./install_chrome.sh
示例输出
Richard Lloyd Google Chrome脚本
Google Chrome Installer 7.50 on the x86_64 platform (C) Richard K. Lloyd 2016 *** Creating temporary directory /tmp/chrome_install ... *** Changing working directory to /tmp/chrome_install ... *** Generating a list of out-of-date packages (please wait) ... *** Checking for an update to install_chrome.sh ... *** Downloading version.dat (please wait) ... --2016-09-20 02:11:44-- https://chrome.richardlloyd.org.uk/version.dat Resolving chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)... 193.110.246.232 Connecting to chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)|193.110.246.232|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 5 Saving to: ‘version.dat’ 100%[=====================================================================================================================================================>] 5 --.-K/s in 0s 2016-09-20 02:11:44 (335 KB/s) - ‘version.dat’ saved [5/5] *** install_chrome.sh is already the latest version (7.50) - continuing ... *** Determining latest Google Chrome version number (please wait) ... *** Downloading chrome_versions.csv (please wait) ... --2016-09-20 02:11:46-- http://omahaproxy.appspot.com/all?os=linux&channel=stable Resolving omahaproxy.appspot.com (omahaproxy.appspot.com)... 216.58.220.177, 2404:6800:4009:801::2011 Connecting to omahaproxy.appspot.com (omahaproxy.appspot.com)|216.58.220.177|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 318 [text/plain] Saving to: ‘chrome_versions.csv’ 100%[=====================================================================================================================================================>] 318 --.-K/s in 0s 2016-09-20 02:11:46 (39.1 MB/s) - ‘chrome_versions.csv’ saved [318/318] *** Latest google-chrome-stable version number is 53.0.2785.116 ... *** Downloading google-chrome-stable_current_x86_64.rpm (please wait) ... --2016-09-20 02:11:46-- https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm Resolving dl.google.com (dl.google.com)... 216.58.199.142, 2404:6800:4009:806::200e Connecting to dl.google.com (dl.google.com)|216.58.199.142|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 49781619 (47M) [application/x-rpm] Saving to: ‘google-chrome-stable_current_x86_64.rpm’ 100%[=====================================================================================================================================================>] 4,97,81,619 3.40MB/s in 14s 2016-09-20 02:12:00 (3.42 MB/s) - ‘google-chrome-stable_current_x86_64.rpm’ saved [49781619/49781619] *** Google Chrome 53.0.2785.116 downloaded successfully ... *** Installing Google Chrome 53.0.2785.116 RPM (please wait) ... Preparing... ################################# [100%] Updating / installing... 1:google-chrome-stable-53.0.2785.11################################# [100%] Redirecting to /bin/systemctl start atd.service *** Google Chrome 53.0.2785.116 was installed successfully ... *** /opt/google/chrome tree contains 87 files totalling 181 MB ... *** /tmp/chrome_install tree contains 1 files totalling 47 MB ... Google Chrome 53.0.2785.116 was installed successfully. Please run the browser via the 'google-chrome' command as a non-root user. To update Google Chrome, run "yum update google-chrome-stable" or simply re-run this script with "./install_chrome.sh". To uninstall Google Chrome, run "yum remove google-chrome-stable " or "./install_chrome.sh -u".
第3步:启动Chrome浏览器
使用非root用户启动浏览器。# google-chrome &Chrome浏览器的欢迎屏幕。
欢迎使用Google Chrome
在CentOS 7上预览Google Chrome
关于Google Chrome 53