Joined: 29 Oct 2003
Location: USA, GA
|Posted: Fri May 02, 2014 10:31 pm Post subject: ownCloud - run your own cloud storage service
|Short Introduction to ownCloud
ownCloud is a PHP application that allows you to run your own cloud service. You can upload files just as you do with services like OneDrive (A.K.A. SkyDrive) or Google Drive. It also comes with mobile apps, which allow you to sync your phone's calendar items and contact lists. The benefits of running ownCloud over 3rd party cloud services is that you have full control over your files both locally and remotely, and best of all, it's FREE!
Settings are dark red
Setting values are bold green
File names are olive
Folder names are dark blue
Button names are brown
PHP >= 5.3.3
Extensions gd2, mbstring, zip, curl, fileinfo, bz2, intl, mcrypt, openssl, sqlite3
Abyss Web Server (any version will do) configured with PHP
NOTE: This installation guide applies to Windows and uses ownCloud version 6.0.3
and assumes that you already have a working version of PHP on your server.
Configuring PHP for ownCloud
Step 1 - Open your php.ini file. This file is located in your PHP folder. If you don't have this file, you will need to install PHP as stated in Aprelium's PHP tutorial.
The settings below were taken from ownCloud's htaccess file:
|php_value upload_max_filesize 513M
php_value post_max_size 513M
php_value memory_limit 512M
php_value mbstring.func_overload 0
Step 2 - Scroll down until you see the Resource Limits section. Change the value of memory_limit to 512M (e.g. memory_limit = 512M).
If your system does not have 512M of RAM, leave this value at 128M.
Step 3 - Scroll down until you see the Data Handling section. Change the value of post_max_size to 513M (e.g. post_max_size = 513M).
Step 4 - Scroll down until you see the File Uploads section. Change the value of upload_max_filesize to 513M (e.g. upload_max_filesize = 513M).
Step 5 - Scroll down a little further and you will see the Dynamic Extensions section. Enable the required extensions
by removing the prefixed semicolon for each extension you wish to enable.
Example of enabling the curl extension:
|removing the prefixed semicolon
Enable these extensions:
PHP module gd2
PHP module mbstring
PHP module curl
PHP module fileinfo
PHP module bz2
PHP module intl
PHP module openssl
PHP module sqlite3
PHP module pdo_sqlite
PHP module mysql
PHP module pdo_mysql
PHP module mysqli
NOTE: The additional modules required for ownCloud are built-in to PHP.
Step 6 - Scroll down a little further and you will see the Module Settings section. Scroll to the [mbstring] settings and disable overload by removing the prefixed semicolon by mbstring.func_overload just as you did when enabling the extensions.
Save the php.ini file. Your done configuring PHP.
Verifying PHP's configuration
Step 7 - Copy the code below into a file named phpinfo.php and place this file inside your document root (usually htdocs). Access the script by opening http://localhost/phpinfo.php in your browser. A listing of all the extensions you enabled from step 5 as well as the settings you modified will be shown. If you do not see the changes, restart Abyss Web Server.
When you confirm that the extensions are loaded and the settings are modified by running the script, it is now time to install
the ownCloud PHP application. This part becomes easy. Trust me.
Downloading and configuring ownCloud
Step 8 - Download the ownCloud zip archive from www.owncloud.org/install/ and save it to your document root. This will be
inside the htdocs folder located inside Abyss's installation directory or wherever you put your website files.
Step 9 - Extract the contents of the zip file to the root document folder. Once extracted, you will see a folder named owncloud.
Inside this folder will be several folders related to the ownCloud application (e.g. 3rdparty, apps, confg, ...)
Step 10 - Create a folder outside of your document root named owncloud. Open that folder and create another folder named data.
This will prevent access to the private data folder via the web.
Step 11 - Open the owncloud\config folder and copy config.sample.php to config.php since this file
includes all of the settings we need to configure the mail settings. Open the config.php file.
NOTE: ownCloud's settings are contained in an array so we need to modify the values of the associative array.
Scroll down until you come across the key mail_domain. The settings that follow will be the ones we need to configure.
NOTE: We will use Gmail to configure the mail settings. These settings originated from the following link:
Change mail_domain to the no-reply email address
"mail_domain" => "firstname.lastname@example.org"
Configure ownCloud to use SMTP
"mail_smtpmode" => "smtp"
Configure the SMTP host
"mail_smtphost" => "smtp.gmail.com"
Configure the SMTP Port Number (Gmail uses port 465)
"mail_smtpport" => 465
Configure the SMTP Timeout (Gmail recommends 5 mins)
"mail_smtptimeout" => 5000
Configure SMTP to use SSL
"mail_smtpsecure" => "ssl"
Configure SMTP Authentication
"mail_smtpauth" => true
Configure SMTP Authentication Type
"mail_smtpauthtype" => "NTLM"
Specify your email address
"mail_smtpname" => "email@example.com"
Specify your password (no one will see it)
"mail_smtppassword" => "password goes here"
That's it for the mail settings! Easy huh?
Configuring the path to the apps folder
This is a one-step process. Just scroll down until you see apps_paths and specify
the relative path to the apps folder. I don't understand why the sample config uses
a full path to the apps folder when a relative one works just as good.
Save the config.php file. Your almost done!
Browsing to ownCloud for the first time
Step 12 - Open your browser to the ownCloud web interface. This will be http://localhost/owncloud if your running it locally,
which you should be since this is an installation!
Step 13 - Enter a username and password for the Admin account. I won't go into password security since you probably already know what
a complex password is because you're running a server. Right? :D
Step 14 - Click the Advanced link and specify the path to your owncloud\data folder. Use forward slashes to separate the path!
I put mine in the root of D: so it is easy to get to without navigating so many folders. Click Finish setup.
NOTE: For simplicity, we configured ownCloud with SQLite and ignored MySQL. If you have MySQL installed and running, click the MySQL tab and specify your connection settings. Remember to click Finish setup when done. It is also important to understand that we did not use SSL to access ownCloud via the web. To enable secure access, you need to configure Abyss with HTTPS support and prefix the URL with https:// instead of http://. I skipped this step for simplicity reasons.
Congratulations! ownCloud has been successfully installed on your server.
ownCloud's Desktop Sync Client
Installing and Configuring ownCloud's Desktop Sync Client
Step 15 - Download ownCloud's Desktop Sync Client for Windows from www.owncloud.org/install and save it to your computer (usually in the Downloads folder). This tutorial uses version 126.96.36.19986.
Step 16 - Run the sync client setup program and then click the Next > button at the first screen to continue.
Step 17 - Make sure Standard is selected for the installation type and then click the Next > button.
Step 18 - The installation begins
Step 19 - Click the Finish button to configure the client
Step 20 - Enter the public website address to owncloud (e.g. http://yoursite.com/owncloud). I entered localhost for demonstration purposes only. Click the Next > button when ready.
Step 21 - Enter your username and password and then click the Next > button to continue.
Step 22 - By default, the ownCloud folder will be created in your user profile folder (e.g. C:\Users\Username\ownCloud). You may change the folder if you wish but the default seems to be good enough for this tutorial. Any files or folders added to this folder will be synchronized to the server's owncloud\data folder on the remote server. You can view the changes from the web interface or by looking in the owncloud\data folder from the remote server. Click the Connect... button to connect to the ownCloud server.
Step 23 - Congratulations! ownCloud's Desktop Sync Client has been successfully installed. At this point you have two options: 1.) open the local folder or 2.) open ownCloud's web interface. I recommend opening the local folder and dropping a few files in it and then checking the remote server for the changes. Click the Finish button to exit setup.
Computer Programmer & Networking Specialist