Thursday, February 13, 2014

Install MongoDB on Ubuntu

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

$ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
$ sudo apt-get update

$ sudo apt-get install mongodb-10gen

$ mongo --version

Ubuntu

Build a Ubuntu System

Download Ubuntu 13.10 64 bit from:

Use UNetbootin to create a bootable USB Memory Stick with the ISO image just downloaded.

Shutdown Laptop, attach eSATA drive that will be used for Ubuntu

Reboot off the USB Memory stick (F12 at boot to get a hardware boot menu)

Install Ubuntu



Steps to Upgrade to Linux Mint 15

This process assumes you have an existing Linux installation on a disk that has enough free space to create a new partition for version 15. In this way you can boot 15 and copy over items from the other Linux environment.

  1. While running Windows 7, Download the ISO image for Linux Mint 15, 64 bit, Cinnamon from here.
  1. Use UNetbootin to create a bootable USB Memory Stick with the ISO image just downloaded.
  1. Reboot off the USB Memory stick (F12 at boot to get a hardware boot menu)
  1. Run Install Linux Mint
  1. select installation type "Something Else" in order to manage which HD and partition Mint is installed to.
  1. Reboot Mint from Hard disk
  1. Activate recommended NVidia video drivers
  1. Menu -> Preferences-> Driver Manager
  1. Apply any pending updates
  1. $ sudo apt-get update
  1. $ sudo apt-get upgrade 
  1. Using Firefox, Install Google-Chrome
  1. Download and run the 64 bit Ubuntu-Debian DEB file
  1. Note: the Google install updates software sources so later runs of apt-get upgrade will get updated versions of chrome.
  1. Install MongoDB
  1. Instructions here.
  1. Install Pycharm
  1. su
  1. mkdir /opt/pycharm
  1. cd /opt/pycharm
  1. mv /home/gbiglow/Downloads/pycharm-2.7.2.tar.gz .
  1. tar xfz pycharm-*.tar.gz
  1. rm pycharm-2.7.2.tar.gz
  1. Run pycharm.sh from the bin subdirectory
  1. do this in a shell once to see if pycharm complains about the wrong JDK
  1. note: look in following log to see if pycharm is logging any start-up errors
  1. /home/gbiglow/.PyCharm20/system/log/idea.log
  1. 'Install' Oracle JDK (pycharm wants the official Oracle one - too bad)
  1. Background
  1. Some notes on installing Oracle JDK - here.
  1. Some other notes on JDK - here (note remove OpenJDK step!)
  1. I took the KISS approach which requires manual repeats to update Oracle Java but does not screw with the official Linux Mint installed OpenJDK
  1. download jdk-7u21-linux-x64.tar.gz from Oracle
  1. expand it into /opt/java
  1. add following to ~./bashrc
  1. export PATH=/opt/java/jdk1.7.0_21/bin:$PATH
  1. Install tools using $ sudo apt-get install <tool-name>
  1. Development tools:
  1. python-pip
  1. python-virtualenv
  1. git
  1. terminator
  1. meld
  1. ipython
  1. Sys Admin tools:
  1. gparted
  1. htop
  1. hardinfo (shows in start menu as "System Information")
  1. Install Heroku Toolbelt
  1. $ sudo wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
  1. $ heroku login
  1. Fully Copy home dir from old linux installation...
  1. Fix up GRUB and Windows b


Still Todo:

Install Node.js on Ubuntu



$ sudo apt-get update

$ sudo apt-get install -y python-software-properties python g++ make

$ sudo add-apt-repository ppa:chris-lea/node.js

$ sudo apt-get update

$ sudo apt-get install nodejs

$ node -v


reference:

https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

Tuesday, February 11, 2014

Delete some default Ubuntu home dir folders

To permanently delete dirs from ~

  • music
  • pictures
  • videos


$ cd ~
$ rmdir Music Videos Pictures


/etc/xdg/user-dirs.conf (overrided by ~/.config/user-dirs.conf) - Allows you to enable or disable the automatic folder (re-)creation. If you set enabled=False, either globally of for your own user only, special folders will not be re-created at login anymore in case you delete or rename the folders.

edit /etc/xdg/user-dirs.conf so it reads as followes:

gcb@T510:/etc/xdg$ cat /etc/xdg/user-dirs.conf

# This controls the behaviour of xdg-user-dirs-update which is run on user login
# You can also have per-user config in ~/.config/user-dirs.conf, or specify
# the XDG_CONFIG_HOME and/or XDG_CONFIG_DIRS to override this
#

# 11-Feb-2014 gcb change from default of True to now be false. disable of special dirs in $HOME for all users
#enabled=True
enabled=False

# This sets the filename encoding to use. You can specify an explicit
# encoding, or "locale" which means the encoding of the users locale
# will be used
filename_encoding=UTF-8


Ubuntu, Remove crap

$ sudo apt-get purge libreoffice-*
$ sudo apt-get purge firefox*
$ sudo apt-get purge thunderbird*






List all installed packages (pipe to grep to search for a specific pattern):
$ dpkg --get-selections | grep <pattern>

remove all libreoffice packages:

$ sudo apt-get purge libreoffice-*

remove orphaned packages, i.e. installed packages that used to be installed as an dependency, but aren't any longer. Use this after removing a package which had installed dependencies you're no longer interested in:
$ sudo apt-get autoremove

see what packages are available to install matching a  pattern
$ apt-cache search <pattern>

To see all the files installed by a package like python-kivy-examples:
$ dpkg-query -L  <package name>

Change Ubuntu Devicename (Hostname)

Change the “device name” in the details window of System settings

$ sudo sed -i 's/present-host-name/new-host-name/' /etc/hosts
$ sudo sed -i 's/present-host-name/new-host-name/' /etc/hostname
$ reboot

Hmmm. attempt on the 2nd sed command failed and the /etc/hostname file was already correct. Perhaps it was changed automatically in response to the first sed.

You can check your present-host-name by
$ cat /etc/hostname
or
$ hostname