Skip to content

Commit

Permalink
added shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
patricktinz committed Jan 11, 2020
1 parent 7cd0787 commit 47b9439
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
17 changes: 17 additions & 0 deletions install_apache_thrift_debian_stretch.sh
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
39 changes: 39 additions & 0 deletions install_mqtt_paho_debian_stretch.sh
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

0 comments on commit 47b9439

Please sign in to comment.