Last active
June 1, 2024 16:29
-
-
Save nchapman/4211882 to your computer and use it in GitHub Desktop.
Ubuntu setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wget -O - https://raw.github.com/gist/4211882/<REVISION>/setup.sh | bash | |
# Get updates | |
apt-get -y update | |
apt-get -y upgrade | |
# Install build tools | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core mysql-client libmysqlclient-dev libxslt-dev libxml2-dev python-software-properties | |
# Install Ruby | |
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz | |
tar -xvzf ruby-2.0.0-p353.tar.gz | |
cd ruby-2.0.0-p353/ | |
./configure | |
make | |
make install | |
cd .. | |
rm -rf ruby-2.0.0-p353/ | |
rm ruby-2.0.0-p353.tar.gz | |
gem install bundler --no-ri --no-rdoc | |
# Install node.js | |
apt-add-repository ppa:chris-lea/node.js | |
apt-get -y update | |
apt-get -y install nodejs | |
# Install coffeescript | |
npm install -g coffee-script | |
# Setup users | |
adduser ubuntu | |
usermod -aG sudo ubuntu | |
# Configure ssh keys | |
echo "Upload your ssh public key" | |
echo "scp ~/.ssh/id_rsa.pub ubuntu@123.45.67.890:/home/ubuntu/" | |
read | |
mkdir /home/ubuntu/.ssh | |
mv /home/ubuntu/id_rsa.pub /home/ubuntu/.ssh/authorized_keys | |
chown -R ubuntu:ubuntu /home/ubuntu/.ssh | |
chmod 700 /home/ubuntu/.ssh | |
chmod 600 /home/ubuntu/.ssh/authorized_keys | |
# Configure SSH | |
nano /etc/ssh/sshd_config | |
service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment