Skip to content
Vasilis Georgitzikis edited this page Aug 2, 2013 · 18 revisions

Ubuntu 12.04 Installation Instructions

Pre-installation

After installing ubuntu 12.04, first of all you should update your package definitions and upgrade your software.

sudo apt-get update

sudo apt-get upgrade

Installation

Download the debian package we have prepared for you

https://www.dropbox.com/s/iozqyk6w3net0ao/codebender-arduino-compiler_1.0_all.deb

Install the package:

sudo dpkg -i codebender-arduino-compiler_1.0_all.deb

The system will complain about missing dependencies. That is completely normal. To take care of dependencies, and start the installation procedure, execute:

sudo apt-get install -f

During the installation, you will be asked to edit some configs. The only ones that you should need to change are the arduino_core_files_dir, arduino_library_files_dir and auth_key. In the first one, enter the folder where you will save your Arduino core files (see Downloading Arduino Cores and Libs). In the second one, write a unique string that you will use for authorization.

That's it! Try out the compiler. Go to

http://your_servers_ip_address/compiler/status

You should get the following:

{""success":true,status":"OK"}

PHPUnit Setup (optional)

If you want to use PHPUnit to run unit tests on the command line, or using the compiler's testing API (more info on that in the Compiler API page), you'll need to install PHPUnit. In ubuntu 12.04, you'll need to run the following commands.

sudo apt-get install phpunit
sudo pear upgrade pear
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover pear.symfony.com
sudo pear install --alldeps phpunit/PHPunit

Try it out:

phpunit --version

Enable development mode (Optional)

If you want to be able to use the development mode and access debug info from Symfony, then open

/opt/codebender/codebender-arduino-compiler/Symfony/web/app_dev.php

and comment out these two lines at the beginning of the file

header('HTTP/1.0 403 Forbidden');

exit('You are not allowed to access this file. Check '.basename(FILE).' for more information.');

Mac OS X Installation Instructions

Coming when it's ready.

Extra

Auto-configuration on Ubuntu 12.04

The debian package will run symfony's composer configuration script, which will configure Symfony's directory, and will ask you for the necessary configuration parameters for your installation. If you want to completely automate your installation process (i.e. to deploy compilation servers automatically), you'll need to create the necessary parameters.yml file in the Symfony app/config directory (/opt/codebender/codebender-arduino-compiler/Symfony/app/config/parameters.yml) before installing the package.

Downloading Arduino Cores and Libs

You'll need to download the arduino-core-filesas well as the arduino-library-files projects from GitHub and put them on the paths you provided above (default is /opt/codebender/codebender-arduino-core-files and /opt/codebender/codebender-arduino-library-files).

After that, you need to change permissions to the directory, so the compiler can create the output files

chmod -R 777 /path/to/arduino/core/files chmod -R 777 /path/to/arduino/library/files

Clone this wiki locally