Play Raspberry Pi(4)Raspberry Pi B+ and Software Update

Play Raspberry Pi(4)Raspberry Pi B+ and Software Update

1. Install the official operation system
Download the RASPBIAN JESSIE from here
https://www.raspberrypi.org/downloads/raspbian/

Follow the first Blog
http://sillycat.iteye.com/blog/2166582

Use the UI tool to erase the disk with MS-DOC FAT32 format.

Check the disk
> diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            250.1 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +249.8 GB   disk1
                                 Logical Volume on disk0s2
                                 64D3838A-7AC0-43C9-BB1C-517280DB2593
                                 Unencrypted
/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *31.2 GB    disk2
   1:             Windows_FAT_32 NO NAME                 31.2 GB    disk2s1

Unmount the disk
> sudo diskutil unmount /dev/disk2s1

Write file to the disk
> sudo dd if=2015-05-05-raspbian-wheezy.img of=/dev/disk2 bs=2m

Then, we can use keyboard and monitor to start the computer and set up the SSH and network.

Set up Latest Node ENV
Use the version http://nodejs.org/dist/v0.12.7/

Try to compile and install the package
> ./configure --prefix=/home/carl/tool/node-v0.12.7

>make
>make install
Check the version after that
> node --version && npm --version
v0.12.7
2.11.3

Java Env are there
> java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)

Python Env are there
> python -V
Python 2.7.3

Mongo DB Env
http://sillycat.iteye.com/blog/2155801

http://sillycat.iteye.com/blog/2066225

http://sillycat.iteye.com/blog/2065123

http://sillycat.iteye.com/blog/1965857

To install on raspberry, since it is Debian, I choose the Debian version.
> wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian71-3.0.7.tgz

Unzip it and place it in the right directory. Add the file to the path, but it seems that the command does not work.
Try the generic linux version
> wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.7.tgz

It does not work.

Check the source codes from here https://fastdl.mongodb.org/src/mongodb-src-r3.0.7.tar.gz?_ga=1.77026064.465631442.1447176269

https://docs.mongodb.org/manual/contributors/tutorial/build-mongodb-from-source/

vi docs/building.md

Prepare Tools
> sudo apt-get install scons

> scons --version
SCons by Steven Knight et al.:
script: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
engine: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
engine path: ['/usr/lib/scons/SCons']
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation

Fails
> scons all
scons: Reading SConscript files ...
SCons 2.3 or greater required, but you have SCons 2.1.0

Try Install latest scons
wget http://iweb.dl.sourceforge.net/project/scons/scons/2.4.0/scons-2.4.0.tar.gz

Unzip the file and Install with following command
> sudo python setup.py install

> sudo ln -s /usr/local/bin/scons /usr/bin/scons

Great
> scons --version
SCons by Steven Knight et al.:
script: v2.4.0.rel_2.4.0:3365:9259ea1c13d7, 2015/09/21 14:03:43, by bdbaddog on hpmicrodog
engine: v2.4.0.rel_2.4.0:3365:9259ea1c13d7, 2015/09/21 14:03:43, by bdbaddog on hpmicrodog
engine path: ['/usr/local/lib/scons-2.4.0/SCons']
Copyright (c) 2001 - 2015 The SCons Foundation

Fail to build, because fail to meet the requirement
> scons all
scons: Reading SConscript files ...
Mkdir("build/scons")
scons version: 2.4.0
python version: 2 7 3 'final' 0
Checking whether the C++ compiler works... yes
Checking whether the C compiler works... yes
Checking if C++ compiler "g++" is GCC... yes
Checking if C compiler "gcc" is GCC... yes
Checking if C compiler is GCC 4.8.2 or newer...no
Checking if C++ compiler is GCC 4.8.2 or newer...no
ERROR: Refusing to build with compiler that does not meet requirements

Upgrade the C Compiler and C++ Compiler
> sudo apt-get install gcc-4.8 g++-4.8

Remote and relink the command
> sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc

> sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++

At least the latest mongoDB is not supported on my raspberry
Unsupported architecture: armv7l:

References:
http://sillycat.iteye.com/blog/2166582
http://sillycat.iteye.com/blog/2169096
http://sillycat.iteye.com/blog/2173417

File download place
https://www.raspberrypi.org/downloads/raspbian/

你可能感兴趣的:(Play Raspberry Pi(4)Raspberry Pi B+ and Software Update)