Inhaltsverzeichnis
Own Your Data
Sammle Daten aus dem Alltag, speichere sie sicher, und gewinne faszinierende Einblicke über dein Leben.
PIA (Personal Information Archive)
Schnelle Installation für Entwicklungsumgebung
Java Installation:
mkdir -p /opt/java cd /opt/java wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-arm32-vfp-hflt.tar.gz tar xvzf jdk-8u91-linux-arm32-vfp-hflt.tar.gz update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_91/bin/java 100 && update-alternatives --config java update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_91/bin/javac 100 && update-alternatives --config javac
PIA Installation:
mkdir -p ~/oyd/oyd-pia cd ~/oyd/oyd-pia wget https://www.ownyourdata.eu/wp-content/pia-0.8.3-SNAPSHOT.war
PIA starten:
(Start am BananaPi dauert etwa 5 Minuten)
java -jar pia-0.8.3-SNAPSHOT.war
PIA Setup testen:
- Browser: http://{IP_BananaPi}:8080
- Benutzer: admin
- Passwort: admin
Produktiv-Installation in smartSARAH
Java Installation:
$ mkdir -p /opt/java $ cd /opt/java $ wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-arm32-vfp-hflt.tar.gz $ tar xvzf jdk-8u91-linux-arm32-vfp-hflt.tar.gz $ update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_91/bin/java 100 && update-alternatives --config java $ update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_91/bin/javac 100 && update-alternatives --config javac
PostgreSQL Installation:
$ apt-get install postgresql postgresql-client $ sudo -u postgres createdb pia $ sudo -u postgres psql # \password postgres {pgpwd} # \q
PIA Installation:
1. Quellcode herunterladen
$ mkdir -p ~/oyd $ cd ~/oyd $ git clone https://github.com/OwnYourData/oyd-pia.git $ cd oyd-pia
2a. bearbeite src/main/resources/config/application.yml
- in section jhipster > security > authentication > oauth
- secret: {new secret}
- in section jhipster > security > rememberme
- key: {new key}
Anmerkung: mit folgender Zeile kann eine Zufallsfolge erzeugt werden
$ cat /dev/urandom | tr -cd 'a-f0-9' | head -c 32
2b. bearbeite src/main/webapp/scripts/components/auth/provider/auth.oauth2.service.js
- die Funktion
getClientSecret
muss {new secret} gleich wie insrc/main/resources/config/application.yml
section jhipster > security > authentication > oauth zurückgeben
3. bearbeite src/main/resources/config/application-prod.yml
- in section datasource
- name: pia
- username: postgres
- password: {pgpwd}
4. WAR Datei erzeugen
$ npm install $ mvn -Pprod clean package
5. Start PIA
$ nohup java -jar pia-0.8.3-SNAPSHOT.war --spring.profiles.active=prod >/dev/null 2>&1 &
5. PIA Setup testen
(Start am BananaPi dauert etwa 5 Minuten)
- Browser: http://{IP_BananaPi}:8080
- Benutzer: admin
- Passwort: admin
App zum Import von Daten aus NAGIOS
sudo apt-get update && sudo apt-get install -y r-base r-base-dev libcurl4-openssl-dev libssl-dev libxml2-dev cd ~/oyd git clone https://github.com/OwnYourData/app-nagios.git Rscript setup.R
Datenzugriff testen:
Rscript import_nagios.R --ip={IPv6 Adresse von BananaPi} --host={gewählter Host) --service={verfügbares Service am Host} --pia={URL der PIA, z.B. http://127.0.0.1:8080} --key={AppID des registrierten Plugins in der PIA, normalerweise: eu.ownyourdata.nagios} --secret={App-Secret des registrierten Plugins in der PIA; wird angezeigt beim Registrations-Dialog} --repo={das für das Service zu verwendente Repository}