Date: 2014-11-03 10:20
Summary: 为什么偏要在人家不支持的系统上用呢?我也说不清,有时候脑子抽筋了吧,不弄好不罢休。这是试过很多次之后,找到的CentOS 6.5 安装Chrome最简单的方法。如果你还在装的话,加油↖(ω)↗
安装
开始使用CentOS6.5作为桌面,平时用习惯了Chrome浏览器,但是却发现在CentOS上面安装Chrome浏览器并不是个简单的事。因为CentOS使用的库版本都比较老了,给安装带来了不小的麻烦。话说网上各种方法一搜一箩筐,质量良莠不齐,一不小心就会被误导了。有的说是安装rpm,但是系统中libstdc++库的版本达不到要求,所以要自己编译;完了libstdc++在装的时候又说libc的库版本达不到要求,还需要再去找glibc的源码自己编译。理论上肯定是行的通的,但是生活还是需要简单些。
折腾了一番之后,还是国外的大牛的解决方案最简单,还是总结一下吧。
过程
Google Chrome is a freeware web browser developed by Google. It was released as a beta version for Microsoft Windows on September 2, 2008, and as a stable public release on December 11, 2008. Google Chrome 37 is latest stable version available to download.
Google Chrome 37 Released: This article will help you to install Google chrome on CentOS & RHEL 6 and Fedora 19/18.
Changes and Improvements in This Release
Rich Notifications Improvements
An Updated Incognito / Guest NTP design
The addition of a Browser crash recovery bubble
Chrome App Launcher for Linux
Lots of under the hood changes for stability and performance
Be careful before installing it, The script recommended to upgrade system to latest version to work Google chrome properly
上面不想看可以忽略!
Step 1: Install/Update Google Chrome
第一步:安装/升级 Google Chrome
Richard Lloid provided an shell script to grab libraries from a more recent Linux distro, put them in a tree (/opt/google/chrome/lib) exclusively picked up by Google Chrome and then you can indeed run Google Chrome on CentOS 6.5 or later. Read More[2]
终端输入三条命令
# wget http://chrome.richardlloyd.org.uk/install_chrome.sh
# chmod +x install_chrome.sh
# sh install_chrome.sh
If you are using older version of Linux distribution, This script will prompt you for confirmation to upgrade system. As per Richard Lloid we need to upgrade system by typing yes to work properly.
Step 2: Launch Google Chrome
第二步:启动Google Chrome
Use following command to start Google Chrome from non root account.(这里的意思是从非root用户启动。如果用root账户的话,还需要指定--user-data-dir这个路径)
启动
$ google-chrome
后台启动
$ google-chrome &
Step 3: Uninstall Google Chrome
第三步:卸载Google Chrome
If you have used above shell script to install Google chrome. Then you can use use following command to uninstall Google Chrome and its dependencies added by this script.
# sh install_chrome.sh -u
有哪些坑
- 上面提到的使用root用户登录的时候会需要指定--user-data-dir参数选项。
- 我在开启SELinux的时候启动不了Chrome,关闭了之后就没问题了,不知道是不是和我用root用户登录有关。