Skip to content

Instantly share code, notes, and snippets.

@michael-halim
Created March 15, 2023 06:29
Show Gist options
  • Save michael-halim/db0257d983e6535180603b2402461f76 to your computer and use it in GitHub Desktop.
Save michael-halim/db0257d983e6535180603b2402461f76 to your computer and use it in GitHub Desktop.
Deploy Website Scraping Python Selenium on Virtual Private Server (CentOS 8)

Version

  • CentOS 8
# Login to VPS
ssh <username>@<ip_address>

# Get All Dependencies
sudo yum update
sudo yum upgrade

# Install dpkg
sudo yum -y install dpkg

# Install Google Chrome and Chromedriver
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo dnf localinstall google-chrome-stable_current_x86_64.rpm
wget https://chromedriver.storage.googleapis.com/109.0.5414.74/chromedriver_linux64.zip

# Unzip Chromedriver
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip

# Move Chromedriver to /bin/
sudo mv -f ~/chromedriver /usr/bin/chromedriver
sudo chown root:root /usr/bin/chromedriver
sudo chmod +x /usr/bin/chromedriver
chromedriver --url-base=/wd/hub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment