-
-
Save silvio-didonna/3a286aa33495ed785011 to your computer and use it in GitHub Desktop.
Bash script to install a Thingspeak server on Ubuntu Server 12.04. Raspbian (2014-01-07-wheezy-raspbian). and possibly Debian-based distros.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Automatic install of Thingspeak server on Ubuntu 12.04 / Raspbmc / Debian (?) | |
| # Updated to use ruby 2.1.4 | |
| ## Install required packages | |
| sudo apt-get update | |
| sudo apt-get -y install build-essential git mysql-server mysql-client libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libsqlite3-dev | |
| ## Install ruby | |
| wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz | |
| tar xvzf ruby-2.1.4.tar.gz | |
| cd ruby-2.1.4 | |
| ./configure | |
| make -j4 | |
| sudo make install | |
| cd .. | |
| ## Install rails | |
| echo "gem: --no-rdoc --no-ri" >> ${HOME}/.gemrc | |
| sudo gem install rails | |
| ## Install thingspeak | |
| git clone https://github.com/iobridge/thingspeak.git | |
| cp thingspeak/config/database.yml.example thingspeak/config/database.yml | |
| cd thingspeak | |
| bundle install | |
| bundle exec rake db:create | |
| bundle exec rake db:schema:load | |
| rails server |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Raspberry pi 2