summaryrefslogtreecommitdiffstats
path: root/scripts/local-install.sh
blob: 37c1c6d98a795b5d224ff8a917a9eafe11ffaf54 (plain) (blame)
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
#!/bin/bash
apt-get update
apt-get install apache2 -y
apt-get install php5 libapache2-mod-php5 -y
# passwort lsfks-openslx
apt-get install mysql-server -y
apt-get install phpmyadmin -y
echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
zcat /usr/share/doc/phpmyadmin/examples/create_tables.sql.gz | mysql -uroot -p    
apt-get install zend-framework-bin -y
a2enmod rewrite
cd /tmp/
su sf34 -c "git clone git@openslx.org:lsfks/master-teamprojekt/pbs2.git" 
mkdir /tmp/pbs2/library/
ln -s /usr/share/php/libzend-framework-php/Zend/ /tmp/pbs2/library/Zend
chown sf34:uni library/
touch /etc/apache2/sites-available/pbs2
echo "    <VirtualHost 127.0.0.2:80>" >> /etc/apache2/sites-available/pbs2
echo "        ServerName  pbs2.local" >> /etc/apache2/sites-available/pbs2
echo "        ServerAlias  pbs2.local" >> /etc/apache2/sites-available/pbs2
echo "        ServerAdmin admin@pbs2.local" >> /etc/apache2/sites-available/pbs2
echo "        DocumentRoot /tmp/pbs2/public" >> /etc/apache2/sites-available/pbs2
echo "        <Directory /tmp/pbs2/public >" >> /etc/apache2/sites-available/pbs2
echo "            Options FollowSymLinks" >> /etc/apache2/sites-available/pbs2
echo "            AllowOverride All" >> /etc/apache2/sites-available/pbs2
echo "        </Directory>" >> /etc/apache2/sites-available/pbs2
echo "    </VirtualHost>" >> /etc/apache2/sites-available/pbs2
ln -s /etc/apache2/sites-available/pbs2 /etc/apache2/sites-enabled/pbs2
echo "127.0.0.2       pbs2.local" >> /etc/hosts
/etc/init.d/apache2 restart