-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
43 lines (34 loc) · 1.53 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
#Buscamos actualizaciones
sudo apt-get update
#Instalamos Apache
echo "Install Apache"
sudo apt-get install -y apache2
#Instalamos PHP5
echo "Install PHP5"
sudo apt-get install -y php5 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-mysql
#Instalamos server MYSQL - root root
echo "mysql-server-5.5 mysql-server/root_password password root" | debconf-set-selections
echo "mysql-server-5.5 mysql-server/root_password_again password root" | debconf-set-selections
sudo apt-get -y install mysql-client mysql-server
mysql -uroot -proot < /vagrant/bd.sql
#Instalamos PHPMyAdmin
echo "Install PHPMyAdmin"
sudo debconf-set-selections <<< 'phpmyadmin phpmyadmin/dbconfig-install boolean true'
sudo debconf-set-selections <<< 'phpmyadmin phpmyadmin/app-password-confirm password root'
sudo debconf-set-selections <<< 'phpmyadmin phpmyadmin/mysql/admin-pass password root'
sudo debconf-set-selections <<< 'phpmyadmin phpmyadmin/mysql/app-pass password root'
sudo debconf-set-selections <<< 'phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2'
sudo apt-get install -y phpmyadmin
#Creamos los alias para que el server apache se redirecione a la carpeta res
sudo rm -rf /var/www
sudo ln -fs /res /var/www
#Creamos los alias para que el server apache se redirecione a la carpeta res
sudo rm -rf /var/www
sudo ln -fs /res /var/www
#Host Virtual
sudo rm /etc/apache2/sites-available/default
sudo cp /vagrant/default /etc/apache2/sites-available
sudo a2enmod rewrite
#Reiniciamos los servicios
sudo service mysql restart
sudo service apache2 restart