This repository was archived by the owner on Oct 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
55 lines (47 loc) · 1.43 KB
/
install.sh
File metadata and controls
55 lines (47 loc) · 1.43 KB
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
#!/bin/bash
# Prequisites
sudo apt update && sudo apt upgrade -y
sudo apt install -y vim git python3 python3-venv python3-pip wget htop tmux cron
# install IPFS daemon
wget https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz
tar -xvzf go-ipfs_v0.6.0_linux-amd64.tar.gz
cd go-ipfs
sudo bash install.sh
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/5050
ipfs init
cd ..
# install Robonomics
wget https://github.com/airalab/robonomics/releases/download/v0.24.0/robonomics-ubuntu-0.24.0-x86_64.tar.xz
tar -xvf robonomics-ubuntu-0.24.0-x86_64.tar.xz
sudo cp robonomics /bin/
# Install AGENT
sudo apt install -y vlc ffmpeg
cd Agent
python3 -m venv ./venv
source venv/bin/activate
pip install -r requirements.txt
deacivate
cd ..
# Install BACKEND
cd Backend
python3 -m venv ./venv
source venv/bin/activate
pip install -r requirements.txt
deactivate
cd ..
# Install systemd services
sudo cp services/* /etc/systemd/system/
sudo systemctl enable feecc-agent.service
sudo systemctl enable feecc-backend.service
sudo systemctl enable ipfs.service
sudo systemctl enable robonomics.service
# Install RFID listener daemon
sudo apt install -y python3-dev gcc
sudo mv EventToInternet /etc/systemd/system/
sudo chown -R root:root /etc/systemd/system/EventToInternet
cd /etc/systemd/system/EventToInternet
sudo python3 -m pip install -r requirements.txt
sudo bash install.sh
# Post-installation actions
echo 'Done. Rebooting now.'
sudo systemctl reboot