NextCloud 12 on Qnap-TS-231


This is a brief guide on how to install nextcloud 12 on qnap-ts-231 with firmware [4.3.3], fortunately we already have a package available for installation, we can download it at this post on qnap forum, we download the universal version 12 package for our system but after this installation and launch it we will encounter an error that does not allow execution, because libxml2 is too old to run nextcloud.

How can we solve it? Simply installing a newer version of libxml2, how? We can get one via Entware-ng and after installation we can replace new libraries with old ones; below are summarized the instructions:

  1. install the Entware-ng
    • donwload the qpkg package from here
    • install it by the web interface
  2. install libxml2
    • login into the nas with ssh on admin account
    • install it, execute: opkg install libxml2
  3. replacement of libraries
    • Check which version of libxml2 is loaded: /usr/local/apache/bin/php -i | grep libXML
      In the output you may notice that the loaded library will still be the old 2.6.30

      [/mnt/HDA_ROOT/usr/lib] # /usr/local/apache/bin/php -i | grep libXML                                      
      libXML support => active
      libXML Compiled Version => 2.6.30
      libXML Loaded Version => 20630
      libXML streams => enabled
    • backup the old library files:
      mv /mnt/HDA_ROOT/usr/lib/libxml2.so /mnt/HDA_ROOT/usr/lib/libxml2.so.bk
      mv /mnt/HDA_ROOT/usr/lib/libxml2.so.2.6.30 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.6.30.bk
      mv /mnt/HDA_ROOT/usr/lib/libxml2.so.2 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.bk
      
    • move the file of the new libxml2 library (you may have to update the new library path according to your situation, for help try opkg files libxml2):
      cp /opt/lib/libxml2.so.2.9.4 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.9.4
      chmod 644 /mnt/HDA_ROOT/usr/lib/libxml2.so.2.9.4
      ln -s /mnt/HDA_ROOT/usr/lib/libxml2.so.2.9.4 /mnt/HDA_ROOT/usr/lib/libxml2.so.2
      ln -s /mnt/HDA_ROOT/usr/lib/libxml2.so.2 /mnt/HDA_ROOT/usr/lib/libxml2.so
      
    • Check which version of libxml2 is now loaded: /usr/local/apache/bin/php -i | grep libXML
      if there are no errors we can see that the new version of libxml2 is now loaded:

      [/mnt/HDA_ROOT/usr/lib] # /usr/local/apache/bin/php -i | grep libXML                                           
      libXML support => active
      libXML Compiled Version => 2.6.30
      libXML Loaded Version => 20904
      libXML streams => enabled
      
  4. restart web server
    • restart it, execute: /etc/init.d/Qthttpd.sh restart

that’s all, to support consult the qnap forum. thx

Annunci

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...