1. 程式人生 > >CentOS 7 下安裝Chrome瀏覽器

CentOS 7 下安裝Chrome瀏覽器

Chrome瀏覽器放棄了對Redhat, CentOS等的支援,所以想在最新版本的這些類Unix上安裝Chrome就變得不怎麼容易,好在網際網路總有那麼多志願者,幫你做好這些事,下面記錄我這次在CentOS 7 上安裝Chrome的命令記錄:具體教程見:

下面是我安裝的命令列記錄(非教程,只為自己以後方便查詢):

[[email protected] /]$ su root
密碼:
[[email protected] /]# vi /etc/yum.repos.d/google-chrome.repo
[[email protected] /]# 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。
錯誤:無須任何處理
[
[email protected]
/]# 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])

[
[email protected]
/]# chmod u+x install_chrome.sh
[[email protected] /]# ./install_chrome.sh 
     ----> 如下失敗,沒安裝成功。
Google Chrome Installer 6.10 on the x86_64 platform
(C) Richard K. Lloyd 2014 <[email protected]>

*** 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
[[email protected] /]# 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


[[email protected] /]# ./install_chrome.sh -s
                           ---> -s 表示安裝穩定版(stable),這次成功了!
Google Chrome Installer 6.10 on the x86_64 platform
(C) Richard K. Lloyd 2014 <[email protected]>
*** /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!!!