Flash the memory of the raspberry : https://www.udemy.com/rpi-full-stack/learn/v4/t/lecture/3109460?start=555
Get into the raspberry / ssh [email protected]
- Download these bash files:
wget http://german-cv.com/irrigation/setup.sh && wget http://german-cv.com/irrigation/git-pull-repository.sh && wget http://german-cv.com/irrigation/git-sshkey-setup.sh
2. sh setup.sh
3. sh git-sshkey-setup.sh
4. sh git-pull-repository.sh
1. setup.sh
2. git-sshkey-setup.sh
3. git-pull-files.sh
#!/bin/bash
clear
echo "The script starts now."
sudo apt-get update
echo "Installing Linux appt: build-essential npm git tree vim raspi-config"
sudo apt-get install -y build-essential npm git tree vim raspi-config
echo "Downloading nodejs"
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
sudo rm node_latest_armhf.deb
sudo su
sudo npm install -y rpi-gpio cron twilio express --save
sudo npm install express-generator -g
echo
echo "::::::: DONE :::::::"
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Creating keypair"
ssh-keygen -t rsa -b 4096 -C "[email protected]"
vim ~/.ssh/id_rsa.pub
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
echo "Copies the contents of the id_rsa.pub file to your clipboard"
echo "In the upper-right corner of any page, click your profile photo, then click Settings."
echo "In the user settings sidebar, click SSH and GPG keys."
echo "Click New SSH key or Add SSH key."
echo "go to https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/"
echo "And follow the instructions"
#!/bin/bash
git init
git config --global user.name "German Gonzalez"
git config --global user.email [email protected]
git remote add origin [email protected]:germancin/irrigation-pi-js.git
git pull origin master
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
ls
Flash the memory of the raspberry : https://www.udemy.com/rpi-full-stack/learn/v4/t/lecture/3109460?start=555
Get into the raspberry / ssh [email protected]
sudo apt-get update
sudo apt-get install -y build-essential npm git tree vim raspi-config
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
sudo rm node_latest_armhf.deb
sudo su
sudo npm install -y rpi-gpio cron twilio express --save
sudo npm install express-generator -g
express forlder_project_name
cd forlder_project_name
sudo npm install
chmod 777 /etc/rc.local
vim /etc/rc.local
sudo node /home/pi/index.js
sudo chmod u+x /etc/rc.local
Note: Add commands below the comment, but leave the line exit 0 at the end, then save the file and exit.
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
https://github.com/germancin/irrigation-pi-js/wiki/Static-IP-for-Raspberry.