It provides universal access to your files via the web, your computer, or your mobile devices — wherever you are. It also provides a platform to easily view and sync your contacts, calendars and bookmarks across all your devices and enables basic editing right on the web.
The steps in this tutorial will help you to install ownCloud on your CentOS-powered virtual server using Apache, PHP and SQLite. You can use MySQL instead, but it’s easier with SQLite.
Keep in mind that you will need root privileges to issue some of the commands below. If you don’t know what I mean, there is a great tutorial from the community here.
Step 1 — Installing Dependencies
Let’s get started with some basic commands to run Apache with PHP (and some necessary modules) on our virtual server. Log in to your SSH console as root and issue the following command.
yum -y install httpd php php-gd php-intl php-sqlite php-xml-parser sqlite
Once installed, you will be able to start Apache.
service httpd start
It’s highly recommended to config your system to run Apache whenever your virtual server boots up. This can be done using a simple command.
chkconfig httpd on
That’s all! Go ahead and type your server’s address into your favorite browser to check that Apache is working fine.
Step 2 — Downloading ownCloud
We need to use the wget command for downloading ownCloud. Install wget by issuing the following command.
yum -y install wget
Now that we have wget installed we can use it for downloading the installation files from ownCloud’s website. You can find the latest version of this file by visiting the official site.
wget http://download.owncloud.com/community/owncloud-6.0.0a.tar.bz2
You almost got it! Let’s try uncompressing it with the tar utility.
tar -xjf owncloud-6.0.0a.tar.bz2
Remember to change the version if you have downloaded a newer version during the previous step.
Step 3 — Moving To Public
You can move the ownCloud files to your public folder by running a simple command.
mv owncloud /var/www/html
The /var/www/html path is the main directory of your web server, so the ownCloud installation will be accessible from http://yourdomain.com/owncloud. You can change it, it doesn’t matter.
Now we need to set the correct permissions for Apache’s user. This can be done by running these three commands.
chown -R apache:apache /var/www/html/owncloud/apps
chown -R apache:apache /var/www/html/owncloud/config
chown -R apache:apache /var/www/html/owncloud/data
Almost done! The final step will be easy, I promise.
Step 4 — Creating Your User
If you’ve run all these commands, your ownCloud installation should be ready to go. Open http://yourdomain.com/owncloud on your browser and fill out the registration form. You’re done!