Difference between revisions of "OwnCloud Amahi Package Reference"

From Amahi Wiki
Jump to: navigation, search
 
(36 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{WorkInProgress}}
+
{{NeedsUpdate}}
[[Category:Apps]]
+
This section covers the manual installation for [http://www.amahi.org/apps/owncloud ownCloud] on the Fedora 14 (32 bit) version of Amahi. The  following installation and setup information helped as part of the process to create the Amahi ownCloud “one-click” installation package.
<br/>
 
This article overs the manual installation for [http://www.amahi.org/apps/owncloud ownCloud] on the Fedora 14 (32 bit) version of Amahi. The  following setup information helped as part of the process to create the Amahi ownCloud “one-click” installation package.
 
 
__TOC__
 
__TOC__
 
===Prerequisites===
 
===Prerequisites===
  
 
*Fairly "typical" LAMP technology stack, fortunately Amahi provides "most" of the technology components.
 
*Fairly "typical" LAMP technology stack, fortunately Amahi provides "most" of the technology components.
*PHP V5.3 or greater.
+
*PHP V5.3.2 or greater up to and including ownCloud V7.x. ownCloud 8 or greater requires a minimum of PHP V5.4.x.
*Database, MySQL or SQLite. Amahi uses MySQL so why change?
+
*Database, MySQL or SQLite (meant for smaller systems such as the Raspberry Pi). Amahi uses MariaDB (previously MySQL) so why change?
 
*Favorite text editor.
 
*Favorite text editor.
 
*Favorite SQL administration (phpMyAdmin) tool, good MySQL database command-line skills, or the Amahi "hda-create-*db-and-user" command line utility.
 
*Favorite SQL administration (phpMyAdmin) tool, good MySQL database command-line skills, or the Amahi "hda-create-*db-and-user" command line utility.
*Access to owncloud V4.0.7 (tar.bz2 only) or greater.  
+
*Access to owncloud V4.0.7 (tar.bz2 only) or greater.
  
 
===Installation===
 
===Installation===
Line 17: Line 15:
 
====PHP====
 
====PHP====
  
ownCloud requires PHP V5.3 or greater to be installed on the server. The following additional PHP dependencies need to be installed.
+
ownCloud requires PHP V5.3.4 or greater to be installed on the server. The following additional PHP modules need to be installed.
  
 
{| style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000; padding: 1px"
 
{| style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000; padding: 1px"
Line 53: Line 51:
 
<br/>
 
<br/>
 
Install PHP modules:
 
Install PHP modules:
<blockquote>{{Code|yum install php-gd php-imap php-ldap php-mbstring php-mysql php-odbc php-pdo php-pear php-xml}}
+
<blockquote><pre>yum install php-gd php-imap php-ldap php-mbstring php-mysql php-odbc php-pdo php-pear php-xml</pre>
 
</blockquote>
 
</blockquote>
  
Line 82: Line 80:
 
<br/>
 
<br/>
 
Install the libraries:
 
Install the libraries:
<blockquote>{{Code|yum install pcre libzip zlib curl libcurl}}
+
<blockquote><pre>yum install pcre libzip zlib curl libcurl</pre>
 
</blockquote>
 
</blockquote>
  
Line 89: Line 87:
 
ownCloud requires it's own database and a database user ID in order to store cloud information. We will use the command line and an Amahi HDA (hda-create-db-and-user) application to create the database, user ID, and password. This creates a database called "owncloud" and a corresponding user name "owncloud" (the password is also the same as the database and user ID).
 
ownCloud requires it's own database and a database user ID in order to store cloud information. We will use the command line and an Amahi HDA (hda-create-db-and-user) application to create the database, user ID, and password. This creates a database called "owncloud" and a corresponding user name "owncloud" (the password is also the same as the database and user ID).
  
<blockquote>{{Code|hda-create-db-and-user owncloud}}
+
<blockquote><pre>hda-create-db-and-user owncloud</pre>
 
</blockquote>
 
</blockquote>
  
Line 116: Line 114:
 
*Download the latest release from the ownCloud Community site, "http://owncloud.org/" and save in a directory say, "working".
 
*Download the latest release from the ownCloud Community site, "http://owncloud.org/" and save in a directory say, "working".
 
*"cd" in to the working directory.
 
*"cd" in to the working directory.
*Use the "tar" command to extract the ownCloud binaries in to the working directory. We will use the ownCloud downloaded file name as "owncloud-4.0.7.tar.bz2". The owncloud tar file should now have been extracted in to an "owncloud" subdirectory in the working directory.
+
*Use the "tar" command to extract the ownCloud binaries in to the working directory. We will use the ownCloud downloaded file name as "owncloud-4.0.7.tar.bz2". The owncloud tar file will be extracted in to an "owncloud" subdirectory in the working directory.
<blockquote>{{Code|tar -xjf owncloud-4.0.7.tar.bz2}}
+
<blockquote><pre>tar -xjf owncloud-4.0.7.tar.bz2</pre>
 
</blockquote>
 
</blockquote>
 
*Go to the command line and switch to the root user ID for the next steps.
 
*Go to the command line and switch to the root user ID for the next steps.
Line 127: Line 125:
 
====Finalize the ownCloud Installation====
 
====Finalize the ownCloud Installation====
  
*The installation of owncloud places the “data” directory in the same location as the ownCloud binaries. As such this causes the data directory to be visible on the internet/on an intranet. To resolve this the Apache web server “.htaccess” file functionality must be enabled in the owncloud virtual server setup. When the Amahi ownCloud web application was created an Apache virtual host file was created at “/etc/httpd/conf.d” and with a name similar to this, “1###-owncloud.conf”.
+
*When the Amahi ownCloud web application was created an Apache virtual host file was created at “/etc/httpd/conf.d” and with a name similar to this, “1###-owncloud.conf”.
  
 
<blockquote>Change the lines near the bottom to this:
 
<blockquote>Change the lines near the bottom to this:
{{Text|Text=Options Indexes FollowSymLinks +ExecCGI
+
<pre>Options Indexes FollowSymLinks +ExecCGI
 
AddHandler fcgid-script .fcg
 
AddHandler fcgid-script .fcg
 
AllowOverride FileInfo Limit Options Indexes
 
AllowOverride FileInfo Limit Options Indexes
 
Order allow,deny
 
Order allow,deny
Allow from all}}
+
Allow from all</pre>
 
</blockquote>
 
</blockquote>
  
*Now an ".htaccess" file needs to be created in the ownCloud data directory. “cd” to the data directory located at "/var/httpd/html/owncloud/data/".
+
*Reboot the server.
  
<blockquote>Add the following lines:
+
*After the server reboots the installation of ownCloud needs to be completed on the console by running the internet web browser and going to URL: <nowiki>http://owncloud</nowiki>.
{{Text|Text=deny from all
 
IgnoreIndex *}}
 
  
*Now do a change ownership on the ".htaccess" file to ensure that Apache has access to the file.
+
*The first screen entries are requesting for the "administration" account to be created. Enter “admin” as the user ID and the password as "admin". '''DO NOT''' hit the “Finish Setup” button yet!
 +
:[[File:oc_first_login.png‎]]
  
<blockquote>{{Code|chown apache:users .htaccess}}
+
*Click on the "Advanced" menu item. This will reveal information regarding the default location for the data directory and setup parameters required for the database. Change the default data directory to "/var/hda/files/owncloud/data". The new location is required in order to separate user files and data from the ownCloud binaries.
</blockquote>
 
  
*The file upload size for ownCloud is set to a maximum of 512 MB per file to be uploaded. There are two values stored in file “/var/hda/web-apps/owncloud/html/.htaccess”. The settings are called “upload_max_filesize” and “post_max_size”.
+
*Remember recording the ownCloud MySQLdatabase information? Select MySQL as the database to be used and enter the database information now. '''DO NOT''' touch the host server name.
  
<blockquote>Change the values to something like this:
+
* Click the "Finish" button.
{{Text|Text=php_value upload_max_filesize 4.7G
+
:[[File:oc_final_setups.png‎]]
php_value post_max_size 5G}}
 
  
*Reboot the server.
+
*ownCloud should now complete installation and go to the menu screen for the administration account.
 +
:[[File:oc_post_finalize_user_menu.png‎ ‎]]
  
*After the server reboots the installation of ownCloud needs to be completed. On the console start the internet web browser and go to URL: http://owncloud.
+
*That's it!
 
 
 
 
more coming soon...
 
  
 
===Upgrading ownCloud to New Releases===
 
===Upgrading ownCloud to New Releases===
  
To upgrade to the next version of ownCloud instance, replace the files (copy) with the new set from the download. Leave the "config/" and "data/" directories intact to preserve your data. The upgrade will happen automatically upon the next user login.
+
To upgrade to the next version of ownCloud instance, replace the files (copy) with the new set from the download. Leave the "config/" directory intact to preserve your ownCloud configuration data. The upgrade will happen automatically upon the next user login.
  
Please remember to check the “apache:users” ownership on the copied files and directories. If they are not set, use the “chown” command (recursively).
+
Please remember to check the “apache:users” ownership on the copied files and directories. If they are not set, use the “chown” command (recursively). The upgrade will happen automatically upon the next user login.
  
 
===ownCloud Package Testing===
 
===ownCloud Package Testing===
  
details coming in the near future...
+
The ownCloud installation package was successfully tested on the following Linux platforms:
  
 +
* Fedora 14
 +
* Ubuntu 11.10 LTS
 +
<br/>
 +
The test cases used can be referenced by downloading the spreadsheet, " [[Media:Amahi_ownCloud_Test_Cases.xls‎|Amahi ownCloud Test Cases]] ".
  
 
----
 
----
[[OwnCloud|Main ownCloud Page]] | [[OwnCloud Tips|ownCloud Tips Page]]
+
[[OwnCloud|Main ownCloud Page]]
 
----
 
----
 +
<!--Category References follow-->
 +
[[Category:ownCloud Collection]]

Latest revision as of 22:08, 28 January 2015

Msgbox.update.png Update Needed
The contents of this page have become outdated or irrelevant. Please consider updating it.

This section covers the manual installation for ownCloud on the Fedora 14 (32 bit) version of Amahi. The following installation and setup information helped as part of the process to create the Amahi ownCloud “one-click” installation package.

Prerequisites

  • Fairly "typical" LAMP technology stack, fortunately Amahi provides "most" of the technology components.
  • PHP V5.3.2 or greater up to and including ownCloud V7.x. ownCloud 8 or greater requires a minimum of PHP V5.4.x.
  • Database, MySQL or SQLite (meant for smaller systems such as the Raspberry Pi). Amahi uses MariaDB (previously MySQL) so why change?
  • Favorite text editor.
  • Favorite SQL administration (phpMyAdmin) tool, good MySQL database command-line skills, or the Amahi "hda-create-*db-and-user" command line utility.
  • Access to owncloud V4.0.7 (tar.bz2 only) or greater.

Installation

PHP

ownCloud requires PHP V5.3.4 or greater to be installed on the server. The following additional PHP modules need to be installed.

Name Description
php-gd A module for PHP applications using the gd graphics library.
php-imap A module for PHP applications that use IMAP.
php-ldap A module for PHP applications that use LDAP.
php-mbstring A module for PHP applications which need multi-byte string handling.
php-mysql A module for PHP applications that use MySQL databases.
php-odbc A module for PHP applications that use ODBC databases.
php-pdo A database access abstraction module for PHP applications.
php-pear PHP Extension and Application Repository framework.
php-xml A module for PHP applications which use XML.


Install PHP modules:

yum install php-gd php-imap php-ldap php-mbstring php-mysql php-odbc php-pdo php-pear php-xml

Additional Libraries

The following libraries also need to be installed:

Name Description
pcre Perl-compatible regular expression library.
libzip C library for reading, creating, and modifying zip archives.
zlib zlib compression and decompression library.
curl Command line tool for transfering data.
libcurl A library for getting files from web servers.


Install the libraries:

yum install pcre libzip zlib curl libcurl

Create ownCloud Database and User ID

ownCloud requires it's own database and a database user ID in order to store cloud information. We will use the command line and an Amahi HDA (hda-create-db-and-user) application to create the database, user ID, and password. This creates a database called "owncloud" and a corresponding user name "owncloud" (the password is also the same as the database and user ID).

hda-create-db-and-user owncloud

Please make sure to record the database name, user ID, and password as they will be required later to complete the final installation steps for ownCloud.

Create the Amahi ownCloud Web Application

  • Go to the HDA Dashboard and click on the Apps menu.
Oc hda dash.png
  • Click on the Webapps menu.
Oc hda apps.png
  • Click on the New Web App button.
Oc hda new webapp.png
  • In the Create a New Web App section fill in the Name field with "owncloud".
Oc hda create webapp entry.png
  • Click on the Create button.
Oc hda create webapp.png
  • Amahi will create a web-apps folder at "/var/hda/web-apps/owncloud/html/". An entry for ownCloud will added to the Installed applications list.

Download and Install the Current ownCloud Release

  • Download the latest release from the ownCloud Community site, "http://owncloud.org/" and save in a directory say, "working".
  • "cd" in to the working directory.
  • Use the "tar" command to extract the ownCloud binaries in to the working directory. We will use the ownCloud downloaded file name as "owncloud-4.0.7.tar.bz2". The owncloud tar file will be extracted in to an "owncloud" subdirectory in the working directory.
tar -xjf owncloud-4.0.7.tar.bz2
  • Go to the command line and switch to the root user ID for the next steps.
  • "cd" in to the owncloud directory and do the "ls" command. This listing with show a variety of directories and files.
  • Do a recurisive copy of all of the files directories and files to the owncloud web-app "html" directory, "cp -r * /var/hda/web-apps/owncloud/html/".
  • Now "cd" to the location of the owncloud web-apps directory, "cd /var/hda/web-apps/".
  • Do a recursive change ownership command, "chown -R apache:users owncloud". This will ensure all of the owncloud directories and files have the same system ownership.

Finalize the ownCloud Installation

  • When the Amahi ownCloud web application was created an Apache virtual host file was created at “/etc/httpd/conf.d” and with a name similar to this, “1###-owncloud.conf”.

Change the lines near the bottom to this:

Options Indexes FollowSymLinks +ExecCGI
AddHandler fcgid-script .fcg
AllowOverride FileInfo Limit Options Indexes
Order allow,deny
Allow from all
  • Reboot the server.
  • After the server reboots the installation of ownCloud needs to be completed on the console by running the internet web browser and going to URL: http://owncloud.
  • The first screen entries are requesting for the "administration" account to be created. Enter “admin” as the user ID and the password as "admin". DO NOT hit the “Finish Setup” button yet!
Oc first login.png
  • Click on the "Advanced" menu item. This will reveal information regarding the default location for the data directory and setup parameters required for the database. Change the default data directory to "/var/hda/files/owncloud/data". The new location is required in order to separate user files and data from the ownCloud binaries.
  • Remember recording the ownCloud MySQLdatabase information? Select MySQL as the database to be used and enter the database information now. DO NOT touch the host server name.
  • Click the "Finish" button.
Oc final setups.png
  • ownCloud should now complete installation and go to the menu screen for the administration account.
Oc post finalize user menu.png
  • That's it!

Upgrading ownCloud to New Releases

To upgrade to the next version of ownCloud instance, replace the files (copy) with the new set from the download. Leave the "config/" directory intact to preserve your ownCloud configuration data. The upgrade will happen automatically upon the next user login.

Please remember to check the “apache:users” ownership on the copied files and directories. If they are not set, use the “chown” command (recursively). The upgrade will happen automatically upon the next user login.

ownCloud Package Testing

The ownCloud installation package was successfully tested on the following Linux platforms:

  • Fedora 14
  • Ubuntu 11.10 LTS


The test cases used can be referenced by downloading the spreadsheet, " Amahi ownCloud Test Cases ".


Main ownCloud Page