-
-
Save scoutman57/5949825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Shell script to setup and install ownCloud 4 on Fedora 16 (and later, hopefully) | |
# You may try on others, but it may not work | |
# Run it as root/sudo | |
# Also installs PageKite (http://pagekite.net) | |
# Any harm to any object animate/inanimate caused by this script | |
# is solely unintentional and the script writer assumes no responsibility | |
# Refer: http://echorand.me/2012/05/22/owncloud-4-on-fedora-16/ | |
# May 22, 2012 | |
# Amit Saha ([email protected]) | |
#Let's begin | |
#Am I root? | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo 'Please run this script as sudo/root' | |
exit | |
fi | |
# filename | |
#filename='owncloud-3.0.0' | |
filename='owncloud-4.0.0' | |
#URLs to download sources from | |
phpzip_url='http://pecl.php.net/get/zip' | |
#owncloud_url='http://owncloud.org/releases/$filename.tar.bz2' | |
owncloud_url="http://download2.owncloud.org/releases/$filename.tar.bz2" | |
# MySQL root pass | |
PASS='passwd' | |
echo 'Welcome! Beginning ownCloud 4 installation.' | |
echo 'Downloading requisite packages..' | |
# install the packages (assumes a Yes for install) | |
yum --assumeyes install httpd php php-mbstring php-devel php-common php-gd php-pdo zlib zlib-devel pcre-devel | |
# setup a working directory | |
echo 'Setting up Working directory' | |
mkdir backstage | |
cd backstage | |
# install and setup php-zip | |
echo 'Installing PHP zip module' | |
wget $phpzip_url | |
tar -zxvf zip | |
cd zip-1.10.2 | |
phpize | |
./configure | |
make | |
make install | |
echo extension=zip.so >> /etc/php.ini | |
#backstage | |
cd .. | |
#download ownCloud | |
echo 'Downloading and setting up ownCloud3' | |
wget $owncloud_url | |
bz_fname="$filename.tar.bz2" | |
bunzip2 -d $bz_fname | |
tar_fname="$filename.tar" | |
tar xf $tar_fname | |
#copy owncloud files to the apache directory | |
cp -r owncloud /var/www/html/ | |
cd /var/www/html | |
chown -R apache:apache owncloud/ | |
echo 'Setup ownCloud with Apache' | |
#back home | |
cd | |
#install pagekite | |
/usr/bin/curl -s https://pagekite.net/pk/ | /bin/bash | |
echo 'Pagekite installed' | |
#start Apache | |
echo 'Attempting to start Apache' | |
service httpd start | |
#system startup | |
chkconfig --add httpd | |
chkconfig httpd on | |
echo 'Done installing. Now, configure ownCloud.' | |
firefox http://localhost/owncloud & | |
echo 'Go to https://pagekite.net/wiki/Howto/GNULinux/OwnCloud/ for accessing your cloud from the world' | |
echo 'Good Bye!' | |
# END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment