Skip to content

Instantly share code, notes, and snippets.

@anoxic
Last active December 17, 2015 00:39
Show Gist options
  • Save anoxic/5522840 to your computer and use it in GitHub Desktop.
Save anoxic/5522840 to your computer and use it in GitHub Desktop.
My install commands for a new ubuntu server
#### Basic things
passwd # Update the root password
apt-get update && apt-get upgrade # Update packages and system
# Install some standard utilities
apt-get install vim zsh git tmux netcat aptitude
chsh -s /bin/zsh # Change shell to zsh
select-editor # and editor to vim
adduser brian && adduser brian sudo # Add my own user
# Disable SSH Root Login
sed "s/PermitRootLogin yes/PermitRootLogin no/" /etc/ssh/sshd_config -ix
service ssh restart
# Add ssh key
ssh-keygen -t rsa -C "brian@zick.io"
BODY="{\"title\":\"`whoami`@`hostname` `date`\",\"key\":\"`cat $HOME/.ssh/id_rsa.pub`\"\}"
curl -u "anoxic" https://api.github.com/user/keys -d $BODY
# Add dotfiles
git clone git@github.com:anoxic/dotfiles.git
cd ~/dotfiles && git submodule init && git submodule update && ./make.sh
#### Utilities etc.
# RVM
curl -L https://get.rvm.io | bash -s stable --ruby
echo -e "\n\n#RVM\nexport PATH=\$PATH:/usr/local/rvm/bin" >> /etc/profile
# Go
curl https://go.googlecode.com/files/go1.2rc2.linux-amd64.tar.gz | tar -C /usr/local -xz
echo -e "\n\n#Go Lang\nexport PATH=\$PATH:/usr/local/go/bin" >> /etc/profile
# Pip
apt-get install python-pip
# Composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin
# Ack
curl http://beyondgrep.com/ack-2.10-single-file > /usr/local/bin/ack && chmod 0755 !#:3
# Codemod
pip install git+https://github.com/facebook/codemod.git
#### LAMP Stack
# Apache, PHP, phpMyAdmin
apt-get install apache2 mysql-server php5 libapache2-mod-php5 php5-mysql phpmyadmin
echo -e "\n# Include phpMyAdmin\nInclude /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
service apache2 restart
# Wordpress:
cd /var/www && rm index.html
wget http://wordpress.org/latest.zip && unzip latest.zip && rm latest.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment