Last active
August 29, 2015 14:21
-
-
Save rhpaiva/c3d2da5073b1c750d89f to your computer and use it in GitHub Desktop.
Steps to setup a new computer for web development based on ubuntu and docker
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
#!/usr/bin/env bash | |
# ================================================================= | |
# Steps to setup a new computer for web development based on ubuntu | |
# ================================================================= | |
# vars | |
downloads_dir=~/Downloads | |
chrome_file='google-chrome-stable_current_amd64.deb' | |
skype_file='skype-ubuntu-precise_4.3.0.37-1_i386.deb' | |
phpstorm_file='PhpStorm-8.0.3.tar.gz' | |
phpstorm_dir='/opt/jetbrains' | |
# make bash colored | |
sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/g' ~/.bashrc | |
source ~/.bashrc | |
# cause aptitude rules! | |
sudo apt-get install aptitude | |
sudo aptitude -y update | |
# console package manager | |
sudo aptitude -y install gdebi | |
# other tools | |
sudo aptitude -y install git htop colordiff terminator vim whois tree jq | |
# ================================================================= | |
# Useful apps | |
# ================================================================= | |
# download and install chrome | |
wget "https://dl.google.com/linux/direct/${chrome_file}" "${downloads_dir}" | |
sudo gdebi "${downloads_dir}/${chrome_file}" | |
rm "${downloads_dir}/${chrome_file}" | |
# download and install skype | |
wget "http://download.skype.com/linux/${skype_file}" "${downloads_dir}" | |
sudo gdebi "${downloads_dir}/${skype_file}" | |
rm "${downloads_dir}/${chrome_file}" | |
# for skypes proper cursor and display skype on the system tray | |
sudo aptitude -y install libxcursor1:i386 sni-qt:i386 | |
# ================================================================= | |
# PHPStorm | |
# ================================================================= | |
# for phpstorm (we also need java) | |
sudo aptitude -y install default-jre default-jdk | |
wget "http://download-cf.jetbrains.com/webide/${phpstorm_file}" "${downloads_dir}" | |
sudo mkdir "${phpstorm_dir}" | |
sudo mv "${downloads_dir}/${phpstorm_file}" "${phpstorm_dir}" | |
cd "${phpstorm_dir}" | |
tar -xf "${phpstorm_file}" | |
sudo rm "${phpstorm_file}" | |
# finalizes the installation | |
./$(ls)/bin/phpstorm.sh & | |
# ================================================================= | |
# Docker | |
# ================================================================= | |
# add the key from docker's repo to apt-key to verify packages | |
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" | |
# add the repo to apt's sources | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" | |
# install docker and a syntax for vim | |
sudo aptitude -y install lxc-docker vim-syntax-docker | |
# install docker-compose | |
sudo sh -c 'curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose' | |
sudo chmod +x /usr/local/bin/docker-compose | |
# install command completion for compose | |
sudo sh -c 'curl -L https://raw.githubusercontent.com/docker/compose/1.2.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose' | |
# ================================================================= | |
# Services (ideally go into docker containers) | |
# ================================================================= | |
# for quick tests | |
sudo aptitude install php5-cli | |
# memcache | |
#sudo aptitude install memcached | |
# PHP 5 with php-fpm | |
#sudo aptitude install php5-cli php5-fpm | |
# PHP 5 extensions | |
#sudo aptitude install php5-gd php5-curl php5-json php5-mcrypt php5-memcached php5-mysql php5-xdebug | |
# mysql and a query monitor | |
#sudo aptitude install mysql-server mytop | |
# ruby and sass | |
#sudo aptitude install ruby | |
#sudo gem install sass | |
# ================================================================= | |
# PHP Env & Config | |
# ================================================================= | |
# composer related stuff | |
#curl -sS https://getcomposer.org/installer | php | |
#sudo mv composer.phar /usr/local/bin | |
#sudo ln -s /usr/local/bin/composer.phar /usr/local/bin/composer | |
#composer install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment