当前位置: > CentOS > CentOS入门 >

CentOS7安装Chrome浏览器

时间:2015-03-10 18:44来源:linux.it.net.cn 作者:IT

Chrome浏览器放弃了对Redhat, CentOS等的支持,所以想在最新版本的这些类Unix上安装Chrome就变得不怎么容易,好在互联网总有那么多志愿者,帮你做好这些事,下面记录我这次在CentOS 7 上安装Chrome的命令记录:具体教程见:

1.Google Chrome 39 Released – Install on RHEL/CentOS 7/6 and Fedora 20-15

2.How to install Google Chrome 28+ on RHEL/CentOS 6 or 7

 

下面是我安装的命令行记录(非教程,只为自己以后方便查询):

 

 

[johnnyhu@localhost /]$ su root 
密码: 
[root@localhost /]# vi /etc/yum.repos.d/google-chrome.repo 
[root@localhost /]# yum install google-chrome-statble 

已加载插件:fastestmirror, langpacks 
adobe-linux-x86_64 | 951 B 00:00 
atrpms | 3.0 kB 00:00 
base | 3.6 kB 00:00 
extras | 3.4 kB 00:00 
google-chrome | 951 B 00:00 
rpmforge | 1.9 kB 00:01 
updates | 3.4 kB 00:00 
google-chrome/x86_64/primary | 1.9 kB 00:06 
Loading mirror speeds from cached hostfile 
* base: mirror.bit.edu.cn 
* extras: mirror.bit.edu.cn 
* rpmforge: mirrors.neusoft.edu.cn 
* updates: mirror.bit.edu.cn 
google-chrome 3/3 
没有可用软件包 google-chrome-statble。 
错误:无须任何处理 
[root@localhost /]# wget http://chrome.richardlloyd.org.uk/install_chrome.sh 
--2014-12-24 17:51:57-- http://chrome.richardlloyd.org.uk/install_chrome.sh 
正在解析主机 chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)... 193.110.246.53 
正在连接 chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)|193.110.246.53|:80... 已连接。 
已发出 HTTP 请求,正在等待回应... 200 OK 
长度:76261 (74K) [application/x-sh] 
正在保存至: “install_chrome.sh” 

100%[======================================>] 76,261 18.7KB/s 用时 4.0s 

2014-12-24 17:52:07 (18.7 KB/s) - 已保存 “install_chrome.sh” [76261/76261]) 

[root@localhost /]# chmod u+x install_chrome.sh 
[root@localhost /]# ./install_chrome.sh 
     ----> 如下失败,没安装成功。
Google Chrome Installer 6.10 on the x86_64 platform 
(C) Richard K. Lloyd 2014 <rklloyd@gmail.com> 

*** Creating temporary directory /tmp/chrome_install ... 
*** Changing working directory to /tmp/chrome_install ... 
*** Checking for an update to install_chrome.sh ... 

*** Downloading version.dat (please wait) ... 

--2014-12-24 17:52:48-- http://chrome.richardlloyd.org.uk/version.dat 
正在解析主机 chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)... 193.110.246.53 
正在连接 chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)|193.110.246.53|:80... 已连接。 
已发出 HTTP 请求,正在等待回应... 200 OK 
长度:5 [text/plain] 
正在保存至: “version.dat” 

100%[======================================>] 5 --.-K/s 用时 0s 

2014-12-24 17:52:55 (750 KB/s) - 已保存 “version.dat” [5/5]) 

*** install_chrome.sh is already the latest version (6.10) - continuing ... 
*** Determining latest Google Chrome version number (please wait) ... 

*** Downloading chrome_versions.csv (please wait) ... 

--2014-12-24 17:53:31-- http://omahaproxy.appspot.com/all?os=linux&channel=stable 
正在解析主机 omahaproxy.appspot.com (omahaproxy.appspot.com)... 93.46.8.89, 203.98.7.65 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|93.46.8.89|:80... 失败:连接超时。 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|203.98.7.65|:80... 失败:连接超时。 
重试中。 

--2014-12-24 17:57:52-- (尝试次数: 2) http://omahaproxy.appspot.com/all?os=linux&channel=stable 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|93.46.8.89|:80... 失败:连接超时。 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|203.98.7.65|:80... 失败:连接超时。 
重试中。 

--2014-12-24 18:02:08-- (尝试次数: 3) http://omahaproxy.appspot.com/all?os=linux&channel=stable 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|93.46.8.89|:80... 失败:连接超时。 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|203.98.7.65|:80... 失败:连接超时。 
重试中。 

--2014-12-24 18:06:26-- (尝试次数: 4) http://omahaproxy.appspot.com/all?os=linux&channel=stable 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|93.46.8.89|:80... 失败:连接超时。 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|203.98.7.65|:80... 失败:连接超时。 
重试中。 

^Z 
[1]+ 已停止 ./install_chrome.sh 
[root@localhost /]# yum update bash wget 
已加载插件:fastestmirror, langpacks 
Loading mirror speeds from cached hostfile 
* base: mirrors.hustunique.com 
* extras: mirrors.hustunique.com 
* rpmforge: ftp.riken.jp 
* updates: mirrors.hustunique.com 
No packages marked for update 


[root@localhost /]# ./install_chrome.sh -s                            ---> -s 表示安装稳定版(stable),这次成功了!
Google Chrome Installer 6.10 on the x86_64 platform 
(C) Richard K. Lloyd 2014 <rklloyd@gmail.com> 
*** /tmp/chrome_install tree contains 2 files totalling 0 MB ... 

*** Changing working directory to /tmp/chrome_install ... 
*** Checking for an update to install_chrome.sh ... 

*** Downloading version.dat (please wait) ... 

--2014-12-24 18:17:09-- http://chrome.richardlloyd.org.uk/version.dat 
正在解析主机 chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)... 193.110.246.53 
正在连接 chrome.richardlloyd.org.uk (chrome.richardlloyd.org.uk)|193.110.246.53|:80... 已连接。 
已发出 HTTP 请求,正在等待回应... 200 OK 
长度:5 [text/plain] 
正在保存至: “version.dat” 

100%[==========================================================>] 5 --.-K/s 用时 0s 

2014-12-24 18:17:10 (754 KB/s) - 已保存 “version.dat” [5/5]) 

*** install_chrome.sh is already the latest version (6.10) - continuing ... 
*** Determining latest Google Chrome version number (please wait) ... 

*** Downloading chrome_versions.csv (please wait) ... 

--2014-12-24 18:17:17-- http://omahaproxy.appspot.com/all?os=linux&channel=stable 
正在解析主机 omahaproxy.appspot.com (omahaproxy.appspot.com)... 173.194.72.141, 2404:6800:4008:c05::8d 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|173.194.72.141|:80... 失败:连接超时。 
正在连接 omahaproxy.appspot.com (omahaproxy.appspot.com)|2404:6800:4008:c05::8d|:80... 失败:网络不可达。 
*** WARNING: Unable to determine latest Google Chrome version number ... 

*** Downloading google-chrome-stable_current_x86_64.rpm (please wait) ... 

--2014-12-24 18:19:24-- https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm 
正在解析主机 dl.google.com (dl.google.com)... 203.208.49.167, 203.208.49.165, 203.208.49.166, ... 
正在连接 dl.google.com (dl.google.com)|203.208.49.167|:443... 已连接。 
已发出 HTTP 请求,正在等待回应... 200 OK 
长度:60867960 (58M) [application/x-redhat-package-manager] 
正在保存至: “google-chrome-stable_current_x86_64.rpm” 

100%[==========================================================>] 60,867,960 1.98MB/s 用时 58s 

2014-12-24 18:20:23 (1022 KB/s) - 已保存 “google-chrome-stable_current_x86_64.rpm” [60867960/60867960]) 

警告:google-chrome-stable_current_x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 7fac5991: NOKEY 
*** Google Chrome downloaded successfully ... 

*** Installing Google Chrome RPM (please wait) ... 

警告:google-chrome-stable_current_x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 7fac5991: NOKEY 
准备中... ################################# [100%] 
正在升级/安装... 
1:google-chrome-stable-39.0.2171.95################################# [100%] 
Redirecting to /bin/systemctl start atd.service 

*** Google Chrome was installed successfully ... 

*** /opt/google/chrome tree contains 87 files totalling 174 MB ... 
*** /tmp/chrome_install tree contains 1 files totalling 58 MB ... 

-------> 下面是操作Chrome浏览器的一些常用操作!

Google Chrome 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".

-------end!!!



(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容