Difference between revisions of "Install Amahi 7 on a Raspberry Pi"

From Amahi Wiki
Jump to: navigation, search
m
Line 26: Line 26:
  
 
* some Ruby gems will not install without some manual work before.
 
* some Ruby gems will not install without some manual work before.
* scrypt gem has been remove because of this issues:- https://github.com/pbhogan/scrypt/issues/23
+
* scrypt gem has been remove because of this issues:- <nowiki>https://github.com/pbhogan/scrypt/issues/23</nowiki>
 
* Nokogiri the An HTML, XML, SAX, & Reader parser with the ability to search documents via XPath. must use '--use-system-libraries'.
 
* Nokogiri the An HTML, XML, SAX, & Reader parser with the ability to search documents via XPath. must use '--use-system-libraries'.
  
 
=Requirements=
 
=Requirements=
* A copy of Pidora-2014-R2-1 can be download from the Raspberry download website. http://www.raspberrypi.org/downloads/
+
* A copy of Pidora-2014-R2-1 can be download from the Raspberry download website. <nowiki>http://www.raspberrypi.org/downloads</nowiki>
 
* A Raspberry Pi model b or b+.
 
* A Raspberry Pi model b or b+.
 
* A 8GB SD card or bigger.
 
* A 8GB SD card or bigger.
Line 36: Line 36:
  
 
=Installation=
 
=Installation=
    Installing Pidora image on to a SD card.
+
===Installing Pidora image on to a SD card.===
  
The easiest way to install the Pidora is to use the win32 disk imager program. download form here http://sourceforge.net/projects/win32diskimager/
+
The easiest way to install the Pidora is to use the win32 disk imager program. download form here <nowiki>http://sourceforge.net/projects/win32diskimager</nowiki>
  
 
Needed:
 
Needed:
Line 50: Line 50:
 
# Check the 'Device' to see if the correct letter that corresponds to your SD card letter.
 
# Check the 'Device' to see if the correct letter that corresponds to your SD card letter.
 
# Click on 'Write'.
 
# Click on 'Write'.
 
[[File:Win32DiskImager.jpg|frame]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
  
 +
::[[File:Win32DiskImager.jpg|caption]]
  
 
When Win32 Disk imager has finished place the SD card in the Raspberry Pi.
 
When Win32 Disk imager has finished place the SD card in the Raspberry Pi.
  
    SD Card Installation Using the dd Command.
+
===SD Card Installation Using the dd Command===
  
 
The image can also be installed using the Unix/Linux dd command.
 
The image can also be installed using the Unix/Linux dd command.
Line 81: Line 66:
 
* An Internet connection.
 
* An Internet connection.
  
<!---->
 
  
    [[File:Important.png|35px||caption]]
+
:[[File:Important.png|35px|left]] Danger of Data Loss / System Damage The selected device will be overwritten. If you select the wrong device, you may lose data. Exercise care when using dd.
Danger of Data Loss / System Damage The selected device will be overwritten. If you select the wrong device, you may lose data. Exercise care when using dd.
 
  
 
Steps:
 
Steps:
Line 98: Line 81:
 
# Remove the card.
 
# Remove the card.
  
 
+
===Complete the Pidora welcome screen===
    Complete the Pidora welcome screen.
 
  
 
# Set user name.
 
# Set user name.
Line 109: Line 91:
 
# Set interface as text.
 
# Set interface as text.
  
let Pidora finish installing and reboot this completes the Pidora install
 
  
[[File:Pidora-Welcome-Screen.jpg|frame]]
+
::[[File:Pidora-Welcome-Screen.jpg|caption]]
  
 +
let Pidora finish installing and reboot this completes the Pidora install
  
 
+
===Install Amahi 7 core platform===
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    Install Amahi 7 core platform  
 
 
# login as root.
 
# login as root.
 
##enter the root password (not the one from the first user)
 
##enter the root password (not the one from the first user)
Line 144: Line 106:
 
# exit the root user and use a regular user. you will need to reinstall fedora if you skip this step.
 
# exit the root user and use a regular user. you will need to reinstall fedora if you skip this step.
 
# we suggest you create a new folder to put the amahi development code, then in it run:
 
# we suggest you create a new folder to put the amahi development code, then in it run:
# <code>git clone https://github.com/mattman73/platform.git</code>
+
# <code>git clone <nowiki>https://github.com/mattman73/platform.git</nowiki></code>
 
# <code>cd platform</code>
 
# <code>cd platform</code>
 
# <code>bundle config build.nokogiri --use-system-libraries</code>
 
# <code>bundle config build.nokogiri --use-system-libraries</code>
Line 155: Line 117:
 
# <code>rake db:seed</code>            (this will get a basic database setup)
 
# <code>rake db:seed</code>            (this will get a basic database setup)
 
# rails s                            (this will start the rails server)
 
# rails s                            (this will start the rails server)
 +
  
 
The development dashboard can be reached with your favorite browser at:
 
The development dashboard can be reached with your favorite browser at:
  
  <code>http://localhost:3000</code>
+
<code><nowiki>http://localhost:3000</nowiki></code>
  
 
There is an initial user created called <code>admin</code> with password <code>admin</code>. Login should work out of the box.
 
There is an initial user created called <code>admin</code> with password <code>admin</code>. Login should work out of the box.

Revision as of 02:02, 14 August 2014


Msgbox-WOPr.png Work In Progress
This article is currently undergoing major expansion or restructuring. You are welcome to assist by editing it as well. If this article has not been edited in several days, please remove this template.


This page is being edited actively and a lot of sections are missing currently; feel free to help improving it.

Current state

Amahi can be installed and running under development on a Raspberry Pi. I have only managed to get the core platform running so there are no applications tested.

This page describes how to get things working. Note that due to the immature state of the code installing it is mainly interested for people who want to get a feeling of it, help in testing and resolving issues.

Known Issues

Feel free to add issues here. If you add an issue an email to the amahi developers list with a more detailed description and/or a bug report in our bugzilla is also greatly appreciated.

  • some Ruby gems will not install without some manual work before.
  • scrypt gem has been remove because of this issues:- https://github.com/pbhogan/scrypt/issues/23
  • Nokogiri the An HTML, XML, SAX, & Reader parser with the ability to search documents via XPath. must use '--use-system-libraries'.

Requirements

  • A copy of Pidora-2014-R2-1 can be download from the Raspberry download website. http://www.raspberrypi.org/downloads
  • A Raspberry Pi model b or b+.
  • A 8GB SD card or bigger.
  • A PC to copy the Pidora image onto the SD card.

Installation

Installing Pidora image on to a SD card.

The easiest way to install the Pidora is to use the win32 disk imager program. download form here http://sourceforge.net/projects/win32diskimager

Needed:

  • A computer with at least 5 GB of free disk space, running Windows 7.
  • An SD or SDHC card, with a capacity of 4GB or more. (Good-quality class 4 cards usually work well). You may use a MicroSD card with an adapter.
  • An SD/SDHC card writer, either built in to the computer or connected to a USB port.


Run the win32 disk imager.

  1. Click the folder icon, locate the Pidora-2014-R2-1.img file that you download early.
  2. Check the 'Device' to see if the correct letter that corresponds to your SD card letter.
  3. Click on 'Write'.


caption

When Win32 Disk imager has finished place the SD card in the Raspberry Pi.

SD Card Installation Using the dd Command

The image can also be installed using the Unix/Linux dd command.

Needed:

  • A computer with at least 5 GB of free disk space, running some form of Unix or Linux.
  • An SD or SDHC card, with a capacity of 2GB or more. (Good-quality class 4 cards usually work well).
  • An SD/SDHC card writer, either built in to the computer or connected to a USB port.
  • An Internet connection.


Important.png
Danger of Data Loss / System Damage The selected device will be overwritten. If you select the wrong device, you may lose data. Exercise care when using dd.

Steps:

  1. Download the image.
  2. Decompress the image with a Zip-compatible program such as "unzip" (Linux).
  3. Insert your SD/SDHC card into the card reader, and attach to the computer if necessary.
  4. Identify the device node of the SD card (this will be something like /dev/sdc or /dev/mmcblk0).
    • Do not use a partition device node (for example: use /dev/sdc or /dev/mmcblk0, not /dev/sdc1 or /dev/mmcblk0p1).
    • An easy way to identify the card is to list the device nodes (ls -l /dev/sd* /dev/mmcblk*) before and after inserting the SD card. Device nodes that that appear when the card is inserted correspond to the card.
  5. Ensure that the device is unmounted.
  6. Copy the image file to the card: dd if=NameOfImageFile of=/dev/DeviceNode bs=4M. Note that a block size (bs) of 4MB is used. Most SD cards have an erase block size of 4MB and if you do not include this parameter, the image will be copied at extremely slow speeds. On UNIX systems, such as Mac OS X, the bs parameter needs lowercase units (e.g. bs=4m)
  7. Ensure that the image is fully written onto the card: sync
  8. Remove the card.

Complete the Pidora welcome screen

  1. Set user name.
  2. Set location.
  3. Set root password.
  4. Set location.
  5. Do not set a swap file.
  6. Set hostname (leave as default).
  7. Set interface as text.


caption

let Pidora finish installing and reboot this completes the Pidora install

Install Amahi 7 core platform

  1. login as root.
    1. enter the root password (not the one from the first user)
    2. yum groupinstall 'Development Tools', or for a shorter install do:
      • yum -y install make git mysql-devel sqlite-devel mysql-server gcc-c++ tar rpm-build
      • yum -y install ruby ruby-devel libxml2-devel libxslt-devel
    3. systemctl start mysqld.service
    4. gem install bundler
  2. exit the root user and use a regular user. you will need to reinstall fedora if you skip this step.
  3. we suggest you create a new folder to put the amahi development code, then in it run:
  4. git clone https://github.com/mattman73/platform.git
  5. cd platform
  6. bundle config build.nokogiri --use-system-libraries
  7. bundle install (this will take a while and install all the necessary gems)
  8. rake db:create this will ask for the mysql root password with a prompt ">"
    • if this is a fresh install, your mysql server probably does not have a password, so just press Enter
    • if you set a password for the mysql root user, type it. Note that it will show a warning and echo the password!
    • if you are re-running this step and the db is already created, you can run rake db:drop first then create it again
  9. rake db:migrate (this will get the database up to snuff)
  10. rake db:seed (this will get a basic database setup)
  11. rails s (this will start the rails server)


The development dashboard can be reached with your favorite browser at:

http://localhost:3000

There is an initial user created called admin with password admin. Login should work out of the box.

To stop the development server, just hit Ctrl+C in the terminal where you started the server.