OwnCloud 7
Store your files, folders, contacts, photo galleries, calendars and more on a server of your choosing. Access them from your mobile device, your desktop, or a web browser. Access your data wherever you are, whenever you need it.
Download the OwnCloud 7 software
Download the OwnCloud 7 software at this location (copy link address of the bz2 file). Use curl to download the file directly to your Ubuntu server:
wget https://download.owncloud.org/community/owncloud-x.y.tar.bz2
Extract the files in your document folder (an OwnCloud directory will be created) with the command:
tar -xjf owncloud-?.?.?.tar.bz2
Now an OwnCloud directory is created. You have to set the ownership of the files manually; do this with the following command:
chown -R [user]:[group] owncloud
After that you have to set the permission a bit more secure by executing the command:
find [owncloud_path] -type d -exec chmod 750 {} \; find [owncloud_path] -type f -exec chmod 640 {} \;
Use the crontab for scheduled tasks
For better performance and more reliable operation use the system cron tab for OwnCloud scheduled tasks. Add an entry to the OwnCloud user crontab:
crontab -u [owncloud_user] -e
If this is your first crontab edit session choose your favorite editor (mine is vi). Add a line to the end of the crontab temporary file:
*/15 * * * * php -f ~/public_html/owncloud/cron.php
Adding the line above to your crontab takes care for executing the cron.php file every 15 minutes on your system (even when no users visit your site as is the case with the AJAX configuration).
Create the MySQL database
OwnCloud 7 does not store the uploaded files in the MySQL database. It uses the database for user administration. We have to create a MySQL database for the OwnCloud installation. Go to your VirtualMin interface (easiest way to accomplish this). Goto Webmin -> Servers -> MySQL database server (start MySQL server if needed).
Select Create a new database. Assign the database a name and press Create .
Select “User permissions” and select Create new user . Type a username and password. Type localhost in the Host field. Select no permissions and press Create .
Return to the database list and choose Database permissions . Choose Create new database permission . Select the database you just created. Type in the Username field the exact same name you typed in the previous step. Type in the Hosts field localhost . Select all permissions and press Create .
Now the database is setup; in the browser navigate to your OwnCloud 7 installation. Fill out the form that appears; press Finish and you are ready to use OwnCloud 7.
Download a client for your OwnCloud 7 installation. In the example below I use the Mac OS X version.
OwnCloud not in the webroot?
If you don’t install the OwnCloud software in the webroot (ie ~/public_html) then you have to overwrite the webroot. Edit the OwnCloud configuration file at ~/public_html/owncloud/config/config.php. Add an antry to the CONFIG array:
‘overwritewebroot’ => ‘/owncloud’
Increase upload size
Login to your admin account on owncloud. Go to the Admin page. Below File handling specify the new upload size. This setting has to be equal or less than the PHP setting. In virtualmin go to your domain configuration. Select Services -> PHP 5 Configuration -> Resource limits. Increase both the values for “Maximum file upload size” and “Maximum HTTP POST size” to the same value as you have set in the owncloud admin panel.
Add your existing files locally
You can copy your files directly to the owncloud data directory [owncloud_data_directory]/[user]/files/[folder]
After you have copied the files you have to let owncloud know you did this without using the owncloud interface. Owncloud has to rescan his files structure; use this command:
sudo -u [ownclouduser] php /home/[user]/public_html/owncloud/occ files:scan --all
Enable DropBox external storage
With OwnCloud 7 you can enable external storage. With external storage you can access, for example you dropbox files, as if they were part of your OwnCloud. Enable the “External storage app” through the admin interface (Apps).
First you have to tell DropBox about your OwnCloud app. Go to the DropBox developers page. Select the App Console on the left. Configure this page as shown below:
Select “Create App”.
Enter the OAuth redirect URI as follows:
https://<ownCloud instance>/index.php/settings/personal https://<ownCloud instance>/index.php/settings/admin
Take note of the AppKey and the App Secret; you have to use this in your OwnCloud configuration:
Select Grant access and the DropBox screen appears for granting your application access. Press Allow and your configuration is complete; a green light will appear next to the foldername in OwnCloud to indicate correct configuration.