-
Notifications
You must be signed in to change notification settings - Fork 0
/
iot-artik.sh
78 lines (47 loc) · 1.19 KB
/
iot-artik.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade -y
clear
echo "system updated"
sleep 3
#installing arduino conection
sudo apt-get install curl -y
if [ ! -f /home/ubuntu/adbd ]; then
curl downloads.arduino.cc/libArduino/install_artik_prereq.sh | sh
fi
clear
echo "arduino connection installed"
sleep 3
sudo apt-get update
sudo apt-get install aptitude -y
sudo apt-get install nodejs-legacy -y
sudo apt-get install npm -y
sudo apt-get update
sudo npm install -g npm@4.x
sudo npm install -g --unsafe-perm node-red
sudo npm install -g grunt-cli
clear
echo "nodejs and node-red installed"
sleep 3
#installing plugins node-red
sudo npm -g install node-red-contrib-artik
sudo npm -g install node-red-contrib-artik-cloud
#sudo npm -g install node-red-contrib-dashboard
sudo npm -g install node-red-dashboard
clear
echo "node-red plugins installed"
sleep 3
#autoremove and update
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get update
clear
echo "last update"
sleep 2
#install python packages
sudo pip install paho-mqtt
echo " Python packages installed. Testing..."
sudo python -c "import paho.mqtt.client as mqtt; print('if not error, its ok')"
sleep 1
echo "finished"
sleep 10