1. Install FFP on your Zyxel NSA-220 in 8 steps (based on viewtopic.php?f=131&t=191 by Mijzelf)1.1 Install FFP
- Plug an USB stick of at least 64MB in your NSA-220 (the bigger, the better if you plan not to move ffp to your drive)
- Use the Webinterface to login to your box as admin.
- Goto Administration->Storage
- Use the 'Create an External Volume' button to change the filesystem of the stick to EXT3. This step will destroy all data on the stick. Give it an easy name (i.e. ffp_stick or ffp_key)
- The volume should be accessible via Samba. Be patient. It takes some time for it to be reachable. Download ffp_for_NSA-220.2.zip and extract the contents of ffp_for_NSA-220.2.zip to this share.
- Download fun_plug.tgz, and copy it to the share too. The share should contain 6 files now.
- In the webinterface goto Shutdown->Restart.
- Wait until the box has rebooted. Done!
1.2 Start the SSH and disable the telnet daemon for your own safety
By default, the telnet service is started.
To enable an ssh server:
telnet to the device, and do the following:
Code:
chmod a+x /ffp/start/sshd.sh
/ffp/start/sshd.sh start
After a while the ssh server should be started. Be patient. Try if it works. Two users have been created:
username: user password: user
username: root password: root
If it works, login as root and type
Code:
reboot
The box should reboot. If the ssh server is in the air again, you can disable the telnet server:
Code:
chmod a-x /ffp/start/telnetd.sh
I also suggest you immediately change your root and user passwords. Logged in as root:
Code:
passwd
then
Code:
passwd user
2. Move FFP to the hard drive (optional)If you want, you can move FFP to the one of the hard drive of the zyxel. But you will still need the stick to boot on it. THE STICK CANNOT BE REMOVED AT ANYTIME. Moving FFP to the local drive will prevent the stick to be full anytime.
2.1 To move FFP to the 1st disk, go to /i-data/ and check the disk labels. It should be md0 and md1 for JBODs. These are symbolic links. It might be different for RAID0 and RAID1. You will also see drives mounting points. Be sure you stay consistent in the use of these.
In the folder creation below, use the mounting point, not the symbolic link. For example, if you have md0, change dir to /i-data/md0 and check where you really are. Use this path for below commands. Otherwise it will not work.
In my system, "/i-data/md0" symbolic link goes to "/i-data/1776811d".
Code:
mkdir /i-data/1776811d/ffp
cp /ffp/* /i-data/1776811d/ffp/ -R
mv /ffp /ffp_old 'Do not delete it. Rename it. It is still necessary until reboot
ln -s /i-data/1776811/ffp /ffp 'create a symbolic link to replace the ffp folder on the root
reboot 'Reboot the box
Wait until the box has finished rebooting
2.2 Open a new ssh (or telnet session), and then, you can delete the old ffp folder:
Code:
rm -fR /ffp_old
Remember that the usb stick is still mandatory to boot.
2.3 Install additional FFP packages:
Code:
cd /ffp
rsync -av inreto.de::dns323/fun-plug/0.5/packages .
cd /ffp/packages
rsync -av inreto.de::dns323/fun-plug/0.5/extra-packages/perl/ . ' fonz has moved the perl packages from packages to extra-packages
wget http://www.inreto.de/dns323/fun-plug/0.5/extra-packages/perl/perl-5.10-2.tgz
funpkg -i *.tgz
Note that we download the perl package with wget, because the transfer with rsync corrupt it. No idea why.
You're done with FFP
3. Preparation to the Squeezecenter installation3.1 Create an installation folder where you will put all the packages you will need now on:
Code:
mkdir /ffp/install
cd /ffp/install
3.2 Install GNU nano text editor (It will be most helpful if you don't know how to use VI)
Code:
wget http://www.superkikim.com/files/nano-2.0.9.tar.gz
tar xvzf nano-2.0.9.tar.gz
cd nano-2.0.9
./configure --prefix /ffp
make
make install
Now, you can edit any text file using nano. In nano, to save.
Quick reference guide for nano: CTRL-X to exit (and save), CTRL-W to make a text search
4. Install SqueezeCenter on the Zyxel NSA-220 (based on http://forums.slimdevices.com/showthread.php?t=52664 by Yannick)Open an SSH session into the Zyxel if you're not in. But you should

4.1 Prepare mysql for Squeezecenter
4.1.1 Create a squeezecenter user
Code:
adduser squeezecenter -HD
4.1.2 mysql configuration
Create a configuration file for mysql. There is a example of config file delivered with FFP. We will use it as a base:
Code:
cd /ffp/etc
cp examples/mysql/my-small.cnf my.cnf
Edit the configuration file to change some parameters for our needs:
Code:
nano my.cnf
Search for the [mysqld] section. At the end of the section, add datadir = /ffp/var/mysql
The section will then look like:
Code:
[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
4.1.3 Database creation
4.1.3.1 You are still in the /ffp/etc directory. Install the mySQL database.
Code:
mysql_install_db
4.1.3.2 Make the mysql startup script excutable and start the mysql daemon
Code:
cd /ffp/start
chmod a+x mysqld.sh
./mysqld.sh start
When the mysql daemon has started, it didn't come pack to prompt on my NAS. Just press enter, to be sure if it's ok. It should come back to the prompt.
4.1.3.3 Secure mysql
Code:
mysql_secure_installation
Press enter on the 1st question. Then answer default (Y) to all questions and give your root password on password second question
4.1.3.4 Create the squeezecenter database
Code:
mysql -u root -p
Enter your root password
If you get the mysql> prompt, you're good so far.
Type the following commands in mySQL
Code:
mysql> create database squeezecenter;
mysql> grant all on squeezecenter.* to squeezecenter identified by 'your_root_password';
mysql> flush privileges;
mysql> quit
At this point, we have a running mySQL installation and an empty squeezecenter database that SqueezeCenter can use. MySQL will start automatically when you
4.2 Install The SqueezeCenter server
4.2.1 Go back to your installation directory
Code:
cd /ffp/install
4.2.2 Download and untar the Squeezecenter 7.2 noCPAN perl source:
Code:
wget http://downloads.slimdevices.com/SqueezeCenter_v7.2.0/squeezecenter-7.2-noCPAN.tgz
tar xvzf squeezecenter-7.2-noCPAN.tgz
This folder will be your main squeezecenter folder. Therefore, it would be wise to put it in a logical place. For exemple /ffp/squeezecenter_v7.2.0-noCPAN
Code:
mv squeezecenter-7.2-noCPAN /ffp/
4.2.3 To simplify your installation and your future maintenance of Squeezecenter, create a symbolic link in the root to squeezecenter
Code:
cd /
ln -s /ffp/squeezecenter-7.2-noCPAN squeezecenter
As of now, you will do everything from the "squeezecenter" symbolic link directly.
4.2.4 Install dependent perl modules
Go to the squeezecenter folder (throught the symbolic link):
Code:
cd /squeezecenter
4.2.4.1 Download and install some dependent perl modules in the SqueezeCenter installation.
Code:
perl Bin/build-perl-modules.pl XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 YAML::Syck
Answer to the questions as follow:
Code:
- Please enter a perl binary to use: /ffp/bin/perl
- Please enter the path to your SqueezeCenter directory (ex: /usr/local/slimserver) --> /squeezecenter
- Please enter a directory to download files to --> /ffp/tmp
The system will automatically download, compile and install a few perl modules. This will take some time and output a few warnings and non blocking errors that you can ignore.
4.2.4.2 Get additional packages that you will have to compile manually. I have prepared two scripts to do it easier and faster. These scripts are very simple and do not make any check. So please be attentive to the messages it gives.
Code:
cd /ffp/tmp
wget http://www.superkikim.com/files/get_sc_packages
wget http://www.superkikim.com/files/comp_sc_packages
Run the get_sc_packages script to get the packages. This script will download the required packages from the CPAN website.
Code:
chmod a+x get_sc_packages
./get_sc_packages
Run the comp_sc_packages to compile the packages. This script will compile and install the 8 downloaded packages.
Code:
chmod a+x comp_sc_packages
./comp_sc_packages
Beware: These scripts do not check if packages have been installed correctly. Be attentive during the compilation process, and take note of any suspect
message.
4.2.4.3 Edit the rc file to set the LD_LIBRARYPATH environment variable at boot
Code:
nano /ffp/etc/rc
Replace the line
Code:
unset LD_LIBRARY_PATH
with
Code:
EXPORT LD_LIBRARY_PATH=/ffp/lib/mysql
At that point you have all perl modules necessary to run SqueezeCenter.
5. Start of SqueezeCenter and final settings adjustmentsIf you missed point 4.1.1 (creation of the squeezecenter user) it is time to do it now. Otherwise, you will be in trouble.
Go the SqueezeCenter directory:
Code:
cd /squeezecenter
5.1 Modify the header of the .pl scripts to use the ffp installed perl binary
Code:
nano slimserver.pl
Change the 1st line to
Code:
#!/ffp/bin/perl -w
Do the same with the scanner.pl script.
5.2 Start Squeezecenter for the 1st time
Go to the SqueezeCenter directory
Code:
cd /squeezecenter
Start Squeezecenter for the 1st time
Code:
./slimserver.pl --user=squeezecenter
It will output many error message. Just ignore them.
5.3 Fix generated files ownership
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:
Code:
chown -R squeezecenter:500 Cache/ Logs/ prefs/
5.4 Second start of Squeezecenter
Code:
./slimserver.pl --user=squeezecenter
You will get again error messages. Ignore them. This time, configuration files for the server have been generated. We need to change its ownership as well
and modify it, so that it uses the mysql instance installed on the system previously
5.5 Second fix of files ownership
Code:
chown -R squeezecenter:500 Cache/ Logs/ prefs/
5.6 Server database connection
Edit the prefs/server.prefs file
Code:
nano prefs/server.prefs
Find (CTRL-W) dbpassword (ignore _ts_dbpassword, and search a second time to find dbpassword)
Change dbpassword, dbsource and dbusername to:
Code:
dbpassword: 'your_root_password'
dbsource: dbi:mysql:hostname=localhost;port=3306;database=squeezecenter
dbusername: root
You are all set. Squeezecenter has been installed.
6. Squeezecenter start and useTo run squeezecenter from the shell, go to the slimserver folder and run the following command:
Code:
./slimserver.pl --daemon --prefsfile /slimserver/prefs/server.prefs --user=squeezecenter --pidfile /var/run/slimserver.pid
Wait some minutes for the server to be up and running. BE PATIENT.
After a while, it should be available through "http://yournas:9000"
7. Start Squeezecenter on NAS boot7.1 Symbolic link to the script
First of all, create a symbolic link to slimserver.pl. It will make it easier for the startup script.
Code:
ln -s /squeezecenter/slimserver.pl /squeezecenter/squeezecenter
7.2 The start up script
Any script in the /ffp/start folder with execute permission will be run at boot.
7.2.1 Create a script in that folder:
Code:
cd /ffp/start
nano squeezecenter.sh
7.2.2 Put the following commands inside:
Code:
#!/ffp/bin/sh
# PROVIDE: squeezecenter
# REQUIRE: mysqld
. /ffp/etc/ffp.subr
name="squeezecenter"
command="/squeezecenter/squeezecenter"
squeezecenter_flags="--daemon --prefsfile /squeezecenter/prefs/server.prefs --u$
start_cmd="squeezecenter_start"
stop_cmd="squeezecenter_stop"
status_cmd="squeezecenter_status"
restart_cmd="squeezecenter_restart"
squeezecenter_start()
{
proc_start $command
}
squeezecenter_stop()
{
proc_stop squeezecenter
}
squeezecenter_status()
{
proc_status squeezecenter
}
squeezecenter_restart()
{
proc_stop squeezecenter
sleep 30
proc_start $command
}
run_rc_command "$1"
7.2.3 Exit and save it with CTRL-X.
7.2.4 Change permission to the script:
Code:
chmod a+x squeezecenter.sh
The script will work with:
Code:
./squeezecenter.sh start 'starts the squeezcenter server
./squeezecenter.sh stop 'Stops the server
./squeezecenter.sh status 'check the status of the server
./squeezecenter.sh restart ' Will stop the daemon, wait 30 seconds for it to be stopped, and restart it.
You're all set. Reboot, wait a while (BE PATIENT again). You can ssh to the NAS and check with top if the server is running.
Configure your server from the web interface.If your music is on your nas (that was the point wasn't it ?), you will find it in /i-data/anydrive. In my case, /i-data/md0/music
Enjoy
PS: Any comment, or confirmation it worked is welcome...