Skip to content

Instantly share code, notes, and snippets.

@tashian
Created April 21, 2021 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tashian/5f1bd171e30dbc8692f1f47d8e7a3460 to your computer and use it in GitHub Desktop.
Save tashian/5f1bd171e30dbc8692f1f47d8e7a3460 to your computer and use it in GitHub Desktop.
Build step-ca on an AWS VM
#!/bin/bash
### Basic build environment #######
apt update
apt install -y make gcc ack libpcsclite-dev pkg-config unzip debhelper
apt upgrade -y
cd /root
## Install golang
GO_VERSION=1.16.3
curl -LO https://golang.org/dl/go$GO_VERSION.linux-amd64.tar.gz
tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz
cat<<EOF >> /etc/profile
export PATH=\$PATH:/usr/local/go/bin
EOF
# Install AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
### On first login:
cat<<EOF >> .profile
export PATH=\$PATH:\$HOME/go/bin
EOF
git clone https://github.com/smallstep/cli
git clone https://github.com/smallstep/certificates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment