This is an old revision of the document!
On the first run ownCloud will setup the database and admin user.
Default admin is:
Username: linuxmce Password: linuxmce
#!/bin/bash ### PREDEFINE VARS INSTALL=/var/www/ DOWNLOAD=owncloud-6.0.3.zip DBNAME=lmce_userspace if test "$1" == "setup" then # INSTALL PACKAGES apt-get install php5-gd php-xml-parser php5-intl php5-curl rm -Rf /tmp/ownclou* cd /tmp/ && wget "http://download.owncloud.org/community/${DOWNLOAD}" unzip /tmp/${DOWNLOAD} # PREPARE OWNCLOUD # cd /tmp/owncloud/config/ && cp config.sample.php config_write.php echo '<?php $AUTOCONFIG = array( "dbtype" => "mysql", "dbname" => "'${DBNAME}'", "dbuser" => "root", "dbpass" => "", "dbhost" => "localhost", "dbtableprefix" => "oc_", "adminlogin" => "linuxmce", "adminpass" => "linuxmce", "directory" => "/var/www/userspace/data", ); ' > /tmp/owncloud/config/autoconfig.php mysql -u root mysql -e "CREATE DATABASE ${DBNAME};" # CHECKOUT APPS svn co http://svn.linuxmce.org/svn/people/ochorocho/owncloud/lmceimap /tmp/owncloud/apps/lmceimap svn co http://svn.linuxmce.org/svn/people/ochorocho/owncloud/user_lmce /tmp/owncloud/apps/user_lmce mv /tmp/owncloud /tmp/userspace mv /tmp/userspace ${INSTALL} chown -R www-data:www-data ${INSTALL}userspace chmod -R 770 ${INSTALL}/userspace/config rm -Rf /tmp/ownclou* # MAKE AUTOMATIC SETUP WRITE CONFIG DO MODIFY wget --delete-after "http://192.168.80.1/userspace/index.php" sed -i '5,8d' /var/www/userspace/config/config.php sed -i "s/.*installed.*/&\n 'trusted_domains' => array( 0 => '192.168.80.1', 1 => 'dcerouter'),/" /var/www/userspace/config/config.php # ENABLE APPs # user_lmce mysql -u root ${DBNAME} -e "INSERT INTO oc_appconfig (appid, configkey, configvalue) VALUES ('user_lmce', 'enabled', 'yes'), ('user_lmce', 'installed_version', '0.0.1'), ('user_lmce', 'types', 'authentication');" # lmceimap mysql -u root ${DBNAME} -e "INSERT INTO oc_appconfig (appid, configkey, configvalue) VALUES ('lmceimap', 'enabled', 'yes'), ('lmceimap', 'installed_version', '0.0.1'), ('lmceimap', 'types', 'authentication');" # files_external mysql -u root ${DBNAME} -e "INSERT INTO oc_appconfig (appid, configkey, configvalue) VALUES ('files_external', 'enabled', 'yes'), ('files_external', 'installed_version', '0.2'), ('files_external', 'types', 'filesystem');" elif test "$1" == "delete" then # CLEAN UP rm -Rf ${INSTALL}/userspace mysql -u root mysql -e "DROP USER 'oc_linuxmce'@'localhost';" mysql -u root mysql -e "DROP USER 'oc_linuxmce'@'%';" mysql -u root mysql -e "DROP DATABASE ${DBNAME};" elif test "$1" == "" then echo 'commands: setup delete ' fi
Basically a modification of usr_sql app by Andreas Böhler
Download, unzip, copy it to /var/www/userspace/apps/lmceimap and activate in owncloud.