Last active
August 29, 2015 14:14
-
-
Save teos0009/a0c4e82597b7df424455 to your computer and use it in GitHub Desktop.
This file contains 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
#have to physically connected to the respective AP to use | |
#T931 cloud thingSpeak1: 172.16.114.166 | |
#http://172.16.114.166:3000 | |
#T1662 thingspeak server: 192.168.1.117:3000 | |
//---error with apt-get---- | |
#remove deb with Failed cond via comment # | |
sudo nano /etc/apt/sources.list | |
/----list sw to a file-- | |
dpkg --get-selections > sw_list.txt | |
//-------------------- | |
https://github.com/iobridge/thingspeak | |
//----add diff repo------- | |
#chk ubuntu ver | |
lsb_release -sc | |
#need this b4 apt add | |
sudo apt-get install software-properties-common | |
sudo apt-get install python-software-properties | |
#add repo | |
sudo nano /etc/apt/sources.list | |
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main | |
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main | |
//============== | |
//--fix BADSIG from apt-get update | |
cd /var/lib/apt | |
sudo mv lists lists_bu | |
sudo mkdir -p lists/partial | |
sudo apt-get clean all | |
sudo apt-get update | |
//----git to use https instead because during bundle install failed | |
git config --global url."https://".insteadOf git:// | |
//---gem for jquery installed failed------- | |
gem install jquery-ui-rails -v '5.0.0' | |
//=========== | |
#do not use aptget to install ruby | |
#!/bin/bash | |
# Install Thingspeak server on Ubuntu 12.04 LTS with rvm. | |
# Andrew Bythell <[email protected]> | |
# Install required packages | |
## upgrade have conflict in /etc/issues, proceed with maintainer's ver | |
sudo apt-get -y upgrade | |
#install mysql root:root | |
sudo apt-get -y install build-essential mysql-server mysql-client libmysqlclient-dev | |
#install rubygems | |
sudo apt-get -y install libxml2-dev libxslt-dev git-core curl rubygems | |
#alt rubygems | |
sudo apt-get install libxml2-dev libxslt-dev git-core curl rubygems | |
#alt rubygems u14.04 | |
sudo apt-get install libxml2-dev libxslt-dev git-core curl ruby | |
sudo apt-get install rubygems-integration | |
## Install rvm | |
#err-> gpgkeys: HTTP fetch error 7: couldn't connect: Network is unreachable | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | |
#new gpg sig | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
#gpg sig alt that works | |
command curl -sSL https://rvm.io/mpapis.asc | gpg --import - | |
#add pubkey manually for rvm | |
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com D39DC0E3 | |
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 409B6B1796C275462A1703113804BB82D39DC0E3 | |
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 40976EAF437D05B5 | |
#with port80 added; doesnt work | |
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com:80 D39DC0E3 | |
#get rvm | |
\curl -sSL https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
#The following packages cannot be authenticated!libsigsegv2 libgdbm-dev(solved with ap-get update mod) | |
rvm install ruby-2.1.0 | |
#alt cmd | |
rvm install 2.1 | |
#git to use https instead because during bundle install failed | |
git config --global url."https://".insteadOf git:// | |
### 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' | |
bundle install | |
#bundle install --verbose ##to see output of bundle install | |
#cp then cfg the db params | |
cp config/database.yml.example config/database.yml | |
#create mysql db for thingspeak via ruby; pwd muz match for mysql db | |
rake db:create | |
rake db:schema:load | |
#start thingspeak server | |
rails server | |
//===== | |
#start ts server after reboot | |
source ~/.rvm/scripts/rvm | |
rails server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment