Setting up your owncloud system

I’m going to do this under ubuntu, but you can use any flavor of linux really.

OWNCLOUD_DIR="/opt/md2/owncloud"
apt-get -y install apache2 php5 php5-gd php-xml-parser php5-intl \
        php5-sqlite php5-mysql smbclient curl libcurl3 php5-curl \
        apache2 mysql-server libapache2-mod-php5 \
        php5-gd php5-json php5-mysql php5-curl \
        php5-intl php5-mcrypt php5-imagick
mkdir -p ${OWNCLOUD_DIR}
cd ${OWNCLOUD_DIR}
wget "http://download.owncloud.org/community/owncloud-5.0.15.tar.bz2"
tar -xjf ${OWNCLOUD_DIR}/owncloud-5.0.15.tar.bz2
mv owncloud/* ${OWNCLOUD_DIR}
mv owncloud/.htaccess ${OWNCLOUD_DIR}
mkdir -p ${OWNCLOUD_DIR}/data
chown -R www-data:www-data ${OWNCLOUD_DIR}/data
chown -R www-data:www-data ${OWNCLOUD_DIR}/apps
chown -R www-data:www-data ${OWNCLOUD_DIR}/config

Add the following applications:

apt-get install davfs2
echo ‘“https://your-owncloud-server-url.com/owncloud/remote.php/webdav”   yourUserName   “your password here”‘ >> /etc/davfs2/secrets
mkdir /media/owncloud
chown localUserId:localUserId /media/owncloud
echo ‘https://your-owncloud-server-url.com/owncloud/remote.php/webdav/  /media/owncloud   davfs   defaults,user,noauto,uid=1000,gid=1000  0       0′ >> /etc/fstab

 

 

 

References:

  • http://doc.owncloud.org/server/5.0/developer_manual/app/gettingstarted.html
  • WebDAV:  http://doc.owncloud.org/server/5.0/admin_manual/installation.html
  • Setting up WebDAV:  http://www.adercon.com/ac/node/100
  • http://forum.owncloud.org/viewtopic.php?f=17&t=7536 (Great for webdav debugging)