Edit: This tutorial for now works only for chrome v58. V59 and higher needs libgtk3 which is not available in the mirrors yet. Compiling gtk3 using this https://itvision.altervista.org/compiling-and-installing-gtk3-in-centos6.html might be also a solution.

Edit2: https://intoli.com/blog/installing-google-chrome-on-centos/

Google Chrome team has added an amazing feature into the lastest version — headless support. This brings an amazing oportunity to laverage usage of Amazon EC2 instances to do some automated browsing stuff without pain of using (soon obsolete) PhantomJS or Firefox with Xvfb.

Amazon Linux is not great for newbies like me. I had some troubles with installing the chrome so after some struggle I created an install script that will install it for you.

#!/bin/sh

sudo echo -e "[google-chrome]

name=google-chrome

baseurl= sudo touch /etc/yum.repos.d/google-chrome.reposudo echo -e "[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 " >> /etc/yum.repos.d/google-chrome.repo

sudo echo -e "[CentOS-base]

name=CentOS-6 - Base

mirrorlist=

sudo echo -e "#released updates

[CentOS-updates]

name=CentOS-6 - Updates

mirrorlist=

sudo echo -e "#additional packages that may be useful

[CentOS-extras]

name=CentOS-6 - Extras

mirrorlist= sudo touch /etc/yum.repos.d/centos.reposudo echo -e "[CentOS-base]

name=CentOS-6 - Base

mirrorlist= http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6



" >> /etc/yum.repos.d/centos.reposudo echo -e "#released updates

[CentOS-updates]

name=CentOS-6 - Updates

mirrorlist= http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6



" >> /etc/yum.repos.d/centos.reposudo echo -e "#additional packages that may be useful

[CentOS-extras]

name=CentOS-6 - Extras

mirrorlist= http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

" >> /etc/yum.repos.d/centos.repo sudo yum install -y google-chrome-stable google-chrome-stable --version

It has nothing complicated in it. Just adding some necessary repos.

After this, you can start using headless chrome. https://developers.google.com/web/updates/2017/04/headless-chrome is good place to start :)

I hope that someone will find it useful.