Archiv für die Kategorie: “OpenSolaris”

OpenSolaris

Vorlesen mit webReader

Wer unter Solaris mit UFS-Filesystemen arbeitet muss vor der Benutzung einer Platte selbige mit einem disk label (vtoc bzw. Partitionstabelle) versehen. Dazu startet man den Befehl “format”, wählt die gewünschte Disk aus, ändert unter “partition” die Größen für die Partitionen, speichert das mit “label” und beendet das Programm mit “quit”.

root@server # format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /ssm@0,0/pci@1a,700000/pci@1/SUNW,isptwo@4/sd@0,0
       1. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /ssm@0,0/pci@1b,700000/pci@1/SUNW,isptwo@4/sd@0,0
       2. c2t40d41 <EMC-SYMMETRIX-5772 cyl 49598 alt 2 hd 30 sec 128>
          /ssm@0,0/pci@1a,600000/pci@1/lpfc@4/sd@28,29
...
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> partition

PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> print
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -  6812        9.39GB    (6813/0/0)  19682757
  1       swap    wu    6813 - 21330       20.00GB    (14518/0/0) 41942502
  2     backup    wm       0 - 24619       33.92GB    (24620/0/0) 71127180
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm       0                0         (0/0/0)            0
  5        var    wm   21331 - 24233        4.00GB    (2903/0/0)   8386767
  6 unassigned    wm   24234 - 24596      512.06MB    (363/0/0)    1048707
  7 unassigned    wm   24597 - 24619       32.44MB    (23/0/0)       66447

partition> quit

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> quit

Im Bereich “partition” kann man mit “print” die aktuelle Partitionstabelle ansehen. Bei neuen Platten wird ein Standardvorschlag zur Partitionierung angezeigt, der natürlich abgeändert werden kann. Wird dies nicht getan und trotzdem “label” ausgeführt, wird dieser default-label geschrieben.

Hat man nun die Aufgabe eine größere Anzahl Platten zu partitionieren möchte man dann den Vorgang doch irgendwie automatisieren. Dazu gibt es die Tools prtvtoc und fmthard. Mit prtvtoc kann die Partitionstabelle einer Platte als Text in genormter Form ausgegeben werden.

root@server # prtvtoc /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     107 sectors/track
*      27 tracks/cylinder
*    2889 sectors/cylinder
*   24622 cylinders
*   24620 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00          0  19682757  19682756
       1      3    01   19682757  41942502  61625258
       2      5    00          0  71127180  71127179
       5      7    00   61625259   8386767  70012025
       6      0    00   70012026   1048707  71060732
       7      0    00   71060733     66447  71127179

Diese Ausgabe läßt sich nun als Vorlage nutzen um Platten mit “fmthard” zu partitionieren. Sinn ergibt das natürlich nur bei Disks mit gleicher Größe.

prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c1t0d0s2

Dummerweise bekommt man nun ziemlich wahrscheinlich einen I/O-error beim Schreiben der Partitionstabelle auf die zweite Platte (wenn diese neu ist). Hier des Rätsels Lösung:

manpage zu “fmthard

For disks under one terabyte, fmthard cannot write a VTOC on an unlabeled disk. Use format(1M) for this purpose.
SunOS 5.10          Last change: 11 Apr 2005

Na klasse, da läßt sich das Tool zum Automatisieren in der Masse der Anwendungsfälle also nicht nutzen. Weniger bekannt ist der folgende Workaround:

Man automatisiert das Schreiben eines Standard disk label mit “Format” und benutzt im Anschluss wie oben gezeigt “prtvtoc” und “fmthard” (üblicherweise wird immer die Slice 2 angegeben, da diese per Definition die komplette Disk umfassen sollte!).

echo label > /tmp/input
echo quit >> /tmp/input
format -d c1t0d0  -f /tmp/input
prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c1t0d0s2

Um eine größere Zahl Disks zu partitionieren schreibt man ein kleines Skript:

cd /dev/rdsk/
echo label > /tmp/input
echo quit >> /tmp/input
DISKS=$(ls c4t50d*s2|sed 's/s2//')
export DISKS
for i in $DISKS
do
format -d $i -f /tmp/input
done

In diesem Beispiel werden alle LUNs am Controller 4 / Target 50 mit einem Standard disk label versehen.

Danach kann man z.B. das Partitionslayout einer Platte auf alle neuen Platten übertragen:

for i in $DISKS
do
prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/${i}s2
done

Alternativ könnte man aber auch die neuen Platten einem Diskset hinzufügen:

for i in $DISKS
do
metaset -s oradb -a $i
done

P.S.

Die Skripte kann man natürlich noch schöner schreiben. Ich will hier nur das Prinzip zeigen…

Hier noch etwas Lesestoff: http://docs.sun.com/app/docs/doc/817-5093/disksprep-103?a=view

Comments Kommentare deaktiviert

Vorlesen mit webReader

Wer Linux oder OpenSolaris in einer Multiboot-Umgebung betreibt verwendet i.d.R. grub als Bootmanager. Will man dann u.U. grub wieder loswerden, z.B. weil man OpenSolaris nur testen wollte, und auf den Standard Windows XP Bootmanager wieder zurückstellen funktioniert das folgendermaßen:

  • Windows XP CD und Administrator-Passwort bereithalten (falls nicht bekannt, das Passwort vorher neu vergeben!)
  • Windows-Partition auf aktiv setzen (Windows > rechte MT auf Arbeitsplatz > Verwalten > Datenspeicher > Datenträgerverwaltung > rechte MT  auf Partition C: > Partition als aktiv markieren > ja), danach Reboot
  •  von Windows XP CD starten und mit “R” in die Wiederherstellungskonsole wechseln, i.d.R. mit “1″ das relevante Windows auswählen und das Administrator-Passwort eingeben
  • Danach fixboot, ggf. auch fixmbr eingeben, anschließend Reboot
  • Danach können die Linux-/OpenSolaris-Partitionen gefahrlos in der Datenträgerverwaltung gelöscht werden

Comments 2 Kommentare »

Vorlesen mit webReader

Will man bei Solaris die Performance überwachen empfehle ich zusätzlich zu den mitgelieferten Tools die Programme der Performance Tools  CD. Hier ein paar “real life”-Ausgaben der Systemlast auf einem Sun Fire 6800-System (Oracle-DB-Import während Unicode-Migration eines mySAP.ERP2005-Systems). Im Beispiel wird eine auf Disk exportierte DB in eine leere DB importiert. Dabei wird auch auf Unicode konvertiert.

Die Tools cpubar und iobar in Aktion:

cpubar und iobar

Im linken Bereich von cpubar sieht man die Auslastung der CPU-cores. Der deutlich größte Teil der Last (gün) wird vom R3load und den Oracle-Prozessen verbraucht. Die vom Betriebssystem selbst bzw. vom Kernel verursachte Last wird rot dargestellt. Der orange Teil stellt dar, dass die cores mehr oder weniger auf IO warten mussten, d.h. von Disk lesen und auf Disk schreiben. Deutlicher wird das am zweiten roten Balken rechts daneben. In der “blocked queue” sieht man wie viele Prozesse aktuell auf IO warten.  Der Speicherverbrauch wird außerdem weiter rechts angezeigt.

iotop Statistik:

iotop

Diese iotop-statistik zeigt eines deutlich: Es gibt bei Zugriffen auf Speichermedien mehr relevante Werte als den Durchsatz in MB/s. Interessant ist vor allem auch IOPS (Schreib- und Lesevorgänge). Datenbanken wie Oracle schreiben und lesen i.d.R. in 8kB großen Böcken.

In diesem Beispiel sind die Disks per Multipathing-Software (hier EMC Powerpath) an ein Storagesystem angebunden (hier EMC DMX4). Dabei stehen 2 Dual-Channel 2Gb/s Fibrechannel-HBAs vom Typ Emulex LP9002-DC zur Verfügung. Der HBA-Typ bzw. der daruf verbaute ASIC entscheidet über dessen Leistungsfähigkeit.

Für die Administration unter Windows kann Portable Putty und XMing empfehlen (ssh-Client und X-Server).

Comments 3 Kommentare »

Vorlesen mit webReader

Zuletzt habe ich mediatomb 0.12 mit gcc unter dem neuen OpenSolaris 2008.11 kompiliert. Allerdings fehlte die Mysql-Unterstützung dank Fehler beim kompilieren. Schuld daran ist das Paket SUNWmysql5 im Release-Repository.

Deshalb nun zunächst Mysql selbst kompilieren…

Unter http://dev.mysql.com/downloads/mysql/5.1.html#source kann man ein aktuelles Quellcode-Paket als tar.gz herunterladen. Dieses muß zunächst entpackt werden und dann eine Shell im selben Verzeichnis geöffnet werden. Ich installiere wie zuletzt Eigenproduktionen unter /opt/local.

otmanix@pc103835:~/Downloads/mysql-5.1.30$ CC=gcc
otmanix@pc103835:~/Downloads/mysql-5.1.30$ export CC=gcc
otmanix@pc103835:~/Downloads/mysql-5.1.30$ export CFLAGS=”-O3 -fno-omit-frame-pointer”
otmanix@pc103835:~/Downloads/mysql-5.1.30$ export CXX=gcc
otmanix@pc103835:~/Downloads/mysql-5.1.30$ export CXXFLAGS=”-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti”
otmanix@pc103835:~/Downloads/mysql-5.1.30$ ./configure –prefix=/opt/local/mysql –localstatedir=/opt/local/mysql/data –libexecdir=/opt/local/mysql/bin –with-extra-charsets=complex –enable-thread-safe-client –enable-local-infile –disable-shared
checking build system type… i386-pc-solaris2.11

config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing default commands
MySQL has a Web site at http://www.mysql.com/ which carries details on the latest release, upcoming features, and other information to make your
work or play with MySQL more productive. There you can also find information about mailing lists for MySQL discussion. Remember to check the platform specific part of the reference manual for hints about installing MySQL on your platform. Also have a look at the files in the Docs directory.
Thank you for choosing MySQL!
otmanix@pc103835:~/Downloads/mysql-5.1.30$
otmanix@pc103835:~/Downloads/mysql-5.1.30$ cd sql
otmanix@pc103835:~/Downloads/mysql-5.1.30/sql$ pfexec /usr/ccs/bin/ar -ts .libs/libndb.a
libndb_la-ha_ndbcluster.o
libndb_la-ha_ndbcluster_binlog.o
libndb_la-ha_ndbcluster_cond.o
otmanix@pc103835:~/Downloads/mysql-5.1.30/sql$ cd ..
otmanix@pc103835:~/Downloads/mysql-5.1.30$ pfexec make

make[1]: Leaving directory `/export/home/otmanix/Downloads/mysql-5.1.30/win’
otmanix@pc103835:~/Downloads/mysql-5.1.30$
otmanix@pc103835:~/Downloads/mysql-5.1.30$ pfexec make install

make[1]: Leaving directory `/export/home/otmanix/Downloads/mysql-5.1.30/win’
otmanix@pc103835:~/Downloads/mysql-5.1.30$

Nun ist also Mysql kompiliert und installiert. Ein neuer Versuch muß zeigen, ob der Mysql-Support im mediatomb mit dem Mysql-Eigenbau beim kompilieren erfolgreicher läuft…
otmanix@pc103835:~/Downloads/mediatomb$ ./configure –prefix=/opt/local –enable-db-autocreate –enable-iconv-lib –enable-mrreg-service –enable-protocolinfo-extension –enable-sqlite3 –enable-libjs –enable-libmagic –enable-taglib –enable-libexif –enable-youtube –enable-external-transcoding –enable-curl –enable-ffmpeg –with-js-h=/usr/include/firefox/js –with-js-libs=/usr/lib/firefox –with-ffmpeg-libs=/opt/LWS/lib –with-ffmpeg-h=/opt/LWS/include –with-libmagic-h=/opt/local/include –with-libmagic-libs=/opt/local/lib –with-libmp4v2-libs=/opt/LWS/lib –with-libmp4v2-h=/opt/LWS/include –with-search=/opt/LWS –with-mysql-cfg=/opt/local/mysql/bin/mysql_config

checking sqlite3.h usability… yes
checking sqlite3.h presence… yes
checking for sqlite3.h… yes
checking for sqlite3_open in -lsqlite3… yes
configure: Will search for mysql config in /opt/local/mysql/bin/mysql_config
configure: You specified /opt/local/mysql/bin/mysql_config for mysql_config
checking mysql cflags… -I/opt/local/mysql/include/mysql -DHAVE_RWLOCK_T -DUNIV_SOLARIS
checking mysql libs… -L/opt/local/mysql/lib/mysql -lmysqlclient_r -lz -lpthread -lthread -lgen -lsocket -lnsl -lm -lpthread -lthread
checking mysql.h usability… yes
checking mysql.h presence… yes
checking for mysql.h… yes
checking for mysql_init… yes
checking mysql version… 5.1.30
checking for mysql_stmt_init… yes
checking MYSQL_OPT_RECONNECT… yes


CONFIGURATION SUMMARY —-
sqlite3               : yes
mysql                 : yes
libjs                 : yes
libmagic              : yes
inotify               : missing
libexif               : yes
id3lib                : disabled
taglib                : yes
libmp4v2              : yes
libdvdnav             : missing
ffmpeg                : yes
ffmpegthumbnailer     : missing
external transcoding  : yes
curl                  : yes
YouTube               : yes
Weborama              : disabled
Apple Trailers        : yes
SopCast               : disabled
libextractor          : disabled
db-autocreate         : yes
otmanix@pc103835:~/Downloads/mediatomb$

So stelle ich mir das vor… Manchmal rentiert es sich also doch selbst Hand anzulegen ;)

Comments 1 Kommentar »

Vorlesen mit webReader

Seit kurzem ist OpenSolaris 2008.11 verfügbar. Es wurden zahlreiche Verbesserungen seit dem ersten Release Anfang des Jahres vorgenommen. Der erste Eindruck war recht positiv. Wie sieht es aber mit der Praxistauglichkeit auf einem Standard-PC/Notebook aus? Die Auswahl der Software hat sich durch zahlreiche neue packages enorm verbessert, auch kamen neue repositories hinzu. Im direkten Vergleich mit Linux-Distributionen fehlt noch die eine oder andere Software. Wie einfach ist es also OSS im Eigenbau nachzuinstallieren?

Nachdem ich vor kurzem eine Installationsanleitung für den Mediaserver “mediatomb” unter Opensuse 11.0 im Blog veröffentlichte lag es nahe, nun mediatomb unter OpenSolaris zu installieren. Mediatomb 0.11 steht als nicht getestetes package im opensolaris-pending-repository zur Verfügung. Mich interessierte aber die “work in progress”-Version mediatomb 0.12.

opensolaris-repositories

Weitere Infos zur Verfahrensweise in den opensolaris-repositories gibt es hier.

Ich führe jetzt alle packages in den jeweiligen opensolaris-repositories auf, die ggf. für die Installation von mediatomb relevant sind. Manche davon sind optional.

opensolaris.org-release

http://pkg.opensolaris.org/release/

SUNWsqlite3 – /usr/bin/sqlite3
SUNWmysql5 – /usr/mysql/5.0/bin/mysql
SUNWsvn – /usr/bin/svn
SUNWgcc – /usr/bin/gcc
SUNWgmake – /usr/gnu/bin/make
SUNWgnu-automake-110 – /usr/bin/automake-1.10
SUNWgm4 – /usr/bin/gm4
SUNWaconf – /usr/bin/autoconf
SUNWcs – /usr/bin/file (file/libmagic zur Mimetype-Erkennung zu alt)
SUNWwget – /usr/bin/wget
SUNWgnu-libiconv – /usr/gnu/lib/libiconv.so
SUNWcurl – /usr/lib/libcurl.so
SUNWzlib – /usr/lib/libz.so
SUNWfirefox – /usr/lib/firefox/libmozjs.so (spidermonkey, JS-Engine des Firefox)
SUNWlibexif – /usr/lib/libexif.so
SUNWpng – /usr/lib/libpng.so

opensolaris.org-pending

http://pkg.opensolaris.org/pending/

mediatomb – /usr/bin/mediatomb (ältere Version 0.11.0-0.101, installationsfertig ohne kompilieren!)
taglib – /usr/lib/libtag.so
libextractor – /usr/lib/libextractor.so

life with solaris

http://pkg.lifewithsolaris.jp:10000/

LWSffmpeg – /opt/LWS/bin/ffmpeg
LWSvlc – /opt/LWS/bin/vlc
LWSlibdvdnav -/opt/LWS/lib/libdvdnav.so

sunfreeware

http://pkg.sunfreeware.com:9000/

blastwave

http://blastwave.network.com:10000/

Sourcecode

Hier noch die Quellen für den benötigten Sourcecode… Die mit gcc selbst kompilierten Programme installiere ich unter /opt/local.

file (libmagic)

http://www.darwinsys.com/file/

ftp://ftp.astron.com/pub/file/file-4.26.tar.gz

libffmpegthumbnailer

http://code.google.com/p/ffmpegthumbnailer/

http://code.google.com/p/ffmpegthumbnailer/downloads/list

mediatomb

https://svn.mediatomb.cc/svnroot/mediatomb/trunk/mediatomb/README.UTF_8

http://blogs.sun.com/constantin/entry/mediatomb_on_solaris

https://svn.mediatomb.cc/svnroot/mediatomb/trunk/mediatomb/

Umgebung einrichten

Im Benutzerprofil ~/.profile sollte man passend für die unterschiedlichen Installationspfade die PATH- und MANPATH-Umgebungsvariable anapssen:
export PATH=/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin:/usr/mysql/5.0/bin:/opt/LWS/bin:/opt/DTT/Bin:/opt/local/bin
export MANPATH=/usr/gnu/share/man:/usr/share/man:/usr/X11/share/man:/opt/LWS/man:/opt/DTT/Man:/opt/local/bin

Ebenfalls sollte die Runtime Linkung Umgebung angepasst werden:
root@pc103835:/opt/local/bin# crle -e LD_LIBRARY_PATH=/lib:/usr/lib:/usr/gnu/lib:/usr/lib/firefox:/opt/LWS/lib:/opt/local/lib

file / libmagic

Mit dem Tool file soll automatisch der Dateityp (mime-type) bestimmt werden. Das im Lieferumfang enthaltene Tool bringt keine befriedigende Ergebnisse, erst das selbst kompilierte:

otmanix@pc103835:~/Downloads/media$ file -i “Dolby Digital Trailer – Aurora – AC3 6CH – 448 kbps.vob”
Dolby Digital Trailer – Aurora – AC3 6CH – 448 kbps.vob:    regular file
otmanix@pc103835:~/Downloads/media$ /opt/local/bin/file -i “Dolby Digital Trailer – Aurora – AC3 6CH – 448 kbps.vob”
Dolby Digital Trailer – Aurora – AC3 6CH – 448 kbps.vob: video/mp2p

Deshalb wird das gepackte Sourcecode-Paket heruntergeladen, entpackt, vorbereitet und kompiliert.

otmanix@pc103835:~/Downloads$ gunzip file-4.26.tar.gz
otmanix@pc103835:~/Downloads$ tar -xf file-4.26.tar
otmanix@pc103835:~/Downloads$ cd file-4.26
otmanix@pc103835:~/Downloads/file-4.26$ ./configure –prefix=/opt/local
checking for a BSD-compatible install… /usr/bin/ginstall -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /usr/gnu/bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking for builtin ELF support… yes
checking for ELF core file support… yes
checking for file formats in man section 5… no
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes

checking for vasprintf… no
checking for gzopen in -lz… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating magic/Makefile
config.status: creating tests/Makefile
config.status: creating doc/Makefile
config.status: creating python/Makefile
config.status: creating config.h
config.status: executing depfiles commands
otmanix@pc103835:~/Downloads/file-4.26$
otmanix@pc103835:~/Downloads/file-4.26$ su -
Password:
Sun Microsystems Inc.    SunOS 5.11    snv_101b    November 2008
root@pc103835:~# cd /export/home/otmanix/Downloads/file-4.26
root@pc103835:/export/home/otmanix/Downloads/file-4.26# make
make  all-recursive
make[1]: Entering directory `/export/home/otmanix/Downloads/file-4.26′
Making all in src
make[2]: Entering directory `/export/home/otmanix/Downloads/file-4.26/src’

make[2]: Entering directory `/export/home/otmanix/Downloads/file-4.26′
make[2]: Leaving directory `/export/home/otmanix/Downloads/file-4.26′
make[1]: Leaving directory `/export/home/otmanix/Downloads/file-4.26′
root@pc103835:/export/home/otmanix/Downloads/file-4.26# make install
Making install in src
make[1]: Entering directory `/export/home/otmanix/Downloads/file-4.26/src’
make[2]: Entering directory `/export/home/otmanix/Downloads/file-4.26/src’
test -z “/opt/local/lib” || /usr/gnu/bin/mkdir -p “/opt/local/lib”
/bin/sh ../libtool –mode=install /usr/bin/ginstall -c  ‘libmagic.la’ ‘/opt/local/lib/libmagic.la’
/usr/bin/ginstall -c .libs/libmagic.so.1.0.0 /opt/local/lib/libmagic.so.1.0.0

make[2]: Leaving directory `/export/home/otmanix/Downloads/file-4.26′
make[1]: Leaving directory `/export/home/otmanix/Downloads/file-4.26′
root@pc103835:/export/home/otmanix/Downloads/file-4.26#

ffmpegthumbnailer

Das optionale Tool ffmpegthumbnailer kann Vorschaubilder für Videos generieren und benötigt ffmpeg als Basis.

otmanix@pc103835:~/Downloads$ gunzip ffmpegthumbnailer-1.3.0.tar.gz
otmanix@pc103835:~/Downloads$ tar -xf ffmpegthumbnailer-1.3.0.tar
otmanix@pc103835:~/Downloads$ cd ffmpegthumbnailer-1.3.0
otmanix@pc103835:~/Downloads/ffmpegthumbnailer-1.3.0$
otmanix@pc103835:~/Downloads/ffmpegthumbnailer-1.3.0$ export PKG_CONFIG_PATH=/opt/LWS/lib/pkgconfig:/usr/lib/pkgconfig
otmanix@pc103835:~/Downloads/ffmpegthumbnailer-1.3.0$ ./configure –prefix=/opt/local

checking for FFMPEG… configure: error:  +Could not find ffmpeg. Please update PKG_CONFIG_PATH to point at location of ffmpeg pkgconfig files directory.
otmanix@pc103835:~/Downloads/ffmpegthumbnailer-1.3.0$

Das Problem, warum hier ffmpeg nicht gefunden wird, konnte ich bis dato nicht lösen. Für Tips zur Lösung bin ich dankbar. Es ist aber kein Beinbruch – das Tool bietet ein “nice to have”-feature, mehr nicht…

mediatomb

Mediatomb 0.12 steht nicht als tar.gz -Download zur Verfügung und muss per svn beschafft werden.

otmanix@pc103835:~/Downloads/tmp$ svn co https://svn.mediatomb.cc/svnroot/mediatomb/trunk/mediatomb mediatomb
Error validating server certificate for ‘https://svn.mediatomb.cc:443′:
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
- The certificate hostname does not match.
Certificate information:
- Hostname: *.svn.sourceforge.net
- Valid: from Nov 11 20:25:27 2008 GMT until Jan 11 20:25:27 2010 GMT
- Issuer: Equifax Secure Certificate Authority, Equifax, US
- Fingerprint: 04:b2:70:e9:ba:cf:70:fc:e8:8a:22:86:14:13:51:97:1b:6a:de:38
(R)eject, accept (t)emporarily or accept (p)ermanently? t
A    mediatomb/README.UTF_8
A    mediatomb/devconf
A    mediatomb/AUTHORS
A    mediatomb/webnew
A    mediatomb/webnew/images
A    mediatomb/webnew/images/status_loading.png
A    mediatomb/webnew/images/default
A    mediatomb/webnew/images/default/shadow-lr.png
A    mediatomb/webnew/images/default/grid

A    mediatomb/web/js/nanotree.js
A    mediatomb/web/js/autoscan.js
A    mediatomb/web/js/tree.js
A    mediatomb/web/js/tools.js
A    mediatomb/web/js/auth.js
A    mediatomb/web/js/items.js
U   mediatomb
Checked out revision 1994.
otmanix@pc103835:~/Downloads/tmp$
otmanix@pc103835:/$ su -
Password:
Sun Microsystems Inc.    SunOS 5.11    snv_101b    November 2008
root@pc103835:~# ln -s /usr/bin/automake-1.10 /usr/bin/automake
root@pc103835:~# ln -s /usr/bin/aclocal-1.10 /usr/bin/aclocal
root@pc103835:~# exit
otmanix@pc103835:~/Downloads/tmp$ cd mediatomb/
otmanix@pc103835:~/Downloads/tmp/mediatomb$ autoreconf -i
/usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
/usr/share/aclocal/audiofile.m4:12:   run info ‘(automake)Extending aclocal’
/usr/share/aclocal/audiofile.m4:12:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:339: installing `configure_aux/compile’
configure.ac:51: installing `configure_aux/config.sub’
configure.ac:36: installing `configure_aux/missing’
configure.ac:36: installing `configure_aux/install-sh’
configure.ac:51: installing `configure_aux/config.guess’
build/Makefile.am: installing `configure_aux/depcomp’
otmanix@pc103835:~/Downloads/tmp/mediatomb$

Nun kann kommt der interessante Teil der Show – die passenden Parameter für configure herauszusuchen. Wie oben bereits erwähnt fällt ffmpegthumbnailerals Option aus bis das configure-Problem gelöst ist.

Wie der Meister-Systemheld Constantin Gonzalez bereits in seinem mediatomb-Abenteuer unter Solaris Express feststellte ist die Javascript-Engine SpiderMonkey nicht einzeln notwendig sondern kann vom Firefox-Paket genutzt werden.

otmanix@pc103835:~/Downloads/tmp/mediatomb$ ./configure –prefix=/opt/local –enable-db-autocreate –enable-iconv-lib –enable-mrreg-service –enable-protocolinfo-extension –enable-sqlite3 –enable-libjs –enable-libmagic –enable-taglib –enable-libexif –enable-youtube –enable-external-transcoding –enable-curl –enable-ffmpeg –with-js-h=/usr/include/firefox/js –with-js-libs=/usr/lib/firefox –with-ffmpeg-libs=/opt/LWS/lib –with-ffmpeg-h=/opt/LWS/include –with-libmagic-h=/opt/local/include –with-libmagic-libs=/opt/local/lib –with-libmp4v2-libs=/opt/LWS/lib –with-libmp4v2-h=/opt/LWS/include –with-search=/opt/LWS –with-mysql-cfg=/usr/mysql/5.0/bin/mysql_config
checking for a BSD-compatible install… /usr/bin/ginstall -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /usr/gnu/bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking build system type… i386-pc-solaris2.11
checking host system type… i386-pc-solaris2.11
configure: Will also search for packages in /opt/LWS

configure: Will search for mysql config in /usr/mysql/5.0/bin/mysql_config
configure: You specified /usr/mysql/5.0/bin/mysql_config for mysql_config
checking mysql cflags… -I/usr/mysql/5.0/include/mysql  -xprefetch=auto -xprefetch_level=3 -mt -fns=no -fsimple=1 -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic   -DBIG_TABLES -DHAVE_RWLOCK_T
checking mysql libs… -L/opt/SUNWspro/lib -lCrun -lrt -L/usr/mysql/5.0/lib/mysql -R/usr/mysql/5.0/lib/mysql -lmysqlclient_r -lz -lpthread -lthread -lgen -lsocket -lnsl -lm -lpthread -lthread
checking mysql.h usability… no
checking mysql.h presence… yes
configure: WARNING: mysql.h: present but cannot be compiled
configure: WARNING: mysql.h:     check for missing prerequisite headers?
configure: WARNING: mysql.h: see the Autoconf documentation
configure: WARNING: mysql.h:     section “Present But Cannot Be Compiled”
configure: WARNING: mysql.h: proceeding with the preprocessor’s result
configure: WARNING: mysql.h: in the future, the compiler will take precedence
configure: WARNING:     ## ——————————- ##
configure: WARNING:     ## Report this to jin@mediatomb.cc ##
configure: WARNING:     ## ——————————- ##
checking for mysql.h… yes
checking for mysql_init… no

configure: Will search for js (spidermonkey) headers in /usr/include/firefox/js
checking /usr/include/firefox/js/jsapi.h usability… yes
checking /usr/include/firefox/js/jsapi.h presence… yes
checking for /usr/include/firefox/js/jsapi.h… yes
configure: Will search for js (spidermonkey) libraries in /usr/lib/firefox
checking for JS_NewObject in -ljs… no
checking for JS_NewObject in -lsmjs… no
checking for JS_NewObject in -lmozjs… yes
checking for JS_ClearContextThread in -lmozjs… yes
configure: Will search for libmagic headers in /opt/local/include
checking /opt/local/include/magic.h usability… yes
checking /opt/local/include/magic.h presence… yes
checking for /opt/local/include/magic.h… yes
configure: Will search for libmagic libs in /opt/local/lib
checking for magic_load in -lmagic… yes
checking if libmagic is broken (Slackware check)… yes
configure: WARNING: your magic library is broken, if you are using Slackware install the ‘file’ package manually
configure: WARNING: id3lib disabled

checking for sys/inotify.h… no
checking /opt/LWS/include/sys/inotify.h usability… no
checking /opt/LWS/include/sys/inotify.h presence… no
checking for /opt/LWS/include/sys/inotify.h… no

checking for dvdnav-config… /opt/LWS/bin/dvdnav-config
checking libdvdnav cflags… -I/opt/LWS/include -I/opt/LWS/include/dvdnav
checking libdvdnav libs… -L/opt/LWS/lib -ldvdnav -lpthread
checking dvdnav/dvdnav.h usability… yes
checking dvdnav/dvdnav.h presence… yes
checking for dvdnav/dvdnav.h… yes
checking for dvdnav_get_audio_attr in -ldvdnav… no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating build/Makefile
config.status: creating doc/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/js/Makefile
config.status: creating scripts/mediatomb-service-optware
config.status: creating tombupnp/Makefile
config.status: creating tombupnp/build/Makefile
config.status: creating web/Makefile
config.status: creating config/Makefile
config.status: creating artwork/Makefile
config.status: creating mediatomb.spec
config.status: creating autoconfig.h
config.status: creating tombupnp/upnp/inc/upnpconfig.h
config.status: tombupnp/upnp/inc/upnpconfig.h is unchanged
config.status: executing depfiles commands

CONFIGURATION SUMMARY —-

sqlite3               : yes
mysql                 : missing
libjs                 : yes
libmagic              : yes
inotify               : missing
libexif               : yes
id3lib                : disabled
taglib                : yes
libmp4v2              : yes
libdvdnav             : missing
ffmpeg                : yes
ffmpegthumbnailer     : missing
external transcoding  : yes
curl                  : yes
YouTube               : yes
Weborama              : disabled
Apple Trailers        : yes
SopCast               : disabled
libextractor          : disabled
db-autocreate         : yes

otmanix@pc103835:~/Downloads/tmp/mediatomb$

Warum Mysql nicht richtig erkannt wurde kann ich noch nicht nachvollziehen und werde das wohl an die mediatomb-Leute weiterschicken… Immerhin sollte Sqlite als Datenbank funktionieren. Das ist zwar etwas langsamer, aber besser als gar nichts…

Inotify wird scheinbar vom OpenSolaris-Kernel nicht untersützt. Filesystem-event gesteuertes Auffrischen der Mediendatenbank funktioniert so nicht. Es gibt schlimmeres…

Libdvdnav ist zwar vorhanden – es fehlt aber ein Feature. Vielleicht in der nächsten Version…

Ffmpegthumbnailer wurde bereits erwähnt, der Verzicht auf Vorschaubilder ist verschmerzbar.

Das sieht also insgesamt gar nicht schlecht aus…

otmanix@pc103835:~/Downloads/tmp/mediatomb$ su -
Password:
Sun Microsystems Inc.    SunOS 5.11    snv_101b    November 2008
root@pc103835:~# cd /export/home/otmanix/Downloads/tmp/mediatomb/
root@pc103835:/export/home/otmanix/Downloads/tmp/mediatomb# make
make  all-recursive
make[1]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb’
Making all in tombupnp
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/tombupnp’
Making all in build
make[3]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/tombupnp/build’
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../tombupnp/upnp/inc    -I../../tombupnp/ixml/src/inc -I../../tombupnp/ixml/inc -I../../tombupnp/threadutil/inc -I../../tombupnp/upnp/src/inc -I../../tombupnp/upnp/inc -I../.. -g -O2 -I/usr/include/firefox/js -I/opt/LWS/include -MT libtombupnp_a-attr.o -MD -MP -MF .deps/libtombupnp_a-attr.Tpo -c -o libtombupnp_a-attr.o `test -f ‘../ixml/src/attr.c’ || echo ‘./’`../ixml/src/attr.c

ld: warning: relocation warning: R_386_32: file libmediatomb.a(libmediatomb_a-auth.o): section .rel.eh_frame: symbol .gnu.linkonce.t._ZN14LoginExceptionD1Ev (section): relocation against discarded COMDAT section .gnu.linkonce.t._ZN14LoginExceptionD1Ev: symbol not found, relocation ignored
make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/build’
Making all in scripts
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/scripts’
Making all in js
make[3]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/scripts/js’
make[3]: Nothing to be done for `all’.
make[3]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/scripts/js’
make[3]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/scripts’
make[3]: Nothing to be done for `all-am’.
make[3]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/scripts’
make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/scripts’
Making all in web
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/web’
make[2]: Nothing to be done for `all’.
make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/web’
Making all in config
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/config’
make[2]: Nothing to be done for `all’.
make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/config’
Making all in doc
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/doc’
make[2]: Nothing to be done for `all’.
make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/doc’
Making all in artwork
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/artwork’
make[2]: Nothing to be done for `all’.
make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb/artwork’
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb’
make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb’
make[1]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb’
root@pc103835:/export/home/otmanix/Downloads/tmp/mediatomb#
root@pc103835:/export/home/otmanix/Downloads/tmp/mediatomb# make install
Making install in tombupnp
make[1]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/tombupnp’
Making install in build
make[2]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/tombupnp/build’
make[3]: Entering directory `/export/home/otmanix/Downloads/tmp/mediatomb/tombupnp/build’
make[3]: Nothing to be done for `install-exec-am’.

make[2]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb’
make[1]: Leaving directory `/export/home/otmanix/Downloads/tmp/mediatomb’
root@pc103835:/export/home/otmanix/Downloads/tmp/mediatomb#

Funktionstest

Da es langsam spät wird, nur noch ein schneller “quick&dirty”-Funktionstest…

root@pc103835:/export/home/otmanix/Downloads/tmp/mediatomb# cd /opt/local/bin/
root@pc103835:/opt/local/bin# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
iwi0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
inet 192.168.178.110 netmask ffffff00 broadcast 192.168.178.255
ether 0:12:f0:66:c5:7

bge0: flags=201004803<UP,BROADCAST,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 3
inet 0.0.0.0 netmask ff000000
ether 0:b:5d:95:1b:49
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
bge0: flags=202004801<UP,MULTICAST,DHCP,IPv6,CoS> mtu 1500 index 3
inet6 fe80::20b:5dff:fe95:1b49/10
ether 0:b:5d:95:1b:49
iwi0: flags=202004841<UP,RUNNING,MULTICAST,DHCP,IPv6,CoS> mtu 1500 index 2
inet6 fe80::212:f0ff:fe66:c507/10
which ether 0:12:f0:66:c5:7
root@pc103835:/opt/local/bin#

In diesem Beispiel ist mein Notebook der Streamingserver und ist per WLAN am Interface iwi0 erreichbar.

Nun also nur noch die passende Umgebung setzen und Mediatomb starten…

root@pc103835:/opt/local/bin# export LD_PRELOAD=/usr/lib/0@0.so.1
root@pc103835:/opt/local/bin# ./mediatomb –interface iwi0 –port 50500 –daemon –pidfile /tmp/mediatomb.pid –logfile=/tmp/mediatomb.log&
[1] 1492

Nun noch schnell das Log kontrollieren…

root@pc103835:/opt/local/bin# tail -100 /tmp/mediatomb.log
2008-12-14 22:25:25    INFO: MediaTomb configuration was created in: /root/.mediatomb/config.xml
2008-12-14 22:25:25    INFO: Loading configuration from: /root/.mediatomb/config.xml
2008-12-14 22:25:25    INFO: UUID generated: 427336d5-c462-4cfd-a99a-ff447fd66203
2008-12-14 22:25:25    INFO: Checking configuration…
2008-12-14 22:25:26    INFO: Setting filesystem import charset to UTF-8
2008-12-14 22:25:26    INFO: Setting metadata import charset to UTF-8
2008-12-14 22:25:26    INFO: Setting playlist charset to UTF-8
2008-12-14 22:25:26    INFO: Configuration check succeeded.
2008-12-14 22:25:26 WARNING: Sqlite3 database seems to be corrupt or doesn’t exist yet.
2008-12-14 22:25:26    INFO: no sqlite3 backup is available or backup is corrupt. automatically creating database…
2008-12-14 22:25:26    INFO: database created successfully.
2008-12-14 22:25:26    INFO: Initialized port: 50500
2008-12-14 22:25:26    INFO: Server bound to: 192.168.178.110
2008-12-14 22:25:28    INFO: MediaTomb Web UI can be reached by following this link:
2008-12-14 22:25:28    INFO: http://192.168.178.110:50500/
root@pc103835:/opt/local/bin#

Hurra!

Nun noch ein paar Mediendateien per Web-UI zuweisen und die PS3 anwerfen…

funzt…

Good night…

Comments 2 Kommentare »