Skip to content

Instantly share code, notes, and snippets.

@andrewslince
Last active June 6, 2016 13:35
Show Gist options
  • Save andrewslince/5524263 to your computer and use it in GitHub Desktop.
Save andrewslince/5524263 to your computer and use it in GitHub Desktop.
This script installs the softwares: Skype, JDK (Java Development Kit), Google Chrome, Sublime Text 3, Terminator, Git, GitK, PHP5, cURL, PHPUnit, Apache Server, enable mod_rewrite for Apache (For clean url use), MySql Server, PHPMyAdmin, Vim, Gimp, Generates SSH Key (OBS.: replace "<your_email>" by your real e-mail), Oracle Virtualbox
#!/bin/bash
clear
echo "Please enter your e-mail:"
read email
# install google chrome
sudo apt-get install libcurl3 libnspr4-0d libxss1 -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*; rm google-chrome*
sudo apt-get -f install
# adding packages for skype
sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
# adding packages for jdk
sudo add-apt-repository ppa:webupd8team/java -y
# adding packages for sublime text 3...
sudo add-apt-repository ppa:webupd8team/sublime-text-3 -y
# update softwares repositories
sudo apt-get update
# starting installation softwares
sudo apt-get install unrar virtualbox terminator curl sublime-text-installer skype vim gimp php5-memcached git gitk php5 php5-curl php5-gd phpunit apache2 mysql-server php5-mysql phpmyadmin oracle-java7-installer -y
# create projects directory
sudo mkdir -p /var/www
sudo chown $USER:www-data /var/www -R
# create simbolic link for phpmyadmin in /var/www/
cd /var/www
sudo ln -s /usr/share/phpmyadmin .
# generates ssh key
ssh-keygen -t rsa -C "$email"
# configuring git
user_full_name=$(getent passwd `whoami` | cut -d ':' -f 5 | cut -d ',' -f 1)
# configuring git >> user
git config --global user.name "$user_full_name"
git config --global user.email "$email"
# configuring git >> color (global)
git config --global color.branch "auto"
git config --global color.diff "auto"
git config --global color.status "auto"
git config --global color.interactive "auto"
# configuring git >> color >> branch
git config --global color.branch.current "yellow reverse"
git config --global color.branch.local "yellow"
git config --global color.branch.remote "green"
# configuring git >> color >> diff
git config --global color.diff.meta "yellow bold"
git config --global color.diff.frag "magenta bold"
git config --global color.diff.old "red"
git config --global color.diff.new "green"
# configuring git >> color >> status
git config --global color.status.added "yellow"
git config --global color.status.changed "green"
git config --global color.status.untracked "cyan"
# install sublime text plugins
mkdir -p ~/.config/sublime-text-3/Packages/
cd ~/.config/sublime-text-3/Packages/
# plugins
git clone git://github.com/wbond/sublime_package_control.git "Package Control"
git clone git://github.com/jisaacks/GitGutter.git
git clone git://github.com/subhaze/CSS-Extended.git
git clone git://github.com/titoBouzout/SideBarEnhancements.git
git clone https://github.com/spadgos/sublime-jsdocs.git DocBlockr
git clone https://github.com/nathos/sass-textmate-bundle.git SassTextmate
git clone https://github.com/randy3k/AlignTab.git
# theme
git clone https://github.com/pyoio/monokai-spacegray.git "Monokai - Spacegray"
# configuring sublime text preferences
echo '{
"color_scheme": "Packages/Monokai - Spacegray/Monokai - Spacegray.tmTheme",
"show_encoding": true,
"rulers": [ 80, 120 ],
"highlight_line": true,
"translate_tabs_to_spaces": true,
"ignored_packages":
[
"Vintage"
]
}' > User/Preferences.sublime-settings
# apache config
# enable apache mod_rewrite
sudo a2enmod rewrite
# enable apache mod_proxy_http (reverse proxy)
sudo a2enmod proxy_http
# restart apache server to apply changes
sudo service apache2 restart
# sets "vim" as default editor
sudo sh -c 'echo "\nexport EDITOR='vim'\nexport VISUAL='vim'" >> /etc/bash.bashrc'
# display hidden files by default
sudo sh -c 'echo "\nalias ls=\"ls -a\"" >> ~/.bashrc'
source ~/.bashrc
# install composer
curl -sS https://getcomposer.org/installer | sudo php -- --filename=composer --install-dir=/usr/local/bin
# install nodejs
# downloading nodejs
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
# install npm
sudo apt-get install -y build-essential
# fixing npm permissions
echo prefix = ~/.node >> ~/.npmrc
echo 'export PATH=$HOME/.node/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
# install grunt-cli (global command)
npm install -g grunt-cli
# setting watch of grunt
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
# install sass
sudo apt-get install -y ruby-full
sudo su -c "gem install sass"
@diasalexandre
Copy link

Its make my life better, but doesn't work in Ubuntu 16.04

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