djekl
12/15/2014 - 4:02 PM

1-ubuntu-trusty-after-fresh-install.md

#!/bin/bash
echo ""
echo "Starting update and upgrade of system..."
echo "########################################"
sudo apt-get update
sudo apt-get -y upgrade

echo ""

# remove packages (and google-chrome-stable!)
echo "Purge packages..."
echo "#################"
sudo apt-get purge -y google-chrome-stable git curl make xclip skype kazam sublime-text-installer nginx php5-fpm php5-cli

echo ""

# cleanup
echo "Cleaning up after purging..."
echo "############################"
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo apt-get -y clean

echo ""

# remove PPAs
echo "Removing PPAs for PHP, Nginx, SublimeText and Google Chrome..."
echo "##############################################################"
sudo rm /etc/apt/sources.list.d/ondrej-php5-5_6-trusty*
sudo rm /etc/apt/sources.list.d/nginx-stable-trusty*
sudo rm /etc/apt/sources.list.d/webupd8team-sublime-text-3-trusty*
sudo rm /etc/apt/sources.list.d/google-chrome*

echo ""

# restore original sources.list file
echo "Restoring original /etc/apt/sources.list file..."
echo "################################################"
sudo cp /etc/apt/sources.backup /etc/apt/sources.list

echo ""

# remove google chrome
echo "Removing Google Chrome paths..."
echo "###############################"
sudo rm -f /usr/bin/google-chrome
sudo rm -f /usr/bin/google-chrome-stable
sudo rm -f /etc/alternatives/google-chrome
sudo rm -rf /opt/google
sudo rm -rf ~/.config/google-chrome

echo ""

# remove nvm paths
echo "Removing NVM..."
echo "###############"
sudo rm -rf ~/.{nvm,npm,bower}

echo ""
echo "Uninstalling complete!"
echo "#####################"
#!/bin/bash
echo ""
# enable canonical's repos
echo "Enabling Canonical's partner repository"
echo "#####################################"
sudo cp /etc/apt/sources.list /etc/apt/sources.backup
sudo sed -i "/^# deb .*partner/ s/^# //" /etc/apt/sources.list
sudo sed -i "/^# deb-src .*partner/ s/^# //" /etc/apt/sources.list

echo ""

echo "Updating system and installing Git, curl, make..."
echo "##############################################"

sudo apt-get update
sudo apt-get -y upgrade

sudo apt-get install -y git curl make

echo ""

# install node version manager
echo "Installing NVM (version manager for node.js and npm)"
echo "####################################################"
curl -s -L https://rawgit.com/creationix/nvm/v0.20.0/install.sh -o ~/install-nvm.sh
source ~/install-nvm.sh
sudo rm -f ~/install-nvm.sh

echo ""

# install git-extras
echo "Installing tj/git-extras.git"
echo "############################"
cd ~/
sudo git clone --depth 1 https://github.com/tj/git-extras.git
cd ~/git-extras && sudo make install
cd ~/ && sudo rm -rf ~/git-extras

echo ""

# install google chrome stable
echo "Installing Google Chrome (latest stable version)"
echo "################################################"
cd ~/
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i ~/google-chrome-stable_current_i386.deb
sudo rm -f ~/google-chrome-stable_current_i386*

echo ""

# add PPAs for sublime-text, nginx, php
echo "Adding PPAs for sublime, nginx and php..."
echo "#########################################"
sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo add-apt-repository -y ppa:nginx/stable
sudo add-apt-repository -y ppa:ondrej/php5-5.6

echo ""

# updating and installing from PPAs
echo "Updating system and installing sublime, nginx, etc..."
echo "#####################################################"
sudo apt-get update
sudo apt-get -y upgrade

# install sublime-text, nginx, php, skype, kazam, etc...
sudo apt-get install -y python-software-properties software-properties-common xclip skype kazam nginx php5-fpm php5-cli sublime-text-installer

echo ""
# cleanup
echo "Cleaning up..."
echo "##############"
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo apt-get -y clean

echo ""
echo "Installing complete!"
echo "####################"

Ubuntu 14.04+ 32bit (ubuntu-mate.org)

Simple steps for installing required tools after fresh Ubuntu install.
Or use installer and uninstaller scripts, they won't break anythng!!

Included

  • Licensed Sublime Text 3 (build 3065)
  • Nginx 1.6.2 (stable version)
  • PHP 5.6.3 (stable version)
  • NVM v0.20.0 (for Node.js and NPM)
  • Git v1.9.1, Curl, Make
  • Skype 4.3, Kazam, Google Chrome v39 (latest stable)

Enable Canonical's partner repos

sudo cp /etc/apt/sources.list /etc/apt/sources.backup
sudo sed -i "/^# deb .*partner/ s/^# //" /etc/apt/sources.list
sudo sed -i "/^# deb-src .*partner/ s/^# //" /etc/apt/sources.list

Basics

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y python-software-properties software-properties-common
sudo apt-get install -y skype git curl make kazam xclip
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo apt-get -y clean

Basic assets like Skype 4.3, Kazam, Git, curl and xclip. Also zip/unzip, rar/unrar utils.

Google Chrome - latest stable (i386/i686/32bit)

cd ~/
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i ~/google-chrome-stable_current_i386.deb
sudo rm -f ~/google-chrome-stable_current_i386*

Sublime Text 3 - latest build 3065

sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y sublime-text-installer
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo apt-get -y clean

If it's not licensed, you can use this valid sublime text 3 (build 3064) license - 29 August 2014

git-extras by TJ Holowaychuk

cd ~/
sudo git clone --depth 1 https://github.com/tj/git-extras.git
cd ~/git-extras && sudo make install
cd ~/ && sudo rm -rf ~/git-extras

Then you can use these git-extras commands

nvm - latest Node.js Version Manager by Tim Caswell

curl https://rawgit.com/creationix/nvm/v0.20.0/install.sh | bash

More info about see on it's readme or just type nvm --help

Install node.js & npm

nvm install v0.10.33 && nvm install v0.11.14
nvm use 0.10   # will activate 0.10.33 version
nvm use 0.11   # will activate 0.11.14 version

Or list of available node.js versions nvm ls-remote.
Then you can check versions node -v (v0.11.14) and npm -v (v2.0.0)

Nginx - latest "stable" (not "mainline") version

sudo add-apt-repository -y ppa:nginx/stable
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y nginx
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo apt-get -y clean

For configure and more info please read Digital Ocean's tutorial - nginx part

PHP 5.6 - without Apache2 / MySQL

sudo add-apt-repository -y ppa:ondrej/php5-5.6
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y php5-fpm php5-cli
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo apt-get -y clean

For configure and more info please read Digital Ocean's tutorial - php part

Check version

google-chrome --version
skype --version
kazam --version
curl --version
git --version
nvm --version
nginx -v
php -v
subl -v
node -v
npm -v

Should be nginx v1.6.2, php v5.6.3, Sublime Text Build 3065,
git v1.9.1, chrome v39.0, curl v7.35.0, skype v4.3, kazam v1.4.5,
nvm v0.20.0, npm v2.0.0 (or v1.4.28), nodejs v0.11.14 (or v0.10.33)