1 |
usermod -a -G group user |
Debian: Einen Benutzer zu einer Gruppe hinzufügen
Tags: Allgemein | Debian (Linux) | Raspbian (Raspberry Pi) Kommentieren
exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken
Tags: Debian (Linux) | Raspbian (Raspberry Pi) | Webserver 1 Kommentar
Mein Raspberry Pi sandte mir regelmäßig die Fehlermeldung, dass das paniclog des exim4 MTA nicht leer ist. Das war natürlich extrem nervig:
exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken
Zusätzlich erhält man hier ja auch immer noch einen Auszug aus der Log-Datei:
2014-11-17 22:36:49 IPv6 socket creation failed: No such file or directory
2014-11-17 22:52:13 IPv6 socket creation failed: Address family not supported by protocol
2014-11-17 22:56:38 IPv6 socket creation failed: Address family not supported by protocol
Wie man hier nun erkennt, versucht exim4, die IPv6-Funktionalität herzustellen, scheitert jedoch. Da ich IPv6 dazu auch gar nicht brauche, habe ich mich dazu entschlossen, das Feature einfach zu deaktivieren (User: root):
- In der Datei
/etc/exim4/update-exim4.conf.conf
die Variabledc_local_interfaces
bearbeiten und den Wert für die IPv6-Adresse der lokalen Loopback-Netzwerkschnittstelle „::1
“ entfernen - Dann noch das
paniclog
leer machen:
1echo -n "" > /var/log/exim4/paniclog - Und den Dienst neu starten:
1/etc/init.d/exim4 restart
Raspberry Pi: Vorinstallierte (unnötige) Software deinstallieren
Tags: Debian (Linux) | Raspbian (Raspberry Pi) Kommentieren
Bei den neuen Raspbian-Images für den Raspberry Pi sind leider Gottes eine Menge Pakete installiert, die man für einen Mini-Server-Betrieb oder andere Anforderungen partout nicht benötigt.
Unter http://knowledgebase.twocoders.de/2013/11/05/raspberry-pi-uninstall-unused-software/ findet ihr einen netten kleinen Artikel, welche Software ihr bedenkenlos entfernen könnt. Leider war mir das dann doch zu rigoros (wollte nämlich im TV-Betrieb gern den grafischen Modus behalten), weshalb ich die zu entfernenden Pakete reduziert und ein paar andere ergänz habe:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
sudo apt-get purge --auto-remove idle idle3 sudo apt-get purge --auto-remove scratch sudo apt-get purge --auto-remove sonic-pi sudo apt-get purge --auto-remove squeak-vm sudo apt-get purge --auto-remove timidity sudo apt-get purge --auto-remove wolfram-engine sudo apt-get purge --auto-remove libreoffice* sudo apt-get purge --auto-remove bluej* sudo apt-get purge --auto-remove greenfoot* sudo apt-get purge --auto-remove python-pygame penguinspuzzle sudo apt-get purge --auto-remove lxappearance lxde lxde-common lxde-core lxde-icon-themexinput lxmenu-data lxpanel lxpolkit lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal sudo apt-get purge --auto-remove leafpad menu-xdg omxplayer xarchiver sudo apt-get purge --auto-remove zenity pcmanfm blt python-tk python3-tk sudo apt-get purge --auto-remove dillo openbox sudo apt-get purge --auto-remove pistore sudo apt-get purge --auto-remove gnome-icon-theme-symbolic sudo apt-get purge --auto-remove pypy-setuptools pypy-upstream pypy-upstream-dev sudo apt-get purge --auto-remove epiphany-browser epiphany-browser-data #sudo apt-get purge --auto-remove xinit xserver-xorg lightdm midori desktop-base gnome-icon-theme gnome-themes-standard |
Ebenso können wir die Wolfram-Spiegelserver entfernen (der Server ist sowieso ständig down und produziert bei Updates lästige Fehlermeldungen):
1 |
sudo rm /etc/apt/sources.list.d/wolfram.list |
Mit obigen Maßnahmen haben wir zudem mindestens 500MB Speicherplatz freigegeben.
Falls ihr noch weitere Pakete kennt, die man gefahrlos entfernen kann, nehme ich diese gern in die Liste auf.
Weitere Aufräum-Maßnahmen
Die Gruppe indiecity
wird für den PiStore verwendet und im Debian-Systembetrieb nicht gebraucht:
1 |
# groupdel indiecity |
Quellen:
iptables
Tags: Debian (Linux) | Netzwerk | Raspbian (Raspberry Pi) Kommentieren
Das folgende Skript
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
#!/bin/bash ### BEGIN INIT INFO # Provides: iptables_firewall # Required-Start: $local_fs $network # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: iptables firewall initialisation # Description: Initializes rules for iptables ### END INIT INFO IPTABLES="/sbin/iptables" case "$1" in start) echo "Initializing firewall..." # Logging options. #------------------------------------------------------------------------------ LOG="LOG --log-level debug --log-tcp-sequence --log-tcp-options" LOG="$LOG --log-ip-options" # Defaults for rate limiting #------------------------------------------------------------------------------ RLIMIT="-m limit --limit 3/s --limit-burst 30" # Default policies. #------------------------------------------------------------------------------ # Drop everything by default. $IPTABLES -P INPUT DROP $IPTABLES -P FORWARD DROP $IPTABLES -P OUTPUT DROP # Set the nat/mangle/raw tables' chains to ACCEPT $IPTABLES -t nat -P PREROUTING ACCEPT $IPTABLES -t nat -P OUTPUT ACCEPT $IPTABLES -t nat -P POSTROUTING ACCEPT $IPTABLES -t mangle -P PREROUTING ACCEPT $IPTABLES -t mangle -P INPUT ACCEPT $IPTABLES -t mangle -P FORWARD ACCEPT $IPTABLES -t mangle -P OUTPUT ACCEPT $IPTABLES -t mangle -P POSTROUTING ACCEPT # Cleanup. #------------------------------------------------------------------------------ # Delete all $IPTABLES -F $IPTABLES -t nat -F $IPTABLES -t mangle -F # Delete all $IPTABLES -X $IPTABLES -t nat -X $IPTABLES -t mangle -X # Zero all packets and counters. $IPTABLES -Z $IPTABLES -t nat -Z $IPTABLES -t mangle -Z # Custom user-defined chains. #------------------------------------------------------------------------------ # LOG packets, then ACCEPT. $IPTABLES -N ACCEPTLOG $IPTABLES -A ACCEPTLOG -j $LOG $RLIMIT --log-prefix "FW-ACCEPT " $IPTABLES -A ACCEPTLOG -j ACCEPT # LOG packets, then DROP. $IPTABLES -N DROPLOG $IPTABLES -A DROPLOG -j $LOG $RLIMIT --log-prefix "FW-DROP " $IPTABLES -A DROPLOG -j DROP # LOG packets, then REJECT. # TCP packets are rejected with a TCP reset. $IPTABLES -N REJECTLOG $IPTABLES -A REJECTLOG -j $LOG $RLIMIT --log-prefix "FW-REJECT " $IPTABLES -A REJECTLOG -p tcp -j REJECT --reject-with tcp-reset $IPTABLES -A REJECTLOG -j REJECT # Only allows RELATED ICMP types # (destination-unreachable, time-exceeded, and parameter-problem). # TODO: Rate-limit this traffic? # TODO: Allow fragmentation-needed? # TODO: Test. $IPTABLES -N RELATED_ICMP $IPTABLES -A RELATED_ICMP -p icmp --icmp-type destination-unreachable -j ACCEPT $IPTABLES -A RELATED_ICMP -p icmp --icmp-type time-exceeded -j ACCEPT $IPTABLES -A RELATED_ICMP -p icmp --icmp-type parameter-problem -j ACCEPT $IPTABLES -A RELATED_ICMP -j DROPLOG # Make It Even Harder To Multi-PING $IPTABLES -A INPUT -p icmp -m limit --limit 1/s --limit-burst 2 -j ACCEPT $IPTABLES -A OUTPUT -p icmp -j ACCEPT # Only allow the minimally required/recommended parts of ICMP. Block the rest. #------------------------------------------------------------------------------ # Allow all ESTABLISHED ICMP traffic. $IPTABLES -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT $RLIMIT $IPTABLES -A OUTPUT -p icmp -m state --state ESTABLISHED -j ACCEPT $RLIMIT # Allow some parts of the RELATED ICMP traffic, block the rest. $IPTABLES -A INPUT -p icmp -m state --state RELATED -j RELATED_ICMP $RLIMIT $IPTABLES -A OUTPUT -p icmp -m state --state RELATED -j RELATED_ICMP $RLIMIT # Allow incoming ICMP echo requests (ping), but only rate-limited. $IPTABLES -A INPUT -p icmp --icmp-type echo-request -j ACCEPT $RLIMIT # Allow outgoing ICMP echo requests (ping), but only rate-limited. $IPTABLES -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT $RLIMIT # Drop any other ICMP traffic. $IPTABLES -A INPUT -p icmp -j DROPLOG $IPTABLES -A OUTPUT -p icmp -j DROPLOG $IPTABLES -A FORWARD -p icmp -j DROPLOG # Selectively allow certain special types of traffic. #------------------------------------------------------------------------------ # Allow loopback interface to do anything. $IPTABLES -A INPUT -i lo -j ACCEPT $IPTABLES -A OUTPUT -o lo -j ACCEPT # Allow incoming connections related to existing allowed connections. $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow outgoing connections EXCEPT invalid $IPTABLES -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Miscellaneous. #------------------------------------------------------------------------------ # Explicitly drop invalid incoming traffic $IPTABLES -A INPUT -m state --state INVALID -j DROP # Drop invalid outgoing traffic, too. $IPTABLES -A OUTPUT -m state --state INVALID -j DROP # If we would use NAT, INVALID packets would pass - BLOCK them anyways $IPTABLES -A FORWARD -m state --state INVALID -j DROP # Erlaube bestimmte ausgehende Anfragen (OUTPUT), blocke den Rest #------------------------------------------------------------------------------ # DNS OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 53 -j ACCEPT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 53 -j ACCEPT # HTTP OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT # HTTPS OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT # SMTP OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 25 -j ACCEPT # SMTPS OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 465 -j ACCEPT # Erlaube ausgehende "submission" (RFC 2476) Anfragen. $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 587 -j ACCEPT # POP3S OUTPUT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 995 -j ACCEPT # IMAP OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 143 -j ACCEPT # IMAPS OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 993 -j ACCEPT # SSH OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 22 -j ACCEPT # FTP OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 21 -j ACCEPT # SMB OUTPUT #$IPTABLES -A OUTPUT -p udp -m multiport --destination-port 137,138 -d 192.168.1.0/24 -j ACCEPTLOG #$IPTABLES -A OUTPUT -p tcp -m multiport --destination-port 139,445 -d 192.168.1.0/24 -j ACCEPTLOG # NFS OUTPUT #$IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 111 -j ACCEPT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 111 -j ACCEPT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 2049 -j ACCEPT #$IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 2049 -j ACCEPT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 32764:32769 -j ACCEPT #$IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 32764:32769 -j ACCEPT # NTP OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 123 -j ACCEPT # WHOIS OUTPUT $IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 43 -j ACCEPT # CVS OUTPUT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 2401 -j ACCEPT # MySQL OUTPUT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 3306 -j ACCEPT # rsync OUTPUT $IPTABLES -A OUTPUT -p tcp --dport 873 -m state --state NEW -d 192.168.1.0/24 -j ACCEPT # SVN OUTPUT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 3690 -j ACCEPT # Mumble OUTPUT #$IPTABLES -A OUTPUT -m state --state NEW -p tcp --dport 64738 -j ACCEPT #$IPTABLES -A OUTPUT -m state --state NEW -p udp --dport 64738 -j ACCEPT # Erlaube bestimmte eingehende Anfragen (INPUT), blocke den Rest #------------------------------------------------------------------------------ # DNS INPUT #$IPTABLES -A INPUT -m state --state NEW -p udp --dport 53 -j ACCEPT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 53 -j ACCEPT # HTTP INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT # HTTPS INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT # Webmin, INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 10000 -j ACCEPT # POP3 INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 110 -j ACCEPT # IMAP4 INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 143 -j ACCEPT # POP3S INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 995 -j ACCEPT # SMTP INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 25 -j ACCEPT # SSH INPUT $IPTABLES -A INPUT -m state --state NEW -p tcp --dport 22 -j ACCEPT # FTP INPUT #modprobe ip_conntrack_ftp #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 21 -j ACCEPT # FTPS INPUT (ebenfalls FTP erlauben) # Port-Range ist konfigurationsabhaengig (s. /etc/proftpd/proftpd.conf, PassivePorts) #$IPTABLES -A INPUT -p tcp --sport 1024: --dport 52500:52510 -m state --state NEW -j ACCEPT #$IPTABLES -A OUTPUT -p tcp --sport 52500:52510 --dport 1024: -m state --state NEW -j ACCEPT # SMB INPUT #$IPTABLES -A INPUT -p udp -m multiport --destination-port 137,138 -s 192.168.1.0/24 -j ACCEPTLOG #$IPTABLES -A INPUT -p tcp -m multiport --destination-port 139,445 -s 192.168.1.0/24 -j ACCEPTLOG # NFS INPUT # Achtung: Erfordert Rekonfiguration der Dienste (s. https://wiki.debian.org/SecuringNFS) #$IPTABLES -A INPUT -p udp -m multiport --dport 111 -s 192.168.1.0/24 -j ACCEPT #$IPTABLES -A INPUT -p tcp -m multiport --dport 111 -s 192.168.1.0/24 -j ACCEPT #$IPTABLES -A INPUT -p udp -m multiport --dport 2049 -s 192.168.1.0/24 -j ACCEPT #$IPTABLES -A INPUT -p tcp -m multiport --dport 2049 -s 192.168.1.0/24 -j ACCEPT #$IPTABLES -A INPUT -p udp -m multiport --dport 32764:32769 -s 192.168.1.0/24 -j ACCEPT #$IPTABLES -A INPUT -p tcp -m multiport --dport 32764:32769 -s 192.168.1.0/24 -j ACCEPT # Mumble INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 64738 -j ACCEPT #$IPTABLES -A INPUT -m state --state NEW -p udp --dport 64738 -j ACCEPT # MySQL INPUT #$IPTABLES -A INPUT -m state --state NEW -p tcp --dport 3306 -j ACCEPT # rsync INPUT (pruefen) #$IPTABLES -A INPUT -p tcp --dport 873 -m state --state NEW,ESTABLISHED -s 192.168.1.0/24 -j ACCEPT # DHCP INPUT #$IPTABLES -A INPUT -p udp --dport 67 -J ACCEPTLOG # Explicitly log and reject everything else. #------------------------------------------------------------------------------ # Use REJECT instead of REJECTLOG if you don't need/want logging. $IPTABLES -A INPUT -j REJECT $IPTABLES -A OUTPUT -j REJECT $IPTABLES -A FORWARD -j REJECT # Exit gracefully. #------------------------------------------------------------------------------ echo "Firewall initialized and active." ;; stop) echo "Flushing iptables rules..." sleep 1 iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT echo "Firewall stopped." ;; *) echo "Usage: /etc/init.d/iptables_init {start|stop}" exit 2 esac exit 0 |
Raspberry Pi: XBMC (Frodo)
Tags: Raspbian (Raspberry Pi) Kommentieren
Installation:
- Download des Images von http://openelec.thestateofme.com/official_images/ (idealerweise die neueste Version nehmen)
- Aufspielen des Images auf eine SD-Karte mittels win32diskimager (http://sourceforge.net/projects/win32diskimager/)
- Bitte vor dem Einschalten das HDMI-Kabel und die anfangs nötige Tastatur anschließen
WLAN installieren:
- Den Pi mit eingestecktem WLAN-Stick starten
- In den Einstellungen „OpenELEC“ auswählen, dort WLAN aktivieren und als Adapter wlan0 definineren. Anschließend die SSID des Netzwerkes eingeben (dieses darf nicht versteckt sein) und die Passphrase.
- Den Pi neu starten und er sollte sich automatisch verbinden
SSH-Verbindung aufbauen:
- In den Einstellungen muss zuerst SSH aktiviert werden
- Anschließend kann per z.B. Putty eine Verbindung mit den folgenden Zugangsdaten aufgebaut werden:
Benutzername: root
Passwort: openelec
Übertraktung des Pi:
Quellen und weiterführende Links:
- Ich habe mich nach der folgenden Anleitung gerichtet:
http://htpcbuild.com/htpc-software/raspberry-pi-openelec/openelec-overclocking/
Hier jedoch die Anmerkung: Bei Verwendung des obigen Images ist bereits eine config.txt vorhanden. Diese kann nach der ebenfalls dort enthaltenen Tabelle angepasst werden. Ich habe „Stufe Medium“ gewählt – mal sehen wie der kleine Rechner sich so macht… - Anschließend natürlich rebooten 😉
Raspberry Pi (Raspbian): Samba-Server installieren
Tags: Debian (Linux) | Raspbian (Raspberry Pi) Kommentieren
- Zuerst werden Samba und zugehörige Programme installiert:
1sudo apt-get install samba samba-common-bin - Anschließend legen wir einen ersten Benutzer (hier pi) an:
1sudo smbpasswd -a pi - Sicherheitshalber nun ein Restart:
1sudo restart - Nun könnt ihr die Verbindung schon testen. Gebt auf einem Windows-PC die IP des Pi ein und das Home-Verzeichnis sollte in der Übersicht erschinen. Alternativ direkt die Freigabe anwählen und authentifizieren: http://192.168.1.X/pi
Raspberry Pi (Raspbian): WLAN-Stick Edimax EW-7811Un installieren
Tags: Debian (Linux) | Raspbian (Raspberry Pi) Kommentieren
Der Edimax EW-7811Un, als „World’s smalles!“ betitelte WLAN-Stick ist in vielen Anleitungen als kompatible Hardware für den WLAN-Zugang des Pi beschrieben wurden.
- http://kaffeeringe.de/blog/2012/06/20/wlan-stick-finden-und-installieren/
- http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=7471
- Grafische Oberfläche starten (ggf. auch per VNC)
- „Start-Button“, „Internet“, „wpa_gui“
Hier lässt sich die Umgebung nach Netzwerken scannen und die Verbindung mit einem einfachen grafischen Interface einrichten.
Weiterführendes:
Raspberry Pi: Raspbmc Setup
Tags: Debian (Linux) | Raspbian (Raspberry Pi) Kommentieren
Raspbmc ist eine speziell für den Raspberry Pi modifizierte Variante von XBMC. Das Projekt ist zu finden unter www.raspbmc.com.
Das wird benötigt:
- SD-Karte
- Desktop-PC mit SD-Karten-Leser um die SD-Karte mit dem Betriebssystem auszustatten
So geht’s
- Raspbmc von der Projekthomepge herunterladen: http://www.raspbmc.com/download/
Ich habe mich für das Network-Image entschieden. Dieses lädt auf dem Raspberry Pi das ganze System selbstständig in der neuesten Version herunter. - Image entpacken und auf die SD-Karte schreiben
Ich habe hierfür „Image Writer“ verwendet (https://launchpad.net/win32-image-writer/+download).
Tipps zu Raspbmc / XBMC
- Filme, die aus zwei Dateien bestehen tauchen doppelt in der Datenbank auf
http://www.xbmc.de/xbmc/e107_plugins/forum/forum_viewtopic.php?28947.0#post_28959
Raspberry Pi (Raspian): Externe Festplatte (USB) anschließen
Tags: Debian (Linux) | Raspbian (Raspberry Pi) 2 Kommentare
- Festplatte mit NTFS formatieren (auf einem Windows-System)
NTFS, um die Festplatte bei Bedarf auch mit einem Windows-Computer auslesen zu können. Da wir auch die Möglichkeit haben möchten, Dateien > 4GB zu speichern wählen wir nicht Fat32 – das lässt nur Dateien bis zu einer maximalen Dateigröße von 4GB zu. - Festplatte per USB mit dem Pi verbinden
- Notwendig, um NTFS-Dateisysteme zu mounten
1apt-get install ntfs-3g - Mount-Point erzeugen (meine Platte soll „pidrive“ heißen):
1sudo mkdir /mnt/pidrive - Laufwerksinformationen anzeigen:
1sudo fdisk -l - Die folgende Zeile in der Datei
/etc/fstab
hinzufügen ( sudo vi /etc/fstab ):
/dev/sda1 /mnt/pidrive ntfs-3g defaults 0 0
Handelt es sich bei eurem Dateisystem um FAT32, schreibe man dies:
/dev/sdb1 /mnt/pidrive vfat defaults 0 0
- Das Laufwerk mounten:
1sudo mount -a - Automatisches Mounten des USB-Laufwerks einrichten:
1sudo apt-get install autofs - Und das mounten in der Konfigurationsdaten
/e
tc/auto.master
einrichten:
1sudo vi /etc/auto.master
Unter „+auto.master“ das Folgende einfügen:/media /etc/auto.ext-usb --timeout=10,defaults,user,exec,uid=1000
- Automatisches Ausschalten der Festplatte konfigurieren (mit hdparm):
12sudo apt-get install hdparmsudo hdparm -S120 /dev/sda
Um das automatische Ausschalten der Platte bei jedem Start erneut einzurichten, in der Datei
/etc/hdparm.conf
die folgenden Zeilen einfügen ( sudo /etc/hdparm.conf ):/dev/sda {
spindown_time = 120
} - Automatisches Ausschalten der Festplatte konfigurieren (mit hd-idle):
Sollte das automatische Ausschalten der Festplatte nicht funktionieren, teste man hd-idle (das hat bei meiner externen Platte dann auch funktioniert).
Anleitung hier: http://blog.is-a-geek.org/festplatten-in-den-standby-modus-versetzen-unter-ubuntu-desktopserver-mit-hd-idle - Eine solche Festplatte eignet sich hervorragend als Speicherort für Downloads des JDownloaders: JDownloader unter Raspbian installieren.
Zudem bietet es sich an, das Hauptverzeichnis oder bestimmte Unterverzeichnisse per Samba freizugeben: Samba-Server unter Raspbian installieren.
Quellen / Weiterführende Infos:
Raspberry Pi (Raspian): JDownloader installieren
Tags: Debian (Linux) | Raspbian (Raspberry Pi) 5 Kommentare
1. Java installieren (OpenJDK):
Die Installation ist unter http://openjdk.java.net/install/ beschrieben, in einfachen Worten zusammengefasst:
sudo apt-get install openjdk-7-jre
Da die Installationsdaten sehr groß sind, kann die Installation auf dem kleinen Gerät eine Weile dauern.
2. UnRar installieren
- In der Datei /etc/apt/sources.list die folgende Zeile hinzufügen:
deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
- Anschließend die Apt-Datenbank aktualisieren:
sudo apt-get update
- Nun mit der Installation loslegen:
su
mkdir ~/unrar
cd ~/unrar
sudo apt-get build-dep unrar-nonfree
sudo apt-get source -b unrar-nonfree
sudo dpkg -i unrar_*.deb
3. JDownloader installieren
- JDownloader-Installations-Shell-Script herunterladen. Die Adresse ist die, die wir soeben von der Website kopiert haben:
wget http://212.117.163.148/jd.sh
- Nun die Rechte anpassen:
chmod +x jd.sh
- Die Installation funktioniert nur über die grafische Oberfläche. Also jetzt per VNC verbinden und das Script per Doppelklick ausführen. Es kann einen Moment dauern, bevor überhaupt etwas passiert – aber nicht ungedultig werden.
- Anschließend läuft die Installation des JDownloaders vollautomatisch, dauert jedoch wirklich lange.
- Nachdem alles installiert ist, sind noch ein paar Dialoge zu beantworten (Sprache, Downloadverzeichnis, etc.). Als Download-Verzeichnis empfehle ich eine externe Festplatte: Anleitung zum Einrichten einer USB-Festplatte auf dem Raspberry Pi
- Ich empfehle, nach dem ersten Start, die Erweiterun „Webinterface“ zu aktivieren. Anschließend kann über den Port 8765 über einen Webbrowser auf die Kernfunktionen des JDownloader zugegriffen werden. Jedoch sollte beim hinzufügen von Links stets auch eine VNC-Verbindung aufgebaut sein: Fehlermeldungen und Dialoge werden im Webinterface leider nicht angezeigt.
Standard-Login-Daten für das Web-Interface:
Username: JD
Passwort: JD - Um das Entpacken von RAR-Archiven zu ermöglichen, muss in der Konfiguration unter Erweiterungen – Rar-Entpacker noch der korrekte Pfad zum installierten unrar angegeben werden:
/usr/bin/unrar
- Für einen komfortableren Start mit
sudo nano /usr/share/applications/JDownloader.desktop
den folgenden Inhalt ein die Datei schreiben:[Desktop Entry]
Encoding=UTF-8
Name=JDownloader
Comment=JDownloader Download Manager
Exec=java -Xmx512m -jar /home/username/.jd/JDownloader.jar
Icon=/home/username/.jd/plugins/webinterface/favicon.png
Terminal=false
Type=Application
Categories=Network;
StartupNotify=True
Damit erhaltet ihr einen schönen Eintrag im Startmenü.
Quellen und weiterführende Links: