#!/bin/bash # `` sudo sh install.sh `` # Tested on AlmaLinux release 8.4 (Electric Cheetah) - 4.18.0-305.el8.x86_64 # The code is fork version to get work on latest CentOS 8 like version. echo Installing dependency sudo dnf -y install glibc fontconfig freetype freetype-devel fontconfig-devel wget bzip2 echo Installing Phantomjs cd /usr/local/share sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 sudo tar -xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 sudo mv phantomjs-2.1.1-linux-x86_64 phantomjs-2.1.1 sudo ln -s /usr/local/share/phantomjs-2.1.1/ /usr/local/share/phantomjs sudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs echo Installing Casperjs cd /usr/local/share sudo wget https://github.com/casperjs/casperjs/archive/refs/tags/1.1.4-2.tar.gz sudo mv /usr/local/share/1.1.4-2 /usr/local/share/casperjs cd casperjs sudo ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs sudo ln -s /usr/bin/python3 /usr/bin/python echo Version for Phantomjs phantomjs --version echo Version for Casperjs casperjs --version