Howto: Setup ownCloud 6 on Redhat 6, CentOS 6 and Fedora 18
Owncloud
provides services similar to dropbox. Many of the other websites
similar to dropbox that provide file storage, syncing, and sharing
functions. The benefit of owncloud is to taking control of our own data
and the file storage space. The owncloud has lots of options, feature,
configuration and plugins to consider. We will discuss basic
functionality and configurations in this article.
Prerequisites:
ownCloud is PHP and database combination based, any flavor of the database. So need to be install Apache web server, PHP and MySQL server on CentOS 6 and Fedora 18. For demo purpose i installed both SQLite and MySQL on CentOS,
[root@linuxpathfinder ~]# yum install httpd php php-mysql mysql-server mysql sqlite php-dom php-mbstring php-gd php-pdo
You need to disable SELinux
[root@linuxpathfinder ~]# vim /etc/selinux/config
SELINUX=disabled
Download and Setup:
Download ownCloud from official website or enter the following command on terminal.
# wget http://download.owncloud.org/community/owncloud-6.0.0.tar.bz2
Extract the archive.
# tar -jxvf owncloud-5.0.5.tar.bz2
Move ownCloud under Apache server document root.
# mv owncloud /var/www/cloud
Allow the web server to read and write the files on cloud directory.
# chown -R apache.apache /var/www/cloud/
Create Database: (Optional)
MySQL server must be started before creating the database, login to MySQL server.
mysql -u root -p
Create database called “clouddb”
create database clouddb;
Allow “clouddbuser” to access the “clouddb” database on localhost with predefined password.
grant all on clouddb.* to ‘clouddbuser’@’localhost’ identified by ‘password’;
Configure Apache server:
While configuring Apache web server, it is recommended that you to enable .htaccess to get a enhanced security features, by default .htaccess is disabled in Apache server. To enable it, open your virtual host file and make AllowOverride is set to All.For example, here i used external config file instead of modifying main file.
vi /etc/httpd/conf.d/cloud.conf
Add the following.
Alias /cloud /var/www/cloud/
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
Remember to restart all services related to Apache server.
Configure ownCloud:
Open up web browser, point a URL to http://127.0.0.1/cloud ( http://Your-custom-domain). Browser will automatically take you to ownCloud setup page where it must be configured before going to live. Enter admin user name, password, data folder location and database details. You can choose any one of the database from SQLite or MySQL. If you choose SQLite database, you do not require to enter database details.
where as MySQL database requires database user, password and data base name.
Now you can start upload a file via browser, alternately you can download ownCloud client to upload the files.
Enjoy !
No comments:
Post a Comment