Embedded:Raspberry Pi: Unterschied zwischen den Versionen
Admin (Diskussion | Beiträge) K (Admin verschob Seite Raspberry Pi nach Embedded:Raspberry Pi) |
Admin (Diskussion | Beiträge) |
||
(25 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
[[Kategorie:Embedded]] | [[Kategorie:Embedded]] | ||
[[Datei:rasperberry.jpg|400px|thumb|right|Rasperberry Pi]] | [[Datei:rasperberry.jpg|400px|thumb|right|Rasperberry Pi]] | ||
= Specification = | == Specification == | ||
* 700 MHz ARM1176JZF-S Core (ARMv6) | * 700 MHz ARM1176JZF-S Core (ARMv6) | ||
* Broadcom VideoCore IV, OpenGL ES 2.0 | * Broadcom VideoCore IV, OpenGL ES 2.0 | ||
* 256 RAM | * 512 MB RAM (Model B), 256 MB RAM (Model A) | ||
* HDMI, DSI, Composite VideoCore IV, 3,5mm Audio Jack | * HDMI, DSI, Composite VideoCore IV, 3,5mm Audio Jack | ||
* Model B: 2 x USB + 1 LAN, Model A: 1 x USB | |||
= | == Installation == | ||
'' | === Konfiguration === | ||
==== WLAN ==== | |||
Auf der Bootpartition die Datei ''wpa_supplicant.conf'' erstellen.<syntaxhighlight lang="bash" line="1"> | |||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |||
country=DE | |||
update_config=1 | |||
network={ | |||
ssid="<Name of your wireless LAN>" | |||
psk="<Password for your wireless LAN>" | |||
} | |||
</syntaxhighlight> | |||
==== SSH aktivieren ==== | |||
Auf der Bootpartition eine Datei ''ssh'' erstellen. Dann wird SSH aktiviert und diese Datei wieder gelöscht. Ob etwas in der Datei steht und was der Inhalt der Datei ist, ist irrelevant. | |||
<u>Quellen für die Einrichtung:</u> | |||
* https://www.raspberrypi.com/documentation/computers/remote-access.html#ssh | |||
* https://www.raspberrypi.com/documentation/computers/configuration.html | |||
= | == Netzwerkspeicher einbinden == | ||
<source lang='bash'> | |||
sudo mount -t cifs //192.168.1.50/Volume_1 /mnt/SAN_1/ | |||
</source> | |||
== Operating System == | == Operating System == | ||
Zeile 19: | Zeile 43: | ||
== Java == | == Java == | ||
{{Veraltet|Es existiert eine neue Linux-Distribution mit Java 8|Java 7u21 ist aktuell}} | |||
[http://pi4j.com/example/control.html The Pi4J Project] | |||
<source lang="bash"> | |||
sudo /opt/jdk1.8.0/bin/javac -classpath .:classes:/opt/pi4j/lib/'*' -d . Test | |||
sudo /opt/jdk1.8.0/bin/java -classpath .:classes:/opt/pi4j/lib/'*' Test | |||
</source> | |||
<div style="background:#cc0000; border:1px solid #88a; border-collapse:collapse; margin:10px 0; padding:5px; font-family:monospace; font-size:12px; width:auto"> | <div style="background:#cc0000; border:1px solid #88a; border-collapse:collapse; margin:10px 0; padding:5px; font-family:monospace; font-size:12px; width:auto"> | ||
In der aktuellen Debian-Linux Distribution '''Raspbian “wheezy”''' funktioniert ''Oracle Java'' auf Grund der Unterstützung des mathematischen Coprozessors nicht.<br>Man muss dann auf die '''Soft-float Debian “wheezy”'''-Version wechseln. | In der aktuellen Debian-Linux Distribution '''Raspbian “wheezy”''' funktioniert ''Oracle Java'' auf Grund der Unterstützung des mathematischen Coprozessors nicht.<br>Man muss dann auf die '''Soft-float Debian “wheezy”'''-Version wechseln. | ||
Zeile 29: | Zeile 61: | ||
EABI, VFP, SoftFP ABI, Little Endian | EABI, VFP, SoftFP ABI, Little Endian | ||
Nach der Zwangsregistrierung: ejre- | Nach der Zwangsregistrierung: ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz herunterladen | ||
Ein Verzeichnis erstellen und die heruntergeladen Datei dorthin kopieren, z.B. so: | Ein Verzeichnis erstellen und die heruntergeladen Datei dorthin kopieren, z.B. so: | ||
Zeile 35: | Zeile 67: | ||
<source lang="bash"> | <source lang="bash"> | ||
ssh pi@rasp-ip mkdir -p /export/java | ssh pi@rasp-ip mkdir -p /export/java | ||
scp ejre- | scp ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz pi@rasp-ip:/export/java | ||
ssh pi@rasp-ip | ssh pi@rasp-ip | ||
cd /export/java; tar -zxvf ejre- | cd /export/java; tar -zxvf ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz | ||
</source> | </source> | ||
Zeile 46: | Zeile 78: | ||
</source> | </source> | ||
== | == Glassfish == | ||
<source lang="bash"> | |||
wget http://dlc.sun.com.edgesuite.net/glassfish/3.1.2.2/release/glassfish-3.1.2.2-web.zip | |||
</source> | |||
<source lang="html5"> | |||
<%@page contentType="text/html" pageEncoding="UTF-8"%> | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |||
<title>JSP Page - PiTest</title> | |||
</head> | |||
<body> | |||
<h2>PiTest</h2> | |||
App Server : <%=getServletConfig().getServletContext().getServerInfo()%> <br> | |||
JVM : <%= System.getProperty("java.version")%> - <%=System.getProperty("java.vendor")%><br> | |||
Java home : <%= System.getProperty("java.home")%><br> | |||
OS : <%= System.getProperty("os.name")%> - <%= System.getProperty("os.version")%> <br> | |||
Architecture : <%= System.getProperty("os.arch")%> <br> | |||
</body> | |||
</html> | |||
</source> | |||
= Datenbanken = | |||
== mySQL == | |||
<source lang="bash"> | |||
sudo apt-get install mysql-server mysql-client php5-mysql | |||
</source> | |||
Die ''/etc/mysql/my.cnf'' durch ''/usr/share/doc/my-server-5.0/examples/my-small.cnf'' ersetzen. | |||
z.B.: | |||
<source lang="bash"> | |||
[mysqld] | |||
port = 3306 | |||
socket = /var/lib/mysql/mysql.sock | |||
skip-locking | |||
key_buffer = 16K | |||
max_allowed_packet = 1M | |||
table_cache = 4 | |||
sort_buffer_size = 64K | |||
read_buffer_size = 256K | |||
read_rnd_buffer_size = 256K | |||
net_buffer_length = 2K | |||
thread_stack = 64K | |||
skip-bdb | |||
skip-innodb | |||
[mysqldump] | |||
quick | |||
max_allowed_packet = 16M | |||
[mysql] | |||
no-auto-rehash | |||
#safe-updates | |||
[isamchk] | |||
key_buffer = 8M | |||
sort_buffer_size = 8M | |||
[myisamchk] | |||
key_buffer = 8M | |||
sort_buffer_size = 8M | |||
[mysqlhotcopy] | |||
interactive-timeout | |||
</source> | |||
[http://www.lowendbox.com/blog/reducing-mysql-memory-usage-for-low-end-boxes/ Reducing mysql memory usage for low end boxes] | |||
== CouchDB == | |||
http://www.myraspberrypi.info/?p=315 | |||
== node.js == | |||
[https://gist.github.com/stolsma/3301813 node.js auf GitHub] | |||
== Systembefehle == | |||
Konfigurationsoberfläche: | Konfigurationsoberfläche: | ||
<source lang=bash> | <source lang=bash> | ||
sudo raspi-config | sudo raspi-config | ||
</source> | </source> | ||
Seriennummer für Lizenzen, die dann in /boot/config.txt hinterlegt werden | |||
<source lang=bash> | |||
cat /proc/cpuinfo | |||
</source> | |||
Ein paar Systeminfos | |||
<source lang=bash> | |||
# CPU Frequenz | |||
vcgencmd measure_clock arm | |||
# CORE Frequenz | |||
vcgencmd measure_clock core | |||
# CORE Spannung | |||
vcgencmd measure_volts core | |||
# CORE Temperatur | |||
vcgencmd measure_temp | |||
# Firmaware Version | |||
vcgencmd version | |||
# Codec Lizenzen | |||
vcgencmd codec_enabled H264 | |||
vcgencmd codec_enabled MPG2 | |||
vcgencmd codec_enabled WVC1 | |||
</source> | |||
= Hardwareerweiterung = | |||
MCP3008 analog Signalaufzeichnung | |||
CMPS10 als Kompassmodul | |||
= Resourcen = | = Resourcen = | ||
Zeile 62: | Zeile 204: | ||
* [http://www.forum-raspberrypi.de/Thread-tutorial-raspberry-pi-als-webserver-phpmyadmin-installation Webserver einrichten] | * [http://www.forum-raspberrypi.de/Thread-tutorial-raspberry-pi-als-webserver-phpmyadmin-installation Webserver einrichten] | ||
* [http://raspberrycenter.de/ Deutsche Raspberry Pi Seite] | * [http://raspberrycenter.de/ Deutsche Raspberry Pi Seite] | ||
* [http://bastelstube.rocci.net/projects/MBS19_RasPi-GPIO/RasPi-GPIO.html Martin's Bastelstube] | |||
* [http://thomas-leister.de/allgemein/raspberry-pi-als-printserver/ Druckerserver] |
Aktuelle Version vom 6. Januar 2022, 08:58 Uhr
Specification
- 700 MHz ARM1176JZF-S Core (ARMv6)
- Broadcom VideoCore IV, OpenGL ES 2.0
- 512 MB RAM (Model B), 256 MB RAM (Model A)
- HDMI, DSI, Composite VideoCore IV, 3,5mm Audio Jack
- Model B: 2 x USB + 1 LAN, Model A: 1 x USB
Installation
Konfiguration
WLAN
Auf der Bootpartition die Datei wpa_supplicant.conf erstellen.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=DE
update_config=1
network={
ssid="<Name of your wireless LAN>"
psk="<Password for your wireless LAN>"
}
SSH aktivieren
Auf der Bootpartition eine Datei ssh erstellen. Dann wird SSH aktiviert und diese Datei wieder gelöscht. Ob etwas in der Datei steht und was der Inhalt der Datei ist, ist irrelevant.
Quellen für die Einrichtung:
- https://www.raspberrypi.com/documentation/computers/remote-access.html#ssh
- https://www.raspberrypi.com/documentation/computers/configuration.html
Netzwerkspeicher einbinden
sudo mount -t cifs //192.168.1.50/Volume_1 /mnt/SAN_1/
Operating System
ToDo
Java
Diese Seite ist nicht mehr vollständig aktuell:
- Es existiert eine neue Linux-Distribution mit Java 8
- Java 7u21 ist aktuell
sudo /opt/jdk1.8.0/bin/javac -classpath .:classes:/opt/pi4j/lib/'*' -d . Test
sudo /opt/jdk1.8.0/bin/java -classpath .:classes:/opt/pi4j/lib/'*' Test
In der aktuellen Debian-Linux Distribution Raspbian “wheezy” funktioniert Oracle Java auf Grund der Unterstützung des mathematischen Coprozessors nicht.
Man muss dann auf die Soft-float Debian “wheezy”-Version wechseln.
Download von JavaSE für ARM-Prozessoren
Java SE Embedded 7
ARMv6/7 Linux - Headless
EABI, VFP, SoftFP ABI, Little Endian
Nach der Zwangsregistrierung: ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz herunterladen
Ein Verzeichnis erstellen und die heruntergeladen Datei dorthin kopieren, z.B. so:
ssh pi@rasp-ip mkdir -p /export/java
scp ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz pi@rasp-ip:/export/java
ssh pi@rasp-ip
cd /export/java; tar -zxvf ejre-7u6-fcs-b24-linux-arm-vfp-client_headless-10_aug_2012.tar.gz
Man kann jetzt testen, ob Java funktioniert:
/export/java/ejre1.7.0_04/bin/java -version
Glassfish
wget http://dlc.sun.com.edgesuite.net/glassfish/3.1.2.2/release/glassfish-3.1.2.2-web.zip
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page - PiTest</title>
</head>
<body>
<h2>PiTest</h2>
App Server : <%=getServletConfig().getServletContext().getServerInfo()%> <br>
JVM : <%= System.getProperty("java.version")%> - <%=System.getProperty("java.vendor")%><br>
Java home : <%= System.getProperty("java.home")%><br>
OS : <%= System.getProperty("os.name")%> - <%= System.getProperty("os.version")%> <br>
Architecture : <%= System.getProperty("os.arch")%> <br>
</body>
</html>
Datenbanken
mySQL
sudo apt-get install mysql-server mysql-client php5-mysql
Die /etc/mysql/my.cnf durch /usr/share/doc/my-server-5.0/examples/my-small.cnf ersetzen. z.B.:
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
skip-bdb
skip-innodb
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
#safe-updates
[isamchk]
key_buffer = 8M
sort_buffer_size = 8M
[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout
Reducing mysql memory usage for low end boxes
CouchDB
http://www.myraspberrypi.info/?p=315
node.js
Systembefehle
Konfigurationsoberfläche:
sudo raspi-config
Seriennummer für Lizenzen, die dann in /boot/config.txt hinterlegt werden
cat /proc/cpuinfo
Ein paar Systeminfos
# CPU Frequenz
vcgencmd measure_clock arm
# CORE Frequenz
vcgencmd measure_clock core
# CORE Spannung
vcgencmd measure_volts core
# CORE Temperatur
vcgencmd measure_temp
# Firmaware Version
vcgencmd version
# Codec Lizenzen
vcgencmd codec_enabled H264
vcgencmd codec_enabled MPG2
vcgencmd codec_enabled WVC1
Hardwareerweiterung
MCP3008 analog Signalaufzeichnung CMPS10 als Kompassmodul