forked from jancborchardt/nextcloud-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
owncloud-setup.sh
58 lines (47 loc) · 1.51 KB
/
owncloud-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Set up ownCloud core and apps from latest git master
# Hopefully git submodules will supersede this eventually
# Jan-Christoph Borchardt, http://jancborchardt.net
# Change this to git://github.com/ if you’re not a core developer
GITPREFIX="[email protected]:"
# Change this path if you want to install ownCloud somewhere else
INSTALLFOLDER=$HOME
echo
echo "Installing dependencies ..."
sudo apt-get install -y git apache2 php5 php5-gd php-xml-parser php5-intl php5-sqlite php5-mysql php5-pgsql curl libcurl3 php5-curl php5-json
echo "Setting up core ..."
cd $INSTALLFOLDER
git clone ${GITPREFIX}owncloud/core.git owncloud
cd owncloud
echo
echo "Setting up 3rdparty ..."
git submodule update --init
echo
cd apps
for APP in activity bookmarks calendar chat contacts documents files_pdfviewer files_texteditor firstrunwizard gallery mail maps mozilla_sync music news notes tasks updater videos
do
echo "Setting up $APP ..."
git clone ${GITPREFIX}owncloud/$APP.git
echo
done
cd ..
echo "Setting permissions ..."
mkdir data
sudo chown www-data:www-data data
sudo chown :www-data config/
sudo chmod 775 config/
sudo chown :www-data apps/
sudo chmod 775 apps/
echo "Symlinking to /var/www ..."
sudo mkdir /var/www
sudo ln -s $INSTALLFOLDER/owncloud /var/www/
echo "Settings from .htaccess ..."
sudo a2enmod rewrite
sudo a2enmod headers
echo "Starting server ..."
sudo service apache2 restart
sudo systemctl restart httpd.service
echo
echo "All set up!"
echo "Now go to http://localhost/owncloud to finish the installation"
echo