From 71e53c80aa1e4454a41bbf710c1f8501c4d1f03a Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 20 Apr 2011 17:08:21 +0200 Subject: Installer-Script erstellt --- install.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 install.sh (limited to 'install.sh') diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..7808dcc --- /dev/null +++ b/install.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# +# Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg +# This program is free software distributed under the GPL version 2. +# See http://gpl.openslx.org/ +# +# If you have any feedback please consult http://feedback.openslx.org/ and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ + +# Absolute path to this script. /home/user/bin/foo.sh +echo "Copying to /var/www/" +sourceDir = dirname $0 +targetDir = "/var/www/pbs2/" +cp -R $sourceDir $targetDir + +echo "Creating pbs2 host..." +ln -s /usr/share/php/libzend-framework-php/Zend/ /var/www/pbs2/library/Zend +cat > /etc/apache2/sites-available/pbs2 << EOF + + ServerName $domain + ServerAdmin admin@$domain + DocumentRoot /var/www/pbs2/public + + Options FollowSymLinks + AllowOverride All + + +EOF + +echo "Enabling pbs2 host..." +a2ensite pbs2 +echo "Restarting apache..." +etc/init.d/apache2 restart + +echo "Creating config of pbs2..." +cp /var/www/pbs2/application/configs/application.ini.dist /var/www/pbs2/application/configs/application.ini +echo "Please enter the database user" +read databaseuser +sed -e 13s/$/$databaseuser/ -i /var/www/pbs2/application/configs/application.ini + +echo "Please enter the database password for user $databaseuser" +read databasepassword +sed -e 14s/$/$databasepassword/ -i /var/www/pbs2/application/configs/application.ini + +echo "Creating database and tables" +mysql -u $databaseuser -p$databasepassword < /var/www/pbs2/setup/pbs.sql +mysql -u $databaseuser -p$databasepassword < /var/www/pbs2/setup/pbs.sql + +echo "woho - pbs2 is ready to use" +echo "You can reach your installed pbs2 server unter http://$domain/" -- cgit v1.2.3-55-g7522