Monday, October 5, 2015

Clean Installation of Raspbian on Raspberry PI 2

Note: this posting outlines the steps to load the Sept 2015 version of Raspbian known as "Jessie". It assumes you are using Windows to create the boot media for the PI.

Download last OS image ZIP file from:
https://www.raspberrypi.org/downloads/raspbian/

Extract the image file from the downloaded ZIP file.
On Windows, I prefer 7-Zip for this step from http://www.7-zip.org/.

Write the image to an SD card as explained on: https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
(Note I do NOT run Win32DiskImager as administrator. Why run things as admin if it does not require it)

Boot the PI

Initial Setup

  • Menu - Preferences - Raspberry Pi Configuration
  • Localisation: set time zone=America, Vancouver, set locale=Country=Canada, set keyboard=United States, English (US)
  • System, Filesystem, Expand Filesystem
  • Boot to CLI
  • Uncheck "Auto Login as user 'pi"', (note: def PW='raspberry', we will change that below)

Update PI software

  • $ sudo apt-get update
  • $ sudo apt-get upgrade



Configure the PI to
  • allow for SSH connection to it can run without a monitor, keyboard, and mouse.
  • have a fixed IP address















Tuesday, September 1, 2015

Raspberry Pi - set static IP address

Set a static IP address on a Raspberry Pi 2 so I can connect to the same address all the time using Putty on Windows.

Editing /etc/network/interfaces seems to no longer work.

One needs to edit /etc/dhcpcd.conf

see:



    Install Pycharm on Ubuntu

    Download gz file from http://www.jetbrains.com/pycharm/download/

    INSTALLATION INSTRUCTIONS
    • Copy the pycharm-*.tar.gz to the desired installation location
      (make sure you have rw permissions for that directory)
    • Unpack the pycharm-*.tar.gz using the following command:
      tar xfz pycharm-*.tar.gz
    • Remove the pycharm-*.tar.gz to save disk space (optional)
    • Run pycharm.sh from the bin subdirectory
    NOTE: PyCharm on Linux doesn't need special installation or running any installation script. It runs out of the pycharm-*.tar.gz

    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