Created
April 9, 2012 03:31
-
-
Save amitsaha/2341191 to your computer and use it in GitHub Desktop.
Install ownCloud3 on Fedora 16
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 ownCloud3 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/02/26/owncloud-boxgrinder-pagekite-owncloud-appliance/ | |
# April 9, 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 | |
#URLs to download sources from | |
phpzip_url='http://pecl.php.net/get/zip' | |
owncloud_url='http://owncloud.org/releases/owncloud-3.0.0.tar.bz2' | |
# MySQL root pass | |
PASS='passwd' | |
echo 'Welcome! Beginning ownCloud3 installation.' | |
echo 'Downloading requisite packages..' | |
# install the packages (assumes a Yes for install) | |
yum --assumeyes install httpd php php-mysql php-mbstring php-devel mysql mysql-server zlib zlib-devel pcre-devel phpmyadmin | |
# 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 | |
bunzip2 -d owncloud-3.0.0.tar.bz2 | |
tar xf owncloud-3.0.0.tar | |
#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 mysqld and apache | |
echo 'Attempting to start MySQL server and Apache' | |
service httpd start | |
service mysqld start | |
#system startup | |
chkconfig --add httpd | |
chkconfig httpd on | |
chkconfig --add mysqld | |
chkconfig mysqld on | |
#change MySQL root password | |
mysqladmin -u root password $PASS | |
echo 'Changed root password of MySQL Admin' | |
# next you need to create the MySQL database using | |
# phpadmin by going to: http://localhost/phpmyadmin | |
echo 'Done installing. Now, configure ownCloud.' | |
#open the browser | |
echo 'Opening PhpMyAdmin' | |
firefox http://localhost/phpmyadmin & | |
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