Skip to content

Instantly share code, notes, and snippets.

@russch
Last active October 15, 2020 20:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russch/27ecce2d7c7614d4e7cf0b71a068c5bd to your computer and use it in GitHub Desktop.
Save russch/27ecce2d7c7614d4e7cf0b71a068c5bd to your computer and use it in GitHub Desktop.
Prepare Centos 7 on EC2 for Tableau Server
#!/bin/bash
# Update and install the basics
sudo yum update -y
sudo yum install epel-release -y
sudo yum install haveged -y
sudo yum install nano -y
# AWS cli - need Python34, PIP
sudo yum install python34 -y
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user
export PATH=~/.local/bin:$PATH
source ~/.bash_profile
pip install awscli --upgrade --user
# Make sure we keep same hostname between reboots: https://aws.amazon.com/premiumsupport/knowledge-center/linux-static-hostname-rhel7-centos7/
echo 'tableaulinux' | sudo tee /etc/hostname
sudo sed -i -e 's/127.0.0.1 localhost/127.0.0.1 tableaulinux/' /etc/hosts
echo 'NETWORKING_IPV6=no' | sudo tee --append /etc/sysconfig/network
echo 'HOSTNAME=tableaulinux' | sudo tee --append /etc/sysconfig/network
echo 'preserve_hostname:true' | sudo tee --append /etc/cloud/cloud.cfg
sudo reboot now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment