Skip to content

Instantly share code, notes, and snippets.

@Ramblurr
Forked from dirkk0/owncloud.sh
Created August 13, 2012 16:18
Show Gist options
  • Save Ramblurr/3342288 to your computer and use it in GitHub Desktop.
Save Ramblurr/3342288 to your computer and use it in GitHub Desktop.
owncloud installation on Amazon EC2
#!/bin/bash
VERSION=4.0.6 # desired owncloud version
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
fi
apt-get update
apt-get install --yes apache2 php5 php5-json php5-gd php5-sqlite curl libcurl3 libcurl3-dev php5-curl php5-common php-xml-parser
apt-get install --yes sqlite mp3info zip
wget http://download.owncloud.org/releases/owncloud-$VERSION.tar.bz2
mv owncloud-$VERSION.tar.bz2 owncloud.tar.bz2
tar -xjf owncloud.tar.bz2
cp -r owncloud /var/www
# allow the webserver to change files
chown -R www-data:www-data /var/www
# enable uploading of big files
cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini_bak
mv /etc/php5/apache2/php.ini temp1.txt
sed 's/= 2M/= 500M/' temp1.txt >temp2.txt
sed 's/= 8M/= 600M/' temp2.txt >temp3.txt
mv temp3.txt /etc/php5/apache2/php.ini
# set the time
ntpdate pool.ntp.org
service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment