-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7cd0787
commit 47b9439
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# | ||
# run as root | ||
|
||
# install Apache Thrift | ||
echo "Installing Apache Thrift ..." | ||
sudo apt-get update | ||
git clone https://github.com/apache/thrift.git | ||
sudo apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config | ||
cd thrift | ||
./bootstrap.sh | ||
./configure | ||
./configure --with-boost=/usr/local | ||
make | ||
sudo make install | ||
cd .. | ||
apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config --no-install-recommends bison build-essential cmake flex pkg-config autoconf automake g++ git libtool make libboost-dev libssl-dev |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
# | ||
# run as root | ||
|
||
echo "Adding key." | ||
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | ||
sudo apt-key add mosquitto-repo.gpg.key | ||
|
||
echo "Adding repo to apt." | ||
cd /etc/apt/sources.list.d/ | ||
sudo wget http://repo.mosquitto.org/debian/mosquitto-stretch.list | ||
|
||
echo "Updating db" | ||
apt-get update | ||
|
||
echo "Installing mosquitto" | ||
sudo apt-get install mosquitto mosquitto-clients | ||
|
||
echo "Starting MQTT service" | ||
sudo service mosquitto start | ||
|
||
echo "Subscribung to test/topic for one message" | ||
echo "(in background to prevent blocking the shell)" | ||
mosquitto_sub -v -C 1 -t 'test/topic' & | ||
sleep 1 #short sleep to get prints in right order | ||
|
||
echo "Publishing on test/topic" | ||
mosquitto_pub -t 'test/topic' -m 'helloWorld' | ||
|
||
echo "Stopping MQTT service" | ||
sudo service mosquitto stop | ||
|
||
echo "Cloning /eclipse/paho.mqtt.c.git" | ||
git clone https://github.com/eclipse/paho.mqtt.c.git | ||
|
||
echo "Installing..." | ||
cd paho.mqtt.c/ | ||
make | ||
make install |