Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

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

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

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