Friday, June 7, 2013

QNAP with OwnCloud 5.0 Installation and Configuration from SCRATCH!

A client recently purchased a QNAP from us, and he complained that the features aren't as 'dropbox' like. :( 
Well, let's then make the QNAP as DropboX like as possible! :)

After searching, I found the Wiki to install OwnCloud in a NAS - Wiki Here

However, this guide is applicable only to version 4 of the OwnCloud, and there seems to be some parts of it that is no longer required. 

Disclaimer:
I did notice some problems in the forum on Owncloud 5.0 on the QNAP. Some reverted back to 4.5.11 build for better stability. While the forum posts are dated in May-2013, if you're worried about the possibility of conflicts or problems, I'd suggest going through the new features of the 5.0 and verify that if you don't need any of them, then please use the stable-build of 4.5.11. 

Some of the forum entries are:
I will create/generate my own set of documentation based on my own best practice, and once I see this as 'good-enough', I will post it in the QNAP Wiki to help others.

For a start, the list of things I have are:
  1. QNAP TS-419PII
  2. Update to the latest version of firmware, 3.8.3
  3. 2x 320GB hard-disks with RAID-1
  4. OwnCloud 5.0.6
  5. OwnCloud Documentation (Here)
I followed the Wiki to do these first:
  1. Enable the QNAP services for Telnet/SSH
  2. Enable the QNAP services for Web Server
  3. Install IPKG Optware in the QPKG Centre
  4. I did not install PHP 5.3 as it's already on PHP 5.3
  5. Download and unpack the latest version of OwnCloud and place it in the /web share
  6. Set the permission using chmod command via putty into the NAS
Next, I proceed with doing my own thing:
  1. Enable MySQL Server in QNAP Applications, but i did not want to tick the 'allow TCP connection' to prevent intrusion and hacking of the DB
  2. Reset the root password
  3. Install PhpMyAdmin in the QPKG Centre
  4. Remove all other applications that I do not use like Video station, Music station, etc...
The Tweaks made are the following:
  1. I will need to access mySQL database first to change the default password because root password as default is no good! (MySQL guide here)
  2. I will need to access via phpmyadmin but i can't login via admin
  3. I don't want to enable the TCP connection, so...
  4. Open up Windows Explorer, go to the path: \\(your NAS IP)\Web\phpMyAdmin
  5. Look for config.inc.php, change the value for 
    $cfg['Servers'][$i]['host'] = 'localhost';
     
  6. Leave everything else the same. Note that the value was previously 127.0.0.1
  7. Proceed with login to PhpMyADMIN web-console (https://(ip)/phpMyAdmin), with default username: root, password:admin
  8. If you still can't login, just remember to reset the password from inside the QNAP Admin console.
  9. Immediately change password for the root account to access the phpMyAdmin
  10. Go to Privileges, create a new mysql account: owncloud1, set password accordingly.
  11. Set the location to 'localhost' instead of '%'
  12. Tick on the Create database with samename and grant all privilleges
  13. Click on Check All for the privileges, then untick the SUPER under Administration
DB is now ready, let's go with the OwnCloud Config:
  1. Login to web-console for owncloud (https://(ip)/owncloud)
  2. Create an admin account, I'll use owncloudadmin, with a new password - different from mySQL pls...
  3. Click Advanced
  4. Set DB to MySQL
  5. insert MySQL Details
    • User: owncloud1
    • Password: the password you've set for the user
    • DB name: owncloud1
    • Leave the localhost alone.
  6. Completed!

Now that OwnCloud is set-up, let's proceed with administering to owncloud!
 






No comments: