Skip to content

Instantly share code, notes, and snippets.

@42Factory
Forked from silvio-didonna/thingspeak-install2.sh
Last active May 16, 2020 16:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 42Factory/1911cd2832174c7ed690 to your computer and use it in GitHub Desktop.
Save 42Factory/1911cd2832174c7ed690 to your computer and use it in GitHub Desktop.
Bash script to install Thingspeak server on Raspberry Pi running Raspbian.
#!/bin/bash
# Install Thingspeak server on Raspberry Pi running Raspbian.
# Based on work of Andrew Bythell <abythell@ieee.org> and Silvio <tnw513>
# Install required packages
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential mysql-server mysql-client libmysqlclient-dev
sudo apt-get -y install libxml2-dev libxslt-dev git-core curl rubygems
sudo apt-get -y install ruby2.1 ruby2.1-dev
## Install thingspeak
git clone https://github.com/iobridge/thingspeak.git
cd thingspeak
gem install minitest -v '4.7.5'
gem install json -v '1.8.1'
gem install bundler
bundle install
cp config/database.yml.example config/database.yml
rake db:create
rake db:schema:load
rails server webrick
@gtmprkshrb
Copy link

Please add this before sudo apt-get update

sudo apt-add-repository ppa:brightbox/ruby-ng

@amrithmmh
Copy link

will this work for raspbian stretch?

@maximeh2
Copy link

maximeh2 commented Mar 7, 2020

Hello, thank you for this script, with a little work I managed to install thingspeak on a pi 3, to get there you have to do a lot more things on the ruby side because if you use the automatic side it doesn't work anymore.

@ gtmprkshrb this apt-add-repository is not compatible with pi it is intended for unbuntu unfortunately.

Thanks a lot and maybe see you soon

@maximeh2
Copy link

maximeh2 commented Mar 9, 2020

Hello, thank you for this script, with a little work I managed to install thingspeak on a pi 3, to get there you have to do a lot more things on the ruby side because if you use the automatic side it doesn't work anymore.

@ gtmprkshrb this apt-add-repository is not compatible with pi it is intended for unbuntu unfortunately.

Thanks a lot and maybe see you soon

@zoomx
Copy link

zoomx commented May 16, 2020

Can you share how you made it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment