Skip to content

Instantly share code, notes, and snippets.

@tosin2013
Created March 7, 2024 20:51
Show Gist options
  • Save tosin2013/ae34f4871672217c2428feaef98d7d4f to your computer and use it in GitHub Desktop.
Save tosin2013/ae34f4871672217c2428feaef98d7d4f to your computer and use it in GitHub Desktop.
Script to install Jekyll on Ubuntu 22.04 LTS
#!/bin/bash
# Script to install Jekyll on Ubuntu 22.04 LTS
# Update the system packages
echo "Updating system packages..."
sudo apt-get update -y
# Install Ruby and other dependencies
echo "Installing Ruby and dependencies..."
sudo apt-get install ruby-full build-essential zlib1g-dev -y
# Set up Ruby environment variables
echo "Setting up Ruby environment variables..."
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Install Jekyll and bundler
echo "Installing Jekyll and bundler..."
gem install jekyll bundler
# Verify the installation
echo "Verifying Jekyll installation..."
jekyll -v
echo "Jekyll installation completed."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment