-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.sh
55 lines (47 loc) · 1.21 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#Update
apt-get -y update
#Apache2
apt-get -y install apache2
rm -rf /var/www
ln -fs /vagrant /var/www
#MySql
YourPassword="tommie"
debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password password $YourPassword"
debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password_again password $YourPassword"
apt-get -y install mysql-server
apt-get -y install libapache2-mod-auth-mysql php5-mysql
mysql_install_db
/usr/bin/mysql_secure_installation<<EOF
$YourPassword
n
Y
Y
Y
Y
EOF
#PHP
apt-get -y install php5 libapache2-mod-php5 php5-mcrypt
#phpmyadmin
apt-get -y install phpmyadmin
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
service apache2 restart
#git
apt-get -y install git-core
#Xdebug
apt-get -y install php5-dev php-pear
apt-get -y install make
pecl install xdebug
xdebugsolocation="$(find / -name 'xdebug.so' 2> /dev/null)"
echo "
[xdebug]
zend_extension=\"$xdebugsolocation\"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=10.0.0.10
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_autostart=0
xdebug.remote_log=/tmp/php5-xdebug.log
" | sudo tee /etc/php5/apache2/php.ini -a
service apache2 restart