[GUIDE] Installing OwnCloud Server on My Book Live

OwnCloud is server application that provides Dropbox or Skydrive-like capabilities, using your own hardware. It’s completely free, if you host it yourself.

As it turns out, the WD My Book Live isn’t a terrible platform to host it on.

First, the obvious bits

  • your.warranty=NULL;
  • You will be working with the command line and root access. If you are not careful, you will brick your box, and bricks are terrible servers. Unbrickify here: Unbrickification
  • Make sure you are on the most recent firmware

First, you need to enable SSH. Do this from the settings menu in the MBL UI. Or http://mybooklive/UI/ssh

Log in as root via SSH (Use PuTTy or similar). The default password is welc0me

Here is a script for running the first series of commands automatically.

#! /bin/bash


#check that requirements are fullfilled
if [“$(id -u)” != “0”]; then
    echo -e “this script must be run as root.\n”
    exit 1
fi

echo


echo -n “Removing WD-NAS Package References…”
rm -f /var/lib/dpkg/info/wd-nas.*
echo “done!”

echo “When prompted to install packages or unverified packages, answer Y to both prompts.”
echo “When prompted to overwrite files, choose NOT to overwrite them.”
echo “Overwriting the files may cause your system to bleep. So dont.”
read -p "Do you understand and wish to continue? [y/N] " -n 1
if ! [[$REPLY =~ [1]$ ]]; then
    echo -e “\nUSER ABORT\n”
    exit 1;
fi


apt-get update
apt-get install php5 php5-gd php-xml-parser php5-intl zlib1g


clear
echo -ne “Packages Installed. Installing Owncloud”
cd /var/www/
wget https://download.owncloud.com/download/community/setup-owncloud.php
–no-check-certificate
chmod 755 setup-owncloud.php

chgrp www-data /var/www
chmod g+w /var/www

The first step is to prepare the system for new software. This is a step that I have not seen mentioned anywhere except a single WD support page.  When using apt-get to install new packages, it will throw a TON of errors, due to conflicts. Fix this by running this command:

rm -f /var/lib/dpkg/info/wd-nas.*

 This removes the package references to the firmware.

EDIT: <NEW_STEP>

We need to configure the package repository source list. With your favorite text editor, (nano vim, in my case) open /etc/apt/sources.list

Edit your file so that the only active sources are the squeeze sources. Or, just edit it to look like this:

deb http://ftp.us.debian.org/debian/ squeeze main 
deb-src http://ftp.us.debian.org/debian/ squeeze main 
#deb http://ftp.us.debian.org/debian/ wheezy main
#deb-src http://ftp.us.debian.org/debian/ wheezy main
#deb http://ftp.us.debian.org/debian/ sid main

 (The lines starting with the hash are not required - they are commented out. The first two lines are the important ones.)

  EDIT: </NEW_STEP>

Then run

apt-get update

 Next, we install the pre-requisite packages for OwnCloud. This includes an updated PHP5, in addition to a few libraries and modules.

apt-get install php5 php5-gd php-xml-parser php5-intl zlib1g

 Answer Y to the installation prompts. It may ask if you want to install “unverified” files. Choose ‘Y’. This happens because the signature keys for the Debian repositories are not present. (If you like, you can add them)  At a couple points, it will ask if you want to overwrite a file (a couple ini files). The default option is to keep the current version. That is what you want to do; accept the default suggestion. Do not overwrite the existing files.

After the packages have been installed, it is time to install owncloud. This part is easy.

From the SSH session, cd to the web root and download the setup file:

cd /var/www/wget https://download.owncloud.com/download/community/setup-owncloud.php --no-check-certificatechmod 755 setup-owncloud.php

We now need to make sure it has write permission to the directory (temporarily)

chgrp www-data /var/www
chmod g+w /var/www

 In your web browser, navigate to http://mybooklive/setup-owncloud.php and follow the instructions. I had it install to the subdirectory owncloud. I recommend you do the same. It may not be necessary, but it helps with security a bit, at least.

You will likely recieve a warning about your data being available to the internet. Don’t worry, we’re going to fix that.

Once you have OwnCloud set up, it’s time to finalize the backend stuff.

We need to edit the apache configuration. With your favorite text editor (I use nano [recent vim convert]) or winSCP, edit /etc/apache2/sites-enabled/000-wdnas AND /etc/apache2/sites-enabled/000-wdnas-ssl There is one configuration each for normal http and SSL https.

Add these lines with the other <Directory… > lines

<Directory /var/www/owncloud/>
                AllowOverride All
                Options +FollowSymLinks
        </Directory>
        <Directory /var/www/owncloud/data>
                Order deny,allow
                Deny from all
        </Directory>

Script for the rest of the code

#!/bin/bash#check that requirements are fullfilled
if [“$(id -u)” != “0”]; then
    echo -e “this script must be run as root.\n”
    exit 1
fi
/etc/init.d/apache2 restart
chmod g-w /var/www
/etc/init.d/apache2 stop
mv /var/www/owncloud/data /DataVolume/owncloud_data
chgrp www-data /DataVolume/owncloud_data
chmod 770 /DataVolume/owncloud_data
ln -s /DataVolume/owncloud_data /var/www/owncloud/data
/etc/init.d/apache2 start

 Restart Apache and remove the web root write permissions

/etc/init.d/apache2 restartchmod g-w /var/www

The data is stored on the OS partition, currently. We need to move it to the larger Data partition. To do this, we need to make a folder, accessible to OwnCloud, move all the data to it, then create a symbolic link. (After stopping Apache)

/etc/init.d/apache2 stop
mv /var/www/owncloud/data /DataVolume/owncloud_datachgrp www-data /DataVolume/owncloud_datachmod 770 /DataVolume/owncloud_data
ln -s /DataVolume/owncloud_data /var/www/owncloud/data/etc/init.d/apache2 start

EDIT: Updated line 4 of above code: chmod 776 → chmod 770. Thanks to nfodiz!

EDIT: Simplified the code and script a bit, based on @tekati’s suggestions. Thanks!

 Original code, just in case:

/etc/init.d/apache2 stop
mkdir /DataVolume/owncloud_data
chgrp www-data /DataVolume/owncloud_data
chmod 770 /DataVolume/owncloud_data
mv /var/www/owncloud/data/* /DataVolume/owncloud_data
rmdir /var/www/owncloud/data
ln -s /DataVolume/owncloud_data /var/www/owncloud/data
/etc/init.d/apache2 start

And… Done.

Access owncloud by going to http://mybooklive/owncloud

To make it accessable from the outside world, you will need to forward ports 80 and 443 on your router to your MBL. BE FREAKING CAREFUL WITH THIS. I CANNOT STRESS THIS ENOUGH. This will open up your MBL UI to the outside world as well. You know the risks and have been warned. If there is enough interest, I may go into securing the UI in another guide.

Edit: By default (to my mild surprise) they have restricted access from WAN (internet) addresses to the UI. It only allows connections from the 192.168.0.0/16 block. So, not as much of a risk, but still a risk.

Hope this helps someone! Figuring this out was quite an adventure. I think this thing has a lot of potential. I wouldn’t hate ideas for other uses.

~Chris

EDIT: I’m in the process of install SubSonic for media streaming, which has a ton of dependencies. I have to admit, I’m astonished at just how much of the Debian Repo supports the PPC architecture. That really illustrates the power of community-driven projects.

Also, I’m concluding that, if you know enough about linux internals, and are very careful, there’s a loooooooooooot that you can make this little box do. NAS, Cloud, Media Streaming, PPC Dev Box (Ok, maybe nobody else will use it for this), Web Server, Torrent box, proxy box, relay, file sync… yeah.

WD, you’re sitting on a fortune. Re-market them as real cloud boxes! Just put my name on it somewhere


  1. Yy ↩︎

8 Likes

Awesome guide child! Please keep these coming and sharing your knowledge with us!

That SubSonic guide would be great!!! :stuck_out_tongue:

Thanks!!!

Very nice guide :slight_smile:  Couple of questions

You mention the command

rm -f /var/lib/dpkg/info/wd-nas.*

Does this fix apt-get from bricking the drive on programs with lots of dependencies? For example Transmission on the latest firmware. I am guessing yes because it doesn’t seem to overwrite files unless you tell it to :slight_smile: Nice find on that!

How have speeds been to and from the OwnCloud server from outside your LAN? Are you maxing out your home connection speeds or is the MBL CPU holding it back?

I’m gonna try this guide today and will report back

Excellent post! And kudos given

PS… Your link to the WD support page is broken

When setting up the server I get

Dependency check

All ownCloud dependencies found

Success

ownCloud is now installed

When I click Next I get

PHP module GD is not installed.

Please ask your server administrator to install the module.

I ran

MyBookLive:/var/www# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-gd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 248 not upgraded.
MyBookLive:/var/www#

So it is installed

I am on 02.11.09-053 (Yes I know you say use the latest version :slight_smile: ) so that may be the issue

EDIT1: I’m gonna upgrade to the newest firmware and try again. If it works I will report back

EDIT2: Upgraded to 02.42.02-012 and still get

PHP module GD is not installed.

Please ask your server administrator to install the module.

EDIT3: See typo in bold for those using nano

We need to edit the apache configuration. With your favorite text editor (I use nano) or winSCP, edit /etc/ apach2 /sites-enabled/000-wdnas AND /etc/apache2/sites-enabled/000-wdnas-ssl There is one configuration each for normal http and SSL https.

FIXED

EDIT4: OwnCloud server seems to be working perfect besides the php5-gd not installed error

EDIT5: Working nice on my iphone 5’s LTE connection. Music streaming is flawless, Pictures work flawless…

             A 116MB file took about 3 minutes to download over my LTE connection

EDIT6: You might want to throw in the guide that the max size for a file upload is 512MB as well

I see this can be changed from the admin settings

EDIT7: Gonna roll back to 02.11.09-053 and install it again on my custom OS img and report back

EDIT8: For firmware 02.11.09-053 I get the following error after finishing the guide and logging into the server

Data directory (/var/www/owncloud/data) is readable for other users

Please change the permissions to 0770 so that the directory cannot be listed by other users.

So I logged into PuTTY again and issued

chmod 0770 /var/www/owncloud/data

That seems to have fixed it on 02.11.09-053

This server is GREAT!

addchild314 Lemme know what you think about that error PHP module GD is not installed.

MyBookLive:/var/www# php5 -i | grep -i --color gd
/etc/php5/cli/conf.d/gd.ini,
gd
GD Support => enabled
GD Version => 2.0
gd.jpeg_ignore_warning => 0 => 0

If I am reading it right php5-gd is a graphics display module for php and I have uploaded some photos to the server and they display perfectly when I go to Pictures

Hi nfo, that php5-gd was the thing needed to make the h5ai apache directory listing work with thumbnails!

Could you please verify on /_h5ai if you have the thumbnails supported (green OK)?

Thanks!

PS: oh, and about SubSonic, it needs Java from what I’ve read? That would be a bloat for our poor little NASes :frowning:

EDIT: when I ran apt-get install php5-gd as you before, it bricked the heck out of my MBLD! Apache wouldn’t start anymore; that was the reason I had to start messing with restoring the OS images (thanks god I did, now I’ve learned a lot from the device :slight_smile: ). But really, how did you manage to install it?

Hi nfo,

   Yes, it basically removes the -brick option from apt-get lol. It causes the dependency conflicts to go away, since it removes the ‘claim’ that the WD firmware has on some of the package files.

   Speeds are… acceptable, for a single user. My off-site DL speed is capped at 1MBps (That’s the cap on my cable line), and neither the UI nor ssh respond when processing a massive multi-point download (I use downthemall to download files as 10 simultaneous streams of a 1 GB video). The MBL CPU is a definite bottleneck. However, I can also run Deluge without any issue when the device is idle. (Maybe another guide for that? it was pretty easy)

    I got the “PHP module GD is not installed” error at first, as well. However, it was because I didn’t install the GD module, I included that as part of the code above:

apt-get install php5-gd

 That cleared it up for me, but it shouldn’t be an issue…

    I will poke into my PHP config when I get SSH access back, and post the information.

    I fixed the typo, thanks. Fixed the link too.

Timmy,

Did you run the first command,

rm -f /var/lib/dpkg/info/wd-nas.*

 That is the single most important command available to prevent Brickification. Packages WILL break the system if this is not run. Also, when you install GD, you should probably update PHP5. The version shipped is 5.2, and current is 5.3. I’m not sure of the compatibility of GD with 5.2

Although, restoring was quite an experience. I wouldn’t know half of what I know now if I hadn’t bricked my box.

And yeah, SS requires Java. That makes me a little nervous as well, but… I want to try it anyway.

EDIT: Large downloads from OwnCloud will completely lock up the MBL while the download is running. It recovers gracefully after it has completed, but you will be unable to access the command line or server interface when running a large download. The poor little CPU just can’t handle it. Although, it doesn’t seem to affect the D/L speed at all. So, it isn’t a bandwidth problem so much as it is a CPU-binding problem, I think. And I don’t mind that it’s PPC, but single-core? Really?

EDIT2: Maybe ‘gracefully’ isn’t the best word. It did take apache a moment to stabilize after the download was finished. (~1.09 GB, download at ~750 KB/s, saturated my uplink). It looks like any request made during the period (if you try to load a page from the server during the download), the request has a decent chance of being lost when the server starts responding…

EDIT3: You can boost performance by pausing the WD Media Crawler service. This is probably not recommended if you use all of the features of the standard WD MBL. However, it works fine for me, and frees up a ton of resources. Find the PID of mediacrawler (run top and note the number in the left-hand column). It will be a 3 or 4 digit number. Then, run kill -STOP . So, if mediacrawler is PID 945, you will run

kill -STOP 945

 To resume it, run

kill -CONT 945

EDIT4:

$ php5 -i | grep -i --color gd
/etc/php5/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD Version => 2.0
gd.jpeg_ignore_warning => 0 => 0

Timmy1024 wrote:

Hi nfo, that php5-gd was the thing needed to make the h5ai apache directory listing work with thumbnails!

 

Could you please verify on /_h5ai if you have the thumbnails supported (green OK)?

 

Thanks!

 

I will have to install your h5ai mod again and check. I lost a few mods in my upgrade/downgrade as my backup OS image was from before I installed it. Will let you know, unless you get to it first

@Timmy

  • php versionyes
    PHP version >= 5.2.1
  • cache directory YES

web server has write access

  • image thumbs YES

PHP GD extension with JPEG support available

  • movie thumbs YES

command ‘ffmpeg’ available

  • pdf thumbs NO

command ‘convert’ available

  • php tar and zip YES

PHP Phar extension available

  • shell tar YES

command ‘tar’ available

  • shell zip YES
    command ‘zip’ available
  • folder size YES
    command ‘du’ available

Thanks both of you!

@nfo , I see you also have the _php tar and zip _enabled. What did you install to enable that? Now, the only thing missing is the PDF thumbnails with the convert command (ImageMagick)

@ child/nfo : now with that command to stop apt-get bricking the devices, would it be possible to do the OptWare installations (pyLoad, Transmission, unrar and unzip, etc) with apt-get again? :open_mouth:

Timmy1024 wrote:

Thanks both of you!

 

@nfo , I see you also have the _php tar and zip _enabled. What did you install to enable that? Now, the only thing missing is the PDF thumbnails with the convert command (ImageMagick)

 

I’m sure it was something that was installed with apt-get install php5 php5-gd php-xml-parser php5-intl zlib1g

The bad news is I put some .jpgs in the public folder and it locks up h5ai as soon as you click a pic

 

@ child/nfo : now with that command to stop apt-get bricking the devices, would it be possible to do the OptWare installations (pyLoad, Transmission, unrar and unzip, etc) with apt-get again? :open_mouth:

 

I would guess so :slight_smile:

@timmy

Tentatively, yes. I have not yet found any packages that break the installation, as long as you run the brickproofing script first. Theoretically, you should be able to install any debian PPC package.They should all retain backwards compatibility for any packages that the MBL relies on…

Of course, be prepared to recover, just in case. The wd-nas package is fairly complex and appears to be kinda fragile. The system seems to be rather haphazardly hacked together by WD. But I think the biggest issue was the wd-nas links in APT. With those gone, it should be able to work fine.

@Timmy, actually it appeared locked up BUT it was caching the photos. Took quite a long time for only 17 .jpg files but once it cached the images it is super snappy

@nfo

You can try forcing a re-installation

apt-get install --reinstall php5-gd

 EDIT: looks like you got it. I was about to say, I just tested it, and while it’s a little slow to upload, it seems to work fine.

php5-gd is installed for sure as I am getting thumbnails so I’m not worried about that error

Also it shows installed if I run

MyBookLive:/var/www# php5 -i | grep -i --color gd
/etc/php5/cli/conf.d/gd.ini,
gd
GD Support => enabled
GD Version => 2.0
gd.jpeg_ignore_warning => 0 => 0

Again nice job on the Guide, please keep them coming as you have time :slight_smile:

Yes, thanks both of you! I’ll try the debricking script, php-gd and will confirm how it goes later.

I should also try your other guides nfo (Transmission, pyLoad) with the apt-get and see how it goes. Also the TorrentExpander for pyLoad :wink:

Thanks child for your great guide, keep them coming (if possible) as nfo said :slight_smile:

EDIT: @child , I’ve looked upon other lightweight alternatives for SubSonic and here are some: Ampache, Sockso, Jinzora, VortexBox. I’d be inclined to try Ampache since it’s quite well known

I intend to post guides as I figure out what this device is capable of! Next up is probably Deluge torrent client - it only provides a web UI, and runs as a daemon. It’s pretty lightweight.

Ampache looks interesting. Apparently, OwnCloud has some ampache support built in, but it seems a bit buggy… http://mybooklive/owncloud/remote.php/ampache/

nfo already posted a Transmission guide which works great, but will certainly be appreciated more options.

Now, BEWARE with this current guide, because I ran the rm-… script to be able to use apt-get, then I installed php-gd and the device bricked! Now apache won’t start up anymore :(, plus it installed a zillion of dependencies and stuff:

libapache2-mod-php5
The following NEW packages will be installed:
fontconfig-config libapache2-mod-php5filter libdb5.1 libfontconfig1
libgd2-xpm libjpeg8 liblzma5 libonig2 libqdbm14 libssl1.0.0 libtinfo5
libxpm4 php5-gd ttf-dejavu-core
The following packages will be upgraded:
libpcre3 libsqlite3-0 libxml2 php-apc php5-cli php5-common php5-curl
php5-sqlite psmisc
9 upgraded, 14 newly installed, 1 to remove and 318 not upgraded.
Need to get 12.1MB of archives.
After this operation, 15.1MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libssl1.0.0 liblzma5 libtinfo5 libdb5.1 libpcre3 libsqlite3-0 libxml2
ttf-dejavu-core fontconfig-config libfontconfig1 libjpeg8 libxpm4 libgd2-xpm
libonig2 libqdbm14 libapache2-mod-php5filter php5-curl php5-sqlite php-apc
php5-cli psmisc php5-common php5-gd
Install these packages without verification [y/N]? y
Get:1 http://ftp.us.debian.org wheezy/main libssl1.0.0 1.0.1e-2 [1183kB]
Get:2 http://ftp.us.debian.org wheezy/main liblzma5 5.1.1alpha+20120614-2 [205kB]
Get:3 http://ftp.us.debian.org wheezy/main libtinfo5 5.9-10 [272kB]
Get:4 http://ftp.us.debian.org wheezy/main libdb5.1 5.1.29-5 [725kB]
Get:5 http://ftp.us.debian.org wheezy/main libpcre3 1:8.30-5 [240kB]
Get:6 http://ftp.us.debian.org wheezy/main libsqlite3-0 3.7.13-1 [448kB]
Get:7 http://ftp.us.debian.org wheezy/main libxml2 2.8.0+dfsg1-7+nmu1 [852kB]
Get:8 http://ftp.us.debian.org wheezy/main ttf-dejavu-core 2.33-3 [1021kB]
Get:9 http://ftp.us.debian.org wheezy/main fontconfig-config 2.9.0-7.1 [233kB]
Get:10 http://ftp.us.debian.org wheezy/main libfontconfig1 2.9.0-7.1 [297kB]
Get:11 http://ftp.us.debian.org wheezy/main libjpeg8 8d-1 [130kB]
Get:12 http://ftp.us.debian.org wheezy/main libxpm4 1:3.5.10-1 [48.5kB]
Get:13 http://ftp.us.debian.org wheezy/main libgd2-xpm 2.0.36~rc1~dfsg-6.1 [231kB]
Get:14 http://ftp.us.debian.org squeeze/main libonig2 5.9.1-1 [142kB]
Get:15 http://ftp.us.debian.org wheezy/main libqdbm14 1.8.78-2 [127kB]
Get:16 http://ftp.us.debian.org wheezy/main libapache2-mod-php5filter 5.4.4-14 [2612kB]
Get:17 http://ftp.us.debian.org wheezy/main php5-curl 5.4.4-14 [29.5kB]
Get:18 http://ftp.us.debian.org wheezy/main php5-sqlite 5.4.4-14 [27.4kB]
Get:19 http://ftp.us.debian.org wheezy/main php-apc 3.1.13-1 [87.5kB]
Get:20 http://ftp.us.debian.org wheezy/main php5-cli 5.4.4-14 [2471kB]
Get:21 http://ftp.us.debian.org wheezy/main psmisc 22.19-1+deb7u1 [131kB]
Get:22 http://ftp.us.debian.org wheezy/main php5-common 5.4.4-14 [585kB]
Get:23 http://ftp.us.debian.org wheezy/main php5-gd 5.4.4-14 [34.9kB]
Fetched 12.1MB in 12s (964kB/s)
Preconfiguring packages …
dpkg: libapache2-mod-php5: dependency problems, but removing anyway as you requested:
php5 depends on libapache2-mod-php5 (>= 5.2.6.dfsg.1-1+lenny4) | libapache2-mod-php5filter (>= 5.2.6.dfsg.1-1+lenny4) | php5-cgi (>= 5.2.6.dfsg.1-1+lenny4); however:
Package libapache2-mod-php5 is to be removed.
Package libapache2-mod-php5filter is not installed.
Package php5-cgi is not installed.
(Reading database …
dpkg: warning: files list file for package `wd-nas’ missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `ramlog' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libparted0' missing, assuming package has no files currently installed.
(Reading database ... 19264 files and directories currently installed.)
Removing libapache2-mod-php5 ...
Module php5 disabled.
Run '/etc/init.d/apache2 restart' to activate new configuration!
Selecting previously deselected package libssl1.0.0.
(Reading database ...
dpkg: warning: files list file for package `wd-nas' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `ramlog' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libparted0' missing, assuming package has no files currently installed.
(Reading database ... 19260 files and directories currently installed.)
Unpacking libssl1.0.0 (from .../libssl1.0.0_1.0.1e-2_powerpc.deb) ...
Selecting previously deselected package liblzma5.
Unpacking liblzma5 (from .../liblzma5_5.1.1alpha+20120614-2_powerpc.deb) ...
Selecting previously deselected package libtinfo5.
Unpacking libtinfo5 (from .../libtinfo5_5.9-10_powerpc.deb) ...
Selecting previously deselected package libdb5.1.
Unpacking libdb5.1 (from .../libdb5.1_5.1.29-5_powerpc.deb) ...
Preparing to replace libpcre3 8.02-1.1 (using .../libpcre3_1%3a8.30-5_powerpc.deb) ...
Unpacking replacement libpcre3 ...
Preparing to replace libsqlite3-0 3.7.3-1 (using .../libsqlite3-0_3.7.13-1_powerpc.deb) ...
Unpacking replacement libsqlite3-0 ...
Preparing to replace libxml2 2.7.7.dfsg-2 (using .../libxml2_2.8.0+dfsg1-7+nmu1_powerpc.deb) ...
Unpacking replacement libxml2 ...
Selecting previously deselected package ttf-dejavu-core.
Unpacking ttf-dejavu-core (from .../ttf-dejavu-core_2.33-3_all.deb) ...
Selecting previously deselected package fontconfig-config.
Unpacking fontconfig-config (from .../fontconfig-config_2.9.0-7.1_all.deb) ...
Selecting previously deselected package libfontconfig1.
Unpacking libfontconfig1 (from .../libfontconfig1_2.9.0-7.1_powerpc.deb) ...
Selecting previously deselected package libjpeg8.
Unpacking libjpeg8 (from .../libjpeg8_8d-1_powerpc.deb) ...
Selecting previously deselected package libxpm4.
Unpacking libxpm4 (from .../libxpm4_1%3a3.5.10-1_powerpc.deb) ...
Selecting previously deselected package libgd2-xpm.
Unpacking libgd2-xpm (from .../libgd2-xpm_2.0.36~rc1~dfsg-6.1_powerpc.deb) ...
Selecting previously deselected package libonig2.
Unpacking libonig2 (from .../libonig2_5.9.1-1_powerpc.deb) ...
Selecting previously deselected package libqdbm14.
Unpacking libqdbm14 (from .../libqdbm14_1.8.78-2_powerpc.deb) ...
Selecting previously deselected package libapache2-mod-php5filter.
Unpacking libapache2-mod-php5filter (from .../libapache2-mod-php5filter_5.4.4-14_powerpc.deb) ...
Preparing to replace php5-curl 5.2.6.dfsg.1-1+lenny9 (using .../php5-curl_5.4.4-14_powerpc.deb) ...
Unpacking replacement php5-curl ...
Preparing to replace php5-sqlite 5.2.6.dfsg.1-1+lenny9 (using .../php5-sqlite_5.4.4-14_powerpc.deb) ...
Moving obsolete conffile /etc/php5/conf.d/sqlite.ini out of the way...
Unpacking replacement php5-sqlite ...
Preparing to replace php-apc 3.0.19-2 (using .../php-apc_3.1.13-1_powerpc.deb) ...
Unpacking replacement php-apc ...
Preparing to replace php5-cli 5.2.6.dfsg.1-1+lenny9 (using .../php5-cli_5.4.4-14_powerpc.deb) ...
Unpacking replacement php5-cli ...
Preparing to replace psmisc 22.6-1 (using .../psmisc_22.19-1+deb7u1_powerpc.deb) ...
Unpacking replacement psmisc ...
Preparing to replace php5-common 5.2.6.dfsg.1-1+lenny9 (using .../php5-common_5.4.4-14_powerpc.deb) ...
Unpacking replacement php5-common ...
Selecting previously deselected package php5-gd.
Unpacking php5-gd (from .../php5-gd_5.4.4-14_powerpc.deb) ...
Processing triggers for man-db ...
Setting up libssl1.0.0 (1.0.1e-2) ...
Setting up liblzma5 (5.1.1alpha+20120614-2) ...
Setting up libtinfo5 (5.9-10) ...
Setting up libdb5.1 (5.1.29-5) ...
Setting up libpcre3 (1:8.30-5) ...
Setting up libsqlite3-0 (3.7.13-1) ...
Setting up libxml2 (2.8.0+dfsg1-7+nmu1) ...
Setting up ttf-dejavu-core (2.33-3) ...
Setting up fontconfig-config (2.9.0-7.1) ...
Setting up libfontconfig1 (2.9.0-7.1) ...
Setting up libjpeg8 (8d-1) ...
Setting up libxpm4 (1:3.5.10-1) ...
Setting up libgd2-xpm (2.0.36~rc1~dfsg-6.1) ...
Setting up libonig2 (5.9.1-1) ...
Setting up libqdbm14 (1.8.78-2) ...
Setting up psmisc (22.19-1+deb7u1) ...
Setting up php5-common (5.4.4-14) ...

Configuration file `/etc/cron.d/php5'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** php5 (Y/I/N/O/D/Z) [default=N] ? d
--- /etc/cron.d/php5 2012-04-10 17:57:52.000000000 -0300
+++ /etc/cron.d/php5.dpkg-new 2013-03-04 14:18:09.000000000 -0300
@@ -4,4 +4,4 @@
# files, or 24 minutes if not defined. See /usr/lib/php5/maxlifetime

# Look for and purge old sessions every 30 minutes
-09,39 * * * * root [! -f /tmp/standby] && [-x /usr/lib/php5/maxlif
etime] && [-d /var/lib/php5] && find /var/lib/php5/ -type f -cmin +$(/usr/lib
/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm
+09,39 * * * * root [-x /usr/lib/php5/maxlifetime] && [-d /var/lib/
php5] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_rea
ddir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null
\; -delete

Configuration file `/etc/cron.d/php5'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** php5 (Y/I/N/O/D/Z) [default=N] ? n

Creating config file /etc/php5/mods-available/pdo.ini with new version
Setting up libapache2-mod-php5filter (5.4.4-14) ...

Creating config file /etc/php5/apache2filter/php.ini with new version
Your apache2 configuration is broken, so we're not restarting it for you.
Setting up php5-cli (5.4.4-14) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/php5 because link group php is broken.
Setting up php5-curl (5.4.4-14) ...

Creating config file /etc/php5/mods-available/curl.ini with new version
Setting up php5-sqlite (5.4.4-14) ...
Removing obsolete conffile /etc/php5/conf.d/sqlite.ini ...

Creating config file /etc/php5/mods-available/sqlite3.ini with new version

Creating config file /etc/php5/mods-available/pdo_sqlite.ini with new version
Setting up php-apc (3.1.13-1) ...
Setting up php5-gd (5.4.4-14) ...

Creating config file /etc/php5/mods-available/gd.ini with new version
Processing triggers for libapache2-mod-php5filter ...
Your apache2 configuration is broken, so we're not restarting it for you.
MBLD:/var/lib/dpkg/info# /etc/init.d/apache2
Display all 1863 possibilities? (y or n)
MBLD:/var/lib/dpkg/info# /etc/init.d/apache2 restart
2223: old priority 0, new priority 0
Restarting web server: apache2We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now! (warning).
... waiting .apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5filter.load: Cannot load /usr/lib/apache2/modules/libphp5filter.so into server: /usr/lib/libz.so.1: version `ZLIB_1.2.3.3' not found (required by /usr/lib/powerpc-linux-gnu/libxml2.so.2)
failed!
MBLD:/var/lib/dpkg/info#

After this event and all the other stuff I’ve previously tried, I came to the conclusion that php-gd can’t be installed indepentdenly; it needs to reinstall, recompile, re-something every php package available :frowning:

EDIT: @nfo , could you please try apt-get install imagemagick (or if available, with OptWare), to see if it enabled PDF thumbnails on your h5ai server?

It installs fine on my end… I didn’t do anything special to get it to install… I don’t know why its giving issues. Make sure you update php5 FIRST. 

What error does/did apache give when you tried to start?

@timmy: Yeah, subsonic lands a serious performance hit on the box… :frowning:

I imagined :frowning: Maybe Ampache works better…

The error was this one:

MBLD:/var/lib/dpkg/info# /etc/init.d/apache2 restart
2223: old priority 0, new priority 0
Restarting web server: apache2We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now! (warning).
... waiting .apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5filter.load: Cannot load /usr/lib/apache2/modules/libphp5filter.so into server: /usr/lib/libz.so.1: version `ZLIB_1.2.3.3' not found (required by /usr/lib/powerpc-linux-gnu/libxml2.so.2)
failed!

I haven’t updated php first; I only tried installing php-gd. Do you think that was the problem? In any case, as I like to have the NAS as clean as possible, I think I’ll pass on the PHP update, as it installs a lot of stuff

EDIT: wouldn’t it be possible to disable useless daemons, proccess from startup and such? I mean, besides MediaCrawler, to leave RAM as free as possible and reduce CPU usage. That is something I’d like to get into someday; to streamline every running process and shut down the excess, pretty much as tuning services in Windows OSes :stuck_out_tongue: