|
#1
|
|||
|
|||
|
How to install SqueezeCenter 7.2 on D-Link DNS-323
I've documented the steps I used to install SqueezeCenter 7.2 on a DNS-323. By looking for how to do it, I only found explanation explaining how to install an older version by chrooting to a debian or statements saying that it could never run on a DNS-323, so I decided to try it by myself. And finally it turned out to be possible and quite usable (the web front-end is a bit slow, but I don't care because I don't use it quite often). There may be a shorter way, but these steps worked for me twice (I retried from scratch in order to write this tutorial). I've tried to describe all commands, so that even a UNIX newbie can copy and paste all commands in a telnet session and get it work. When you see a line like this: "/mnt/HD_a2/ffp # rsync -av inreto.de::dns323/fun-plug/0.5/packages ." It shows you the current path where you should normally be when entering the command (/mnt/HD_a2/ffp #) and the command to type (rsync -av inreto.de::dns323/fun-plug/0.5/packages .) => type/copy the command from the #. Yannick --------------------------------------------------- Starting point: DNS-323, Firmware Version 1.05 ########################################### 1) Prepare the DNS-323 and install ffp 0.5: ########################################### 1.1) Log in the administration UI of the DNS-323, go to the tab Advanced/Users and add a new user 'squeezecenter' 1.2) Download and install the Fonz Fun-Plug 0.5 as described under http://www.inreto.de/dns323/fun-plug/0.5/ to get telnet access to the DNS-323. (Copy fun_plug and fun_plug.tgz to Volume 1 and reboot) 1.3) Install all the additional ffp0.5 packages. (You certainly don't need all of them, but disk space is the only thing I have enough on my DNS-323 and I didn't want to search long for what is necessary or not. Not that after the SqueezeCenter is installed you can still remove unused packages if you need more disk space) Code:
telnet ip_of_your_dns323 / # cd ffp /mnt/HD_a2/ffp # rsync -av inreto.de::dns323/fun-plug/0.5/packages . /mnt/HD_a2/ffp # cd packages /mnt/HD_a2/ffp/packages # funpkg -i *.tgz ############################# 2) Configure and start mysql: ############################# Mysql is the database used by SqueezeCenter to store all the metadata of your music collection. By default SqueezeCenter starts its own instance of mysql and ignores any existing mysql installation. In the case of the DNS-323 we want Squeezecenter to use the mysql instance which is installed on the system (installed in the previous step), because memory is short and SqueezeCenter doesn't provide a mysql binary for ARM. 2.1) Create a configuration file for mysql: The ffp installation of mysql comes without working configuration file. We have to copy it from the examples directory and modify it to indicate a path for the database which exists in the DNS323: Code:
/mnt/HD_a2/ffp/packages # cd /ffp/etc /mnt/HD_a2/ffp/etc # cp examples/mysql/my-small.cnf my.cnf - search for the section [mysqld] and add the line 'datadir = /ffp/var/mysql' after the line 'thread_stack = 64K'. You should have something like that: Code:
# The MySQL server [mysqld] port = 3306 socket = /ffp/var/run/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 datadir = /ffp/var/mysql Code:
/mnt/HD_a2/ffp/etc # mysql_install_db Code:
/mnt/HD_a2/ffp/etc # cd /ffp/start/ /mnt/HD_a2/ffp/start # chmod a+x mysqld.sh Code:
/mnt/HD_a2/ffp/start # sh mysqld.sh start Code:
/mnt/HD_a2/ffp/start # mysql_secure_installation Code:
- Set root password? [Y/n] Y - New password: yourpassword - Remove anonymous users? [Y/n] Y - Disallow root login remotely? [Y/n] Y - Remove test database and access to it? [Y/n] Y - Reload privilege tables now? [Y/n] Y Code:
/mnt/HD_a2/ffp/start # mysql -u root -p Enter password: your_root_password mysql> create database squeezecenter; mysql> grant all on squeezecenter.* to squeezecenter identified by 'your_password'; mysql> flush privileges; mysql> quit ######################################### 3) Download and install SqueezeCenter 7.2 ######################################### 3.1) Download and unzip SqueezeCenter 7.2: Code:
/mnt/HD_a2/ffp/start # cd /mnt/HD_a2/ /mnt/HD_a2 # wget http://downloads.slimdevices.com/SqueezeCenter_v7.2.0/squeezecenter-7.2-noCPAN.tgz /mnt/HD_a2 # tar xvfz squeezecenter-7.2-noCPAN.tgz /mnt/HD_a2 # cd squeezecenter-7.2-noCPAN/ - Edit slimserver.pl and scanner.pl and modify the first line to be: Code:
#!/ffp/bin/perl -w Last edited by yannick; 2008-09-17 at 15:36. Reason: Better formatting |
|
#2
|
|||
|
|||
|
#################################
4) Install dependent perl modules ################################# 4.1) Download and install some dependent perl modules in the SqueezeCenter installation: Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN # perl Bin/build-perl-modules.pl XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 YAML::Syck Code:
- Please enter a perl binary to use (defaults to /usr/bin/perl) This must be the same perl binary that you ran this program with --> /ffp/bin/perl - Please enter the path to your SqueezeCenter directory (ex: /usr/local/slimserver) --> /mnt/HD_a2/squeezecenter-7.2-noCPAN - Please enter a directory to download files to --> /ffp/tmp 4.2) Download and install manually additional dependent modules that are not installable with the build-perl-modules-pl script of SqueezeCenter. To do that we go to the temp directory /ffp/tmp: Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN # cd /ffp/tmp/ Code:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.35.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz GD-2.35.tar.gz /mnt/HD_a2/ffp/tmp # cd GD-2.35/ /mnt/HD_a2/ffp/tmp/GD-2.35 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/GD-2.35 # make /mnt/HD_a2/ffp/tmp/GD-2.35 # make install /mnt/HD_a2/ffp/tmp/GD-2.35 # cd .. Code:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.607.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz DBI-1.607.tar.gz /mnt/HD_a2/ffp/tmp # cd DBI-1.607/ /mnt/HD_a2/ffp/tmp/DBI-1.607 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/DBI-1.607 # make /mnt/HD_a2/ffp/tmp/DBI-1.607 # make install /mnt/HD_a2/ffp/tmp/DBI-1.607 # cd .. Code:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.008.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz DBD-mysql-4.008.tar.gz /mnt/HD_a2/ffp/tmp # cd DBD-mysql-4.008/ /mnt/HD_a2/ffp/tmp/DBD-mysql-4.008 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/DBD-mysql-4.008 # make /mnt/HD_a2/ffp/tmp/DBD-mysql-4.008 # make install /mnt/HD_a2/ffp/tmp/DBD-mysql-4.008 # cd .. Code:
perl Makefile.PL --libs="-Wl,-rpath -Wl,/ffp/lib -rdynamic -L/ffp/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/ffp/lib -lssl -lcrypto" 4.2.4) Download and install Encode: etectCode:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/J/JG/JGMYERS/Encode-Detect-1.01.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz Encode-Detect-1.01.tar.gz /mnt/HD_a2/ffp/tmp # cd Encode-Detect-1.01/ /mnt/HD_a2/ffp/tmp/Encode-Detect-1.01 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/Encode-Detect-1.01 # make /mnt/HD_a2/ffp/tmp/Encode-Detect-1.01 # make install /mnt/HD_a2/ffp/tmp/Encode-Detect-1.01 # cd .. Code:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/A/AB/ABW/Template-Toolkit-2.20.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz Template-Toolkit-2.20.tar.gz /mnt/HD_a2/ffp/tmp # cd Template-Toolkit-2.20/ /mnt/HD_a2/ffp/tmp/Template-Toolkit-2.20 # perl Makefile.PL Code:
/mnt/HD_a2/ffp/tmp/Template-Toolkit-2.20 # make /mnt/HD_a2/ffp/tmp/Template-Toolkit-2.20 # make install /mnt/HD_a2/ffp/tmp/Template-Toolkit-2.20 # cd .. Code:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Raw-Zlib-2.015.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz Compress-Raw-Zlib-2.015.tar.gz /mnt/HD_a2/ffp/tmp # cd Compress-Raw-Zlib-2.015/ /mnt/HD_a2/ffp/tmp/Compress-Raw-Zlib-2.015 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/Compress-Raw-Zlib-2.015 # make /mnt/HD_a2/ffp/tmp/Compress-Raw-Zlib-2.015 # make install /mnt/HD_a2/ffp/tmp/Compress-Raw-Zlib-2.015 # cd .. Code:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/IO-Compress-Base-2.015.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz IO-Compress-Base-2.015.tar.gz /mnt/HD_a2/ffp/tmp # cd IO-Compress-Base-2.015/ /mnt/HD_a2/ffp/tmp/IO-Compress-Base-2.015 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/IO-Compress-Base-2.015 # make /mnt/HD_a2/ffp/tmp/IO-Compress-Base-2.015 # make install /mnt/HD_a2/ffp/tmp/IO-Compress-Base-2.015 # cd .. Code:
/mnt/HD_a2/ffp/tmp # wget http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/IO-Compress-Zlib-2.015.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz IO-Compress-Zlib-2.015.tar.gz /mnt/HD_a2/ffp/tmp # cd IO-Compress-Zlib-2.015/ /mnt/HD_a2/ffp/tmp/IO-Compress-Zlib-2.015 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/IO-Compress-Zlib-2.015 # make /mnt/HD_a2/ffp/tmp/IO-Compress-Zlib-2.015 # make install /mnt/HD_a2/ffp/tmp/IO-Compress-Zlib-2.015 # cd .. Code:
wget http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Zlib-2.015.tar.gz /mnt/HD_a2/ffp/tmp # tar xfz Compress-Zlib-2.015.tar.gz /mnt/HD_a2/ffp/tmp # cd Compress-Zlib-2.015/ /mnt/HD_a2/ffp/tmp/Compress-Zlib-2.015 # perl Makefile.PL /mnt/HD_a2/ffp/tmp/Compress-Zlib-2.015 # make /mnt/HD_a2/ffp/tmp/Compress-Zlib-2.015 # make install /mnt/HD_a2/ffp/tmp/Compress-Zlib-2.015 # cd .. SqueezeCenter brings some CPAN libraries which conflicts with the one we just installed. We need to delete them: Code:
/mnt/HD_a2/ffp/tmp # cd /mnt/HD_a2/squeezecenter-7.2-noCPAN/CPAN/ /mnt/HD_a2/squeezecenter-7.2-noCPAN/CPAN # rm -r Encode/ /mnt/HD_a2/squeezecenter-7.2-noCPAN/CPAN # rm -r Template* /mnt/HD_a2/squeezecenter-7.2-noCPAN/CPAN # rm -r Compress/ Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN/CPAN # export LD_LIBRARY_PATH=/ffp/lib/mysql Edit the file /ffp/etc/rc and replace the line "unset LD_LIBRARY_PATH" with "EXPORT LD_LIBRARY_PATH=/ffp/lib/mysql" At that point you have all perl modules necessary to run SqueezeCenter ################################################## ############# 5) First starts of SqueezeCenter and final settings adjustments ################################################## ############# 5.1) First start SqueezeCenter Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN # ./slimserver.pl --user=squeezecenter During this first startup, several log and cache files have been generated. Unfortunately those files are created by default with root ownership and the user 'squeezecenter' doesn't have access on it. We have to fix that: 5.2) Fix ownership of generated files Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN # chown -R squeezecenter:500 Cache/ Logs/ prefs/ Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN # ./slimserver.pl --user=squeezecenter 5.4) Fix ownership of generated files (again) Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN # chown -R squeezecenter:500 Cache/ Logs/ prefs/ - Search for the lines defining dbpassword, dbsource and dbusername and modify them as follow: Code:
dbpassword: 'your_password' dbsource: dbi:mysql:hostname=localhost;port=3306;database=squeezecenter dbusername: root ############################# 6) Start SqueezeCenter daemon ############################# Code:
/mnt/HD_a2/squeezecenter-7.2-noCPAN # ./slimserver.pl --user=squeezecenter --daemon Configure from there the server. Note that a message like Code:
Useless use of a constant in void context at /i-data/1776811d/squeezecenter-7.2-noCPAN/Slim/Networking/Slimproto.pm line 129. ########################################## 7) Make SqueezeCenter start automatically ########################################## See post #81in this thread: http://forums.slimdevices.com/showpo...4&postcount=81 You are done! Last edited by yannick; 2009-04-08 at 14:22. Reason: Added link to procedure to start SC automatically |
|
#3
|
|||
|
|||
|
I see that all the http links have been shortened automatically.
You'll find as an attachment a .txt version of the description, so that you can copy/paste the commands more easily Yannick Last edited by yannick; 2008-09-17 at 16:10. Reason: Synchronize .txt document with the corrections in the main text |
|
#4
|
|||
|
|||
|
Thanks for the instructions, i'll try it out. By the way how do you copy and paste in putty?
|
|
#5
|
|||
|
|||
|
How do i find out which packages in ffp are needed? I run my ffp from usb stick (to allow the disks to spindown) so diskspace is not unlimited.
|
|
#6
|
|||
|
|||
|
I'm using Linux, so to copy paste, I only have to highlight the text to copy, and press the middle mouse button at the location where I want to paste it. I don't know how it works with Windows.
As for the packages which are needed, if you really need to save space, you'll have to start with a minimum number of packages and see where it complains that something is missing. The minimum you need for sure is gzip, perl, mysql, gcc and make. You probably need zlib, libxml, libpng, libjpeg and id3lib as well. For the rest you'll have to try... |
|
#7
|
|||
|
|||
|
thanks. This thread should be made a sticky. Looks quite complicated setup, and bit long to do. Think I'll sell off the DNS-323 the fan makes it a right noisy bugger.
|
|
#8
|
|||
|
|||
|
Hi,
Thank you for your great tutorial. Very easy to follow, crystal clear. I'm trying this on a Zyxel NSA-220 (similar hardware). Everything goes find, until the installation of DBD-mysql-4.008. The Makefile.pl script runs ok. Then on make, I get the following output. Any idea ? Code:
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
distcc -c -I/ffp/lib/perl5/site_perl/5.10.0/arm-linux-thread-multi/auto/DBI -I/ffp/include/mysql -pipe -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -O2 -pipe -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"4.008\" -DXS_VERSION=\"4.008\" -fPIC "-I/ffp/lib/perl5/5.10.0/arm-linux-thread-multi/CORE" dbdimp.c
distcc[16801] ERROR: nonblocking connect to 127.0.0.1:3632 failed: Connection refused
distcc[16801] Warning: failed to distribute dbdimp.c to 127.0.0.1, running locally instead
/ffp/bin/perl -p -e "s/~DRIVER~/mysql/g" /ffp/lib/perl5/site_perl/5.10.0/arm-linux-thread-multi/auto/DBI/Driver.xst > mysql.xsi
/ffp/bin/perl /ffp/lib/perl5/5.10.0/ExtUtils/xsubpp -typemap /ffp/lib/perl5/5.10.0/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 225
Warning: duplicate function definition 'rows' detected in mysql.xs, line 650
distcc -c -I/ffp/lib/perl5/site_perl/5.10.0/arm-linux-thread-multi/auto/DBI -I/ffp/include/mysql -pipe -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -O2 -pipe -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"4.008\" -DXS_VERSION=\"4.008\" -fPIC "-I/ffp/lib/perl5/5.10.0/arm-linux-thread-multi/CORE" mysql.c
distcc[16863] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/ffp/lib/mysql:/ffp/lib:/usr/lib" /ffp/bin/perl myld distcc -shared -Wl,-rpath -Wl,/ffp/lib -O2 dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so \
-L/ffp/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto \
/ffp/bin/ld: /usr/lib/libcrypto.so: warning: sh_link not set for section `.ARM.exidx'
/ffp/bin/ld: ERROR: Source object /usr/lib/libz.so has EABI version 4, but target blib/arch/auto/DBD/mysql/mysql.so has EABI version 0
/ffp/bin/ld: failed to merge target specific data of file /usr/lib/libz.so
/ffp/bin/ld: ERROR: Source object /usr/lib/libcrypto.so has EABI version 4, but target blib/arch/auto/DBD/mysql/mysql.so has EABI version 0
/ffp/bin/ld: failed to merge target specific data of file /usr/lib/libcrypto.so
collect2: ld returned 1 exit status
distcc[16924] ERROR: compile (null) on localhost failed
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
|
|
#9
|
|||
|
|||
|
One thing which is suspect there is that it tries to mix libraries from /ffp/lib and from the firmware (/usr/lib), which is I think the reason of your problem.
Look at this thread on this forum http://forum.dsmg600.info/t2906-Walk...im-center.html where somebody has a similar problem on a CH3SNAS and fonz suggested a few steps how to solve it. Unfortunately I'm not really an expert on C compilers and I am happy that things went well on the DNS323, but the solution is probably in one of those environment libraries, such as LD_RUN_PATH. You can also look there http://dev.mysql.com/doc/refman/5.1/...-problems.html if maybe you find a hint on how to compile this perl extension... Do all other perl modules compile fine (you can do 4.2.4->4.4.1 even if 4.2.3 failed)? Yannick |
|
#10
|
|||
|
|||
|
Yannick,
I followed your instructions, and everything works exactly as you described until the last step when I start squeezecenter as a daemon I get this error and it stops: "Useless use of a constant in void context at /mnt/HD_a2/squeezecenter-7.2-noCPAN/Slim/Networking/Slimproto.pm line 129 " The other difference I also had was that I had to adduser squeezecenter when I launched slimserver.pl the first time, because I had no squeezcenter user. |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -7. The time now is 20:43.





etect
Linear Mode

