Created
July 30, 2020 17:34
-
-
Save cadreoneseven/600237eb4aa02a5dfa36154dcc14abe1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update system packages | |
apt-get update | |
apt-get upgrade | |
# install ssh server | |
apt-get install openssh-server -y | |
# install java | |
apt-get install openjdk-7-jdk -y | |
# install chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list | |
apt-get update | |
apt-get install google-chrome-stable | |
# install xvfb | |
apt-get install xvfb -y | |
# installing chrome driver | |
wget http://chromedriver.googlecode.com/files/chromedriver_linux64_23.0.1240.0.zip | |
apt-get install unzip | |
unzip chromedriver_linux64_23.0.1240.0.zip | |
cp chromedriver /usr/local/bin | |
# install git | |
apt-get install git | |
# cloning facebook web driver | |
git clone https://github.com/facebook/php-webdriver.git | |
# downloading selenium standalone | |
wget http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar | |
# install php | |
apt-get install php5-cli php5-curl -y | |
# start xvfb | |
Xvfb :99 -screen 0 1280x1024x24 -ac & | |
# start selenium standalone | |
export DISPLAY=:99 && java -jar selenium-server-standalone-2.25.0.jar & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running it on PHP
session('chrome'); $session->open('http://www.google.com'); ?>#!/usr/bin/php