-
Notifications
You must be signed in to change notification settings - Fork 20
/
bootstrap.sh
48 lines (34 loc) · 938 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
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
# Add the code to Vagrantfile
# config.vm.provision :shell, path: "bootstrap.sh"
echo "--------------------------"
echo " Upgdate & Upgrade System "
echo "--------------------------"
# change source mirror
mv /etc/apt/sources.list /etc/apt/sources.list.bak
cp /vagrant/sources.list /etc/apt/
apt-get update -y
apt-get upgrade -y
echo "---------------"
echo " Install NGINX "
echo "---------------"
apt install -y nginx
echo "-----------------"
echo " Install MariaDB "
echo "-----------------"
apt install -y mariadb-server php-mysql
# mysql -u root
# \q
# mysql_secure_installation
# Y for all
echo "-------------"
echo " Install PHP "
echo "-------------"
apt install -y php-fpm
echo "-----------------"
echo " Initialize Site "
echo "-----------------"
cp /vagrant/nginx/*.conf /etc/nginx/sites-available/
ln -s /etc/nginx/sites-available/*.conf /etc/nginx/sites-enabled/
nginx -s reload
nginx -t