Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install and dependencies on Ubuntu
# Make sure we have curl
sudo apt update
sudo apt install -y curl
# Install NodeJS
curl -sL -o
sudo bash
sudo apt install -y nodejs
# Install Visual Metrics dependencies
sudo apt-get update -y && sudo apt-get install -y imagemagick ffmpeg
sudo apt-get install -y python-is-python3 python3-dev python3-pip
python -m pip install pyssim
# Install xvfb
sudo apt-get install -y xvfb
# Net-tools for throttling your connection
sudo apt-get install -y net-tools iproute2
# Install Firefox
sudo apt install firefox -y
# Install Chrome
wget -q -O - | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt update
sudo apt install -y google-chrome-stable
# Install Edge
# curl | gpg --dearmor > microsoft.gpg
# sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
# sudo sh -c 'echo "deb [arch=amd64] stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
# sudo apt update
# sudo apt-get install -y microsoft-edge-dev
# Setup a new user
echo 'Setup a user that runs The user name is sitespeedio'
adduser sitespeedio
usermod -aG sudo sitespeedio
echo "sitespeedio ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee "/etc/sudoers.d/sitespeedio"
echo "Install as the sitespeedio user and fix the sudo npm problem"
su - sitespeedio -c 'mkdir "${HOME}/.npm-packages"'
su - sitespeedio -c 'npm config set prefix "${HOME}/.npm-packages"'
su - sitespeedio -c 'echo -e "NPM_PACKAGES=\"${HOME}/.npm-packages\"" >> ~/.bashrc ; echo -e "export PATH=\"$PATH:${HOME}/.npm-packages/bin\"" >> ~/.bashrc'
su - sitespeedio -c 'npm install -g'
su - sitespeedio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment