forked from nightmare-rg/dvwa-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
36 lines (29 loc) · 1022 Bytes
/
bootstrap.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
#!/bin/bash -
#===============================================================================
#
# FILE: bootstrap.sh
#
# USAGE: ./bootstrap.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: YOUR NAME (),
# ORGANIZATION:
# CREATED: 24.02.2014 09:23
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
apt-get update
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password vmdev'
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password vmdev'
sudo apt-get update
sudo apt-get -y install mysql-server-5.5 php5-mysql apache2 php5 vim
rm -rf /var/www
ln -s /vagrant/dvwa-1.0.8 /var/www
mysql -u root -pvmdev < /vagrant/dvwa.sql
ln -s /vagrant/z_custom.ini /etc/php5/conf.d/z_custom.ini
sudo service apache2 restart