Need your iOS devops in the cloud? We can help.
Install Owncloud on a Mac mini server | Macminicolo Blog - Tips, tutorials and reviews on running a Mac mini server

Install Owncloud on a Mac mini server

image


One benefit of hosting a Mac mini server is you can use it many different ways. Owncloud is a great service to add to the multi-purpose list. 


Owncloud is like running your own Dropbox service on your own machine. Don't get me wrong, I love Dropbox. But if you want your data on a server that you own, this is a good way to do it. Also, storage space is limited only by the space on the server. We've been seeing a lot of companies pondering whether they should put their data on a server they don't own or how to get plenty of data space for their full company. And for personal use, Owncloud will do the Dropbox-like data sync with revisions, but you can also do things like stream your music, share photo galleries, and all kinds of other features. There are apps for different OS versions as well (including mobile.) If you want to demo an install of Owncloud on a server, you can do that here.


Ok, so Owncloud is awesome. How do you install it? Glad you asked. We worked with Macminicolo customer Kolby Allen, to put together a tutorial. He works as an IT consultant and web developer so if you need more help, reach him on twitter @kolbyallen.


 


This tutorial series will provide differing levels of Owncloud installation. 


Part 1: Basic Installation of Owncloud


If all you want is a personal dropbox-like service then you only need to follow Part I. 


Part 2: Advanced Owncloud - integrating with Open Directory


If you’d like to integrated Owncloud with OD’s LDAP then you will want to follow Part I and Part 2.


Part 3: PHP Tuning for Owncloud 


If you’d like to add the ability to transfer larger amounts of data with Owncloud then Part 3 will help you tune PHP to handle the large files. Part 3 will also provide you a method to help trouble shoot any errors you might run into with Owncloud, especially memory limit issues.


The first part is below. If you'd like to be notified when Part 2 and Part 3 are ready, you can follow this Tumblr blog (RSS Feed) or follow @macminicolo on twitter. And now, the tutorial.


[[MORE]]

Part 1: Basic Installation of Owncloud


For this part of the install we will use the built in basic SQLite database that Owncloud defaults with. If you’d like you can create a mySQL database, but that is beyond the scope of this tutorial, though straightforward to execute.


1) Activate web sharing in Mountain Lion Server and create a new site. In this tutorial, we will use ml.macminicolo.net as the domain. 


  • Open Server.app

  • Scroll to Websites

  • Enable the service

  • Make sure Enable PHP web applications is checked

image
  • Click the (+) to create a new website

  • Fill in the domain name

image
  • Scroll down and click Edit Advanced Settings

image
  • Check "Allow overrides using .htaccess files" 

2) Now that the site and PHP is setup, download Owncloud. You can get the latest stable release on the Owncloud install page. (It's easiest to download this straight to your server.)


3) Move the files to your web server directory at 

/Library/Server/Web/Data/Sites/<nameofsite>.com


 


image



4) Now we must fix site permission. Apache runs as the user www-data:www-data, we just installed files as your local user. So we need to make sure Apache can access the files
 

  • Open up Terminal.app

  • run the following command. *Note:  If you have changed the apache username and group, please use that instead of _www:_www*

chown -R _www:_www /Library/Server/Web/Data/Sites/<nameofsite>.com


5) While we are in this folder lets create the place to store the data. To protect the data we will place it in a non web accessible folder. I have decided to create cloud_datastore in the directory 



/Library/Server/Web/Data/Sites


 


image


  • Be sure to fix the permissions by running this code again for the data folder


sudo chown -R _www:_www /Library/Server/Web/Data/Sites/cloud_datastore


image


6) Visit your Owncloud website in a browser. Once you get there, you will be asked to enter a username and password. This will be the admin username and password.


7) Before clicking ok, be sure to click the "Advanced" link. Now remember we decided to store our data in a non web accessible location, so we will need to put the path to that folder in the Data Folder box. Click Finish and you are done with the install. 


image


You should be able to change just the ending:


image


8) The final step is create users and groups. The default group created by Owncloud is the admin group. Adding people to this group will give them administrator access to the site to make changes. You can read more about this on Owncloud’s support website.


image


Now you are free to upload files and run your own file syncing  service. Owncloud also makes sync clients that let you run a desktop client that pushes data to your site or a mobile client to access the data. The desktop sync clients are here and iOS is here.


Note: When we clicked the advanced tab you noticed that you had a choice of DB. For this tutorial I kept it simple and use SQLite. If you have mySQL installed you can select that DB and enter in your database information. That will allow you to store all the information in that type of DB. 


Again, if you'd like to be notified when

Part 2

and Part 3 are ready, you can follow this Tumblr blog (

RSS Feed

) or follow 

@macminicolo

 on twitter.

image


About Macminicolo.net


 Macminicolo.net, a Las Vegas colocation company, has been hosting Mac minis since their introduction in January 2005. Low cost. High performance. They are the leaders in this niche market and are known for their personal service. They currently host hundreds of Mac minis for satisfied customers located in 31 different countries around the world. Get more info on our frequently asked questions page.


image