I would like to operate headless chrome on CentOS.
About Headless Chrome
It is a mode to operate without displaying the secreen, which will be available from Google Chrome 59. Useful for automated testing and web scraping.
Just because it’s Headless doesn’t change much from using regular Chrome. Control Chrome from Selenium through ChromeDriver. Pass ChromeOptions as an argument when creating a Chrome WebDriver, and specify the Chrome path and arguments to be executed in it.
Install required library.
$ sudo yum install -y libX11 GConf2 fontconfig ... 依存性関連をインストールしました: ConsoleKit.x86_64 0:0.4.1-6.el6 ConsoleKit-libs.x86_64 0:0.4.1-6.el6 ORBit2.x86_64 0:2.14.17-7.el6 dbus.x86_64 1:1.2.24-9.el6 eggdbus.x86_64 0:0.6-3.el6 libIDL.x86_64 0:0.8.13-2.1.el6 polkit.x86_64 0:0.96-11.el6_10.1 sgml-common.noarch 0:0.6.3-33.el6 完了しました!
ほう。
[vagrant@localhost ~]$ cd /etc/yum.repos.d
[vagrant@localhost yum.repos.d]$ sudo touch google-chrome.repo
[vagrant@localhost yum.repos.d]$ ls
CentOS-Base.repo jenkins.repo remi-glpi92.repo
CentOS-Debuginfo.repo kibana.repo remi-glpi93.repo
CentOS-Media.repo logstash.repo remi-php54.repo
CentOS-Vault.repo mariadb.repo remi-php70.repo
CentOS-fasttrack.repo mysql-community-source.repo remi-php71.repo
elasticsearch.repo mysql-community.repo remi-php72.repo
epel-testing.repo nginx.repo remi-php73.repo
epel.repo nodesource-el.repo remi-safe.repo
google-chrome.repo remi-glpi91.repo remi.repo
[google-chrome] name=google-chrome baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64 enabled=1 gpgcheck=1 gpgkey=https://dl.google.com/linux/linux_signing_key.pub
$ sudo yum update