About Me

My photo
Hi Friends, I am Sandeep CC and some people know me as System Administrator. I have started my professional career from 2008. I have been working as System Administrator on Linux Server and Windows Client. I am here to share my Knowledge in which I have experienced and which I have come across till now, It could be help to you people. In case anything wrong or any improvements in my post steps, Please comment to the post, Feel free to contact me by posting comments on this blog. Thanks and Regards, Sandeep CC

Thursday, February 20, 2014

Configure OwnCloud Server on CenteOS 6.5 / RHEL-5.3

Configure OwnCloud Server on CenteOS 6.5 / Redhat-5.3

owncloud is free open sorce software you can install in windows linux machine's, Make own shareing server, we can access any our file from anywhere in the world, software's are available for windows/unix/mac server and client, we can synchronize our file's from desktop mobile to server and download from server in any device's (Internet connection required for synchronize) , we can share our personal files,folders,calender,contacts(addressbook) etc... We have done owncloud setup in CentOS 6.5 server and using in windows/linux desktop & android mobiles...Lets see how to configure owncloud...

Requirement: owncloud binary file's,  Linux OS (We used CentOS 6.5), Apache(httpd), Mysql, Php (php-mysql php-json php-xml php-mbstring php-zip php-gd curl php-curl php-pdo) (LAMP), Client exe (optional), root user to configure all steps...

Downloads: Need to download owncloud binary file's, php almost all packages available in OS DVD till we need to downlaod some packages, given link downside...

owncloud download
php-mbstring (download for centos 6.5) - download
client exe (for windows/linux/mac desktop's) - download
android app - download

Basic Setup: Change system name as you need, give static IP (You can give dual IP, 1) Local IP for accessing internal 2) Direct public IP for access external), add DNS in /etc/resolv.conf file (for access this server from outside network)...

Disable SElinux & Firewall (iptables) for temp, you need to work this by firewall then enable port no 80 & 443 in iptables file...

LAMP Configuration:

Apache (httpd) Setup StepsClickHere
Mysql Setup Steps - ClickHere
Php Setup Steps - ClickHere

Create Database: Create one database name on ownclouddb with user-ownclouduser password-myownpassword...

[root@owncloudsvr ~]# mysql -u root -p
Enter password:
mysql> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.03 sec)

mysql> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'myownpassword';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
[root@owncloudsvr ~]#

Owncloud Setup: After downloading owncloud binary file from given link move that whole folder to /var/www/html/ directory...

[root@owncloudsvr ~]# cd Downloads/
[root@owncloudsvr Downloads]# mv owncloud/ /var/www/html/
[root@owncloudsvr Downloads]#

[root@owncloudsvr Downloads]# cd /var/www/html/
[root@owncloudsvr html]# ls -ltr
total 4
drwxr-xr-x. 12 nobody 65534 4096 Dec 15 01:18 owncloud

(change ownership for owncloud directory user and group as apache)
[root@owncloudsvr html]# chown -R apache:apache owncloud/
[root@owncloudsvr html]#

[root@owncloudsvr html]# cd owncloud/
[root@owncloudsvr owncloud]#

(give full permission for config directory under owcloud directory)
[root@owncloudsvr owncloud]# chmod 777 config/
[root@owncloudsvr owncloud]#

(modify httpd.conf file under /etc/httpd/conf/ directory - before making changes take present file as backup for your safety purpose)
[root@owncloudsvr config]# cd /etc/httpd/conf
[root@owncloudsvr conf]# cp httpd.conf httpd.conf.org
[root@owncloudsvr conf]#
[root@owncloudsvr conf]# vi httpd.conf

    Options FollowSymLinks
    AllowOverride All -------------------------------------------------> None to All

[root@owncloudsvr conf]#

Start Service's:  Start mysqld and httpd service...
[root@owncloudsvr conf]# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@owncloudsvr conf]# service httpd restart
Stopping httpd:                                            [OK]
Starting httpd: httpd: apr_sockaddr_info_get() failed for owncloudsvr
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
                                                           [  OK  ]
[root@owncloudsvr conf]#

Now your owncloud server is ready, Try to open website by using url: http://ip/owncloud OR http://servername/owncloud anywhere in mobile or client desktop etc... 1st time it will ask for finishup stage

1st time log on root user with server password, then inside root user you can create multiple user's with password, you can give diskspace for particular user for particular GB...You can install client exe on your linux/windows/mac desktop (download client exe from given above link) & you can synchronize your client desktop with your owncloud server (upload download files, calender, addressbook etc... )...

Thanks and Regards,
Sandeep CC




    1. You can access in local network. also download client setup for windows machine and install it, when you start 1st time it will ask for server path, give http://ipaddressofserver/owncloud then user name & pass which you created in server... also you can access your cloud out of local network if you are having one public static IP... check with iptables, in client side also there is setting you have to do if your cloud is working on iptables, give proxy ip and port in client machine...

  2. sandeep ji can we test owncloud server in local network(private network)

    1. Yes, you can access owncloud in local network..