Difference between revisions of "OwnCloud"

From PC-BSD Wiki
Jump to: navigation, search
 
(48 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{NavHeader|back=Thin Client|forward=Security}}</noinclude>
+
<noinclude><translate>
  
 +
<!--T:1-->
 +
{{NavHeader|back=Thin Client|forward=Security}}</noinclude>
 +
 +
<!--T:2-->
 
{{citelink|url=http://owncloud.org/|txt=ownCloud}} is open source software that allows you to create your own cloud storage. This allows you to share data, contacts, and calendars with other devices and users.
 
{{citelink|url=http://owncloud.org/|txt=ownCloud}} is open source software that allows you to create your own cloud storage. This allows you to share data, contacts, and calendars with other devices and users.
  
[[File:Owncloud.png|thumb|385px|'''Figure 9.9a: Install the Required Packages''']]
+
<!--T:3-->
 +
[[File:Owncloud4a.png|thumb|385px|'''Figure 9.9a: Install ownCloud''']]
  
In PC-BSD®, you can create your own private cloud service by installing ownCloud either into a traditional jail that you created using [[Warden®]] or into a [[Install a Server|TrueOS® installation]]. For security reasons, installing ownCloud directly onto a desktop installation is not recommended, as the web and database services it requires may expose the desktop to security vulnerabilities. If you are installing ownCloud on a PC-BSD® system, create a traditional jail as it isolates the software installed into the jail from your desktop operating system.
+
In PC-BSD®, you can create your own private cloud service by installing ownCloud either into a traditional jail that you created using [[Warden®]] or into a [[Install a Server|TrueOS® installation]]. For security reasons, installing ownCloud directly onto a desktop installation is not recommended, as the web and database services it requires may expose the desktop to security vulnerabilities. If you are installing ownCloud on a PC-BSD® system, create a ''' ''traditional jail'' ''' as it isolates the software installed into the jail from your desktop operating system. This section demonstrates how to install and configure ownCloud using Warden®.
  
=== Install and Start the Required Services ===
+
=== Install and Start the Required Services === <!--T:5-->
  
If you are installing ownCloud into a traditional jail, make sure that the jail has been started, then go to the "Packages" tab of the jail as seen in the example in Figure 9.9a.
+
<!--T:6-->
 +
First, create a traditional jail using [[Warden®#Creating_a_Jail_using_the_GUI_Version_of_Warden.C2.AE|these instructions]]. Once the jail is created, make sure that the jail has been started, then go to the “Tools” tab of the jail and click the “Package Manager” button as seen in the example in Figure 9.9a.  
  
Check the boxes for Database-Servers MySQL, Languages ➜ PHP, and Web-Servers Apache, then click the "Apply" button to install these packages.
+
<!--T:7-->
 +
Check the boxes for databases mysql56-server and www owncloud, then click the “Apply” button to install these packages.  
  
 +
<!--T:32-->
 
Once installed, go to Tools ➜ Service Manager which will open the screen shown in Figure 9.9b. Highlight the apache22 service and click the "Enable Service" button and then the "Start" button. Repeat for the mysql service.
 
Once installed, go to Tools ➜ Service Manager which will open the screen shown in Figure 9.9b. Highlight the apache22 service and click the "Enable Service" button and then the "Start" button. Repeat for the mysql service.
  
[[File:Owncloud1.png|thumb|385px|'''Figure 9.9b: Start the Required Services''']]
+
<!--T:8-->
 
+
 
Verify that you can reach the web server by typing the IP address of the jail into a web browser. You should receive an "It works!" message. You will need to first allow incoming TCP port 80 on the jail interface using [[Firewall Manager]] if you use a web browser on a different computer.
 
Verify that you can reach the web server by typing the IP address of the jail into a web browser. You should receive an "It works!" message. You will need to first allow incoming TCP port 80 on the jail interface using [[Firewall Manager]] if you use a web browser on a different computer.
  
If you are installing ownCloud onto a TrueOS™ system, you will need to create the jail and install the dependencies from the command line. When creating the jail, specify the jail IP address and hostname as seen in this example:
+
=== Configuring ownCloud === <!--T:21-->
  
{{txtbox|wiki|box='''warden create 10.0.0.1 owncloudjail --startauto'''
+
THIS HAS CHANGED
'''pc-metapkgmanager --pkgset warden --chroot /usr/jails/10.0.0.1 add<br>MySQL,Apache,PHP'''}}
+
  
Once the software is installed, access the jail by its IP address in order to edit the ''/etc/rc.conf'' file within the jail so that the required services start when the jail is available:[[File:Owncloud2.png|thumb|'''Figure 9.9c: ownCloud Initial Setup Screen''']]
+
<!--T:22-->
 +
You are now ready to configure ownCloud. Click the “Launch Terminal” button to access the shell of the jail. Then, configure the MySQL database, substituting ''ocuser'' and ''mypass'' with the username and password that you wish to use:
  
{{txtbox|wiki|box='''warden chroot 10.0.0.1'''
+
<!--T:36-->
'''vi /etc/rc.conf'''}}
+
'''mysql -u root'''
 +
mysql> '''create database owncloud;'''
 +
mysql> '''grant all on owncloud.* to ocuser@localhost identified by "mypass";'''
 +
mysql> '''quit'''
  
Add these two lines to that file:
+
<!--T:37-->
 +
Next, add the required PHP options to Apache. Open ''/usr/local/etc/apache22/httpd.conf'' in an editor and look for this line:  
  
{{txtbox|box=apache22_enable=”YES”<br>mysql_enable=”YES”}}
+
<!--T:38-->
 +
#AddType application/x-gzip .tgz
  
Save your edits then start the services:
+
<!--T:39-->
 +
Add the following lines directly below that line:  
 +
 +
AddType application/x-httpd-php .php
 +
AddType application/x-httpd-php-source .phps
  
{{txtbox|box='''usr/local/etc/rc.d/apache22 start'''<br>'''/usr/local/etc/rc.d/mysql-server start'''}}
+
<!--T:40-->
 +
Then, look for the following section:
  
Verify that you can reach the web server by typing the IP address of the jail into a web browser. You should receive a "It works!" message. You will need to first edit ''/etc/pf.conf'' in order to allow incoming TCP port 80 using if you use a web browser on a different computer. An example would be to add a line to the "Nic specific rules" section:
+
<!--T:41-->
 +
<nowiki><IfModule dir_module></nowiki>
 +
  DirectoryIndex index.html
 +
<nowiki></IfModule></nowiki>
  
{{txtbox|box=pass in quick on re0 proto tcp from any to (re0) port 80 keep state}}
+
<!--T:42-->
 +
and change it to:
  
You may wish to replace ''any'' with just the IP addresses of the systems on your network. ''re0'' should be replaced with the interface used by the jail.
+
<!--T:43-->
 +
<nowiki><IfModule dir_module></nowiki>
 +
  DirectoryIndex index.html index.php
 +
<nowiki></IfModule></nowiki>
  
=== Configuring ownCloud ===
+
<!--T:24-->
 
+
{{txtbox|box='''/usr/local/etc/rc.d/apache24 restart'''{{nbsp|44}}<br>'''/usr/local/etc/rc.d/mysql-server restart'''
You are now ready to download and configure ownCloud. If you are using a traditional jail on your desktop, go to Tools -> Launch Terminal to access the jail's command line. If you are using TrueOS™, use the '''warden chroot''' command to access the command line of the jail.
+
|txt=Save your changes and restart the Apache and MySQL services.<br>
{{txtbox|box='''cd /usr/local/www/apache22/data'''<br>'''fetch {{http}}download.owncloud.org/releases/owncloud-4.0.7.tar.bz2'''{{nbsp|14}}<br>'''tar xzvf owncloud-4.0.7.tar.bz2'''<br>'''chown -R www:www owncloud'''<br><br>'''mysql -u root'''<br>mysql> '''create database owncloud;'''<br>mysql> '''grant all on owncloud.* to ''ocuser''@localhost identified by "''mypass''";'''<br>mysql> '''quit'''
+
|txt=Once at the command line of the jail, download ownCloud into the Apache data directory.
+
<br><br>
+
Next, configure the MySQL database, substituting ''ocuser'' and ''mypass'' with the username and password that you wish to use.
+
<br><br><br><br>
+
 
}}
 
}}
 +
[[File:Owncloud1a.png|thumb|385px|'''Figure 9.9b: Start the Required Services''']]
 +
[[File:Owncloud2.png|thumb|'''Figure 9.9c: ownCloud Initial Setup Screen''']]
  
{{txtbox|box={{pound}}AddType application/x-gzip .tgz{{nbsp|48}}<br>{{highlight|text=AddType application/x-httpd-php .php<br>AddType application/x-httpd-php-source .phps}}<br><br><IfModule dir_module><br>&nbsp;  DirectoryIndex index.html {{highlight|text=index.php}}<br></IfModule>
+
<!--T:25-->
|txt=Next, add the required PHP options to Apache. Open ''/usr/local/etc/apache22/httpd.conf'' in an editor and look for this ''AddType'' line that begins with a pound ({{pound}}) sign, and then add the highlighted lines directly below that line.<br><br><br>Look for this ''IfModule'' section and add the highlighted text as shown.<br>
+
}}
+
 
+
Save your changes and restart the Apache and MySQL services:
+
 
+
{{txtbox|box='''/usr/local/etc/rc.d/apache22 restart'''
+
'''/usr/local/etc/rc.d/mysql-server restart'''}}
+
 
+
 
Test your changes from a web browser by adding "owncloud" to the end of the IP address of the jail. For example, type ''{{http}}10.0.0.1/owncloud/.'' You should see the setup screen shown in Figure 9.9c.
 
Test your changes from a web browser by adding "owncloud" to the end of the IP address of the jail. For example, type ''{{http}}10.0.0.1/owncloud/.'' You should see the setup screen shown in Figure 9.9c.
  
[[File:Owncloud3.png|thumb|393px|'''Figure 9.9d: ownCloud Interface''']]
+
<!--T:26-->
 +
[[File:Owncloud3.png|thumb|'''Figure 9.9d: ownCloud Interface''']]
  
 +
<!--T:27-->
 
Input the name of the user and password that will be used to administer ownCloud, then click the "
 
Input the name of the user and password that will be used to administer ownCloud, then click the "
 
"Advanced" button. In the advanced settings, click the "MySQL" tab and input the MySQL username, password, and database name that you configured previously. Click the “Finish setup” button to save your changes and enter your new cloud interface -- shown in Figure 9.9d.
 
"Advanced" button. In the advanced settings, click the "MySQL" tab and input the MySQL username, password, and database name that you configured previously. Click the “Finish setup” button to save your changes and enter your new cloud interface -- shown in Figure 9.9d.
  
 +
<!--T:28-->
 
Click the left panel of the interface to access a type of media. For example, if you click "Files" and then the "New" button, you can upload a file, folder, or from a URL. If you click "Contacts", you can add a contact or import/export the address book.  
 
Click the left panel of the interface to access a type of media. For example, if you click "Files" and then the "New" button, you can upload a file, folder, or from a URL. If you click "Contacts", you can add a contact or import/export the address book.  
  
 +
<!--T:29-->
 
Click the "Settings" icon at the bottom of the left panel to add users, configure applications, change the administrative configuration, and to access "Help".
 
Click the "Settings" icon at the bottom of the left panel to add users, configure applications, change the administrative configuration, and to access "Help".
  
 +
<!--T:30-->
 
Instructions for synchronizing the calendar and address book, integrating with a file manager, and integrating with a media player can be found in the {{citelink|url=http://owncloud.org/support/|txt=documentation section of the ownCloud website}}. Synchronization clients are available from {{citelink|url=http://owncloud.org/sync-clients/|txt=the owncloud site}}.
 
Instructions for synchronizing the calendar and address book, integrating with a file manager, and integrating with a media player can be found in the {{citelink|url=http://owncloud.org/support/|txt=documentation section of the ownCloud website}}. Synchronization clients are available from {{citelink|url=http://owncloud.org/sync-clients/|txt=the owncloud site}}.
  
 +
<!--T:31-->
 
<noinclude>
 
<noinclude>
 
{{refheading}}
 
{{refheading}}
[[category:handbook]]
 
[[category:Common Tasks]]
 
 
[[category:ownCloud]]
 
[[category:ownCloud]]
 +
[[category:Common Tasks]]
 +
[[category:handbook]]
 +
<languages/>
 +
</translate>
 
</noinclude>
 
</noinclude>

Latest revision as of 14:34, 6 September 2013

(Sorry for the inconvenience)

Contents

ownCloud[1] is open source software that allows you to create your own cloud storage. This allows you to share data, contacts, and calendars with other devices and users.

Figure 9.9a: Install ownCloud

In PC-BSD®, you can create your own private cloud service by installing ownCloud either into a traditional jail that you created using Warden® or into a TrueOS® installation. For security reasons, installing ownCloud directly onto a desktop installation is not recommended, as the web and database services it requires may expose the desktop to security vulnerabilities. If you are installing ownCloud on a PC-BSD® system, create a traditional jail as it isolates the software installed into the jail from your desktop operating system. This section demonstrates how to install and configure ownCloud using Warden®.

[edit] Install and Start the Required Services

First, create a traditional jail using these instructions. Once the jail is created, make sure that the jail has been started, then go to the “Tools” tab of the jail and click the “Package Manager” button as seen in the example in Figure 9.9a.

Check the boxes for databases ➜ mysql56-server and www ➜ owncloud, then click the “Apply” button to install these packages.

Once installed, go to Tools ➜ Service Manager which will open the screen shown in Figure 9.9b. Highlight the apache22 service and click the "Enable Service" button and then the "Start" button. Repeat for the mysql service.

Verify that you can reach the web server by typing the IP address of the jail into a web browser. You should receive an "It works!" message. You will need to first allow incoming TCP port 80 on the jail interface using Firewall Manager if you use a web browser on a different computer.

[edit] Configuring ownCloud

THIS HAS CHANGED

You are now ready to configure ownCloud. Click the “Launch Terminal” button to access the shell of the jail. Then, configure the MySQL database, substituting ocuser and mypass with the username and password that you wish to use:

mysql -u root
mysql> create database owncloud;
mysql> grant all on owncloud.* to ocuser@localhost identified by "mypass";
mysql> quit

Next, add the required PHP options to Apache. Open /usr/local/etc/apache22/httpd.conf in an editor and look for this line:

#AddType application/x-gzip .tgz

Add the following lines directly below that line:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Then, look for the following section:

<IfModule dir_module>
  DirectoryIndex index.html
</IfModule>

and change it to:

<IfModule dir_module>
  DirectoryIndex index.html index.php
</IfModule>
/usr/local/etc/rc.d/apache24 restart                                            
/usr/local/etc/rc.d/mysql-server restart
Save your changes and restart the Apache and MySQL services.
Figure 9.9b: Start the Required Services
Figure 9.9c: ownCloud Initial Setup Screen

Test your changes from a web browser by adding "owncloud" to the end of the IP address of the jail. For example, type http://10.0.0.1/owncloud/. You should see the setup screen shown in Figure 9.9c.

Figure 9.9d: ownCloud Interface

Input the name of the user and password that will be used to administer ownCloud, then click the " "Advanced" button. In the advanced settings, click the "MySQL" tab and input the MySQL username, password, and database name that you configured previously. Click the “Finish setup” button to save your changes and enter your new cloud interface -- shown in Figure 9.9d.

Click the left panel of the interface to access a type of media. For example, if you click "Files" and then the "New" button, you can upload a file, folder, or from a URL. If you click "Contacts", you can add a contact or import/export the address book.

Click the "Settings" icon at the bottom of the left panel to add users, configure applications, change the administrative configuration, and to access "Help".

Instructions for synchronizing the calendar and address book, integrating with a file manager, and integrating with a media player can be found in the documentation section of the ownCloud website[2]. Synchronization clients are available from the owncloud site[3].


References


  1. http://owncloud.org/
  2. http://owncloud.org/support/
  3. http://owncloud.org/sync-clients/
Other languages:German 7% • ‎English 100%