Skip to content

Instantly share code, notes, and snippets.

@tonypiazza
Last active December 16, 2015 04:59
Show Gist options
  • Save tonypiazza/5380980 to your computer and use it in GitHub Desktop.
Save tonypiazza/5380980 to your computer and use it in GitHub Desktop.
A BASH script to setup everything we need for a Cassandra development machine with Ubuntu Desktop.
#!/bin/bash
ROOT_UID=0 #Root has $UID 0
if [ $UID != $ROOT_UID ]
then
echo -e "Insufficient privileges!"
exit 1
fi
echo "Installing Java..."
add-apt-repository -y ppa:webupd8team/java
apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
apt-get -y install oracle-java6-installer
echo "Installing Eclipse..."
apt-get -y --no-install-recommends install eclipse
echo "Installing LibYAML..."
wget -P Downloads http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar -zxf Downloads/yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure
make
make install
cd ..
echo "Installing python-dev"
apt-get -y install python-dev
echo "Installing PyYAML..."
wget -P Downloads http://pyyaml.org/download/pyyaml/PyYAML-3.10.tar.gz
tar -zxf Downloads/PyYAML-3.10.tar.gz
cd PyYAML-3.10
python setup.py --with-libyaml install
cd ..
echo "Installing CCM..."
mkdir ccm
cd ccm
git init
git pull https://github.com/pcmanus/ccm.git
./setup.py install
cd ..
echo "Installation completed in $SECONDS seconds."
@tonypiazza
Copy link
Author

Here are the steps I need to take on a newly installed machine with Ubuntu Desktop:

sudo apt-get -y install git
git init
git pull https://gist.github.com/5380980.git
chmod +x setup-cassandra-dev.sh
sudo ./setup-cassandra-dev.sh
ccm create casdev2 -v git:cassandra-2.0.2

@polandll
Copy link

Nice Tony! I'll see about modding your script for dse.

Lorina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment