Sudo service nginx restart > /dev/null 2>&1 # Restarting Nginx for config to take effect Sudo rm -rf /etc/nginx/sites-enabled/default Sudo ln -s /etc/nginx/sites-available/nginx_vhost /etc/nginx/sites-enabled/ Sudo cp /var/www/config/nginx_vhost /etc/nginx/sites-available/nginx_vhost > /dev/null 2>&1 Sudo debconf-set-selections /dev/null 2>&1 Sudo apt-get install -y debconf-utils > /dev/null 2>&1 # install mariadb and give password to installer Sudo apt-get install -y php-fpm php-mysql php-xml php-gd php7.0-zip > /dev/null 2>&1 Sudo apt-get install -y nginx > /dev/null 2>&1 Sudo apt-get install -y git > /dev/null 2>&1 # Using single quotes instead of double quotes to make it work with special-character passwords Change the ‘PASSWORD' (and optionally PROJECTFOLDER) to whatever you like: #!/bin/bash Inside the same local root folder (where Vagrantfile is located), create a file called ‘bootstrap.sh' and copy/paste the code below into it. Inside this root folder, you will now have a 1) ‘config' directory, 2) ‘.vagrant' directory, 3) ‘Vagrantfile' file. Inside your local root folder (where Vagrantfile is located) create a folder called ‘config'. This will create a symbolic link from the root folder with Vagrantfile in it > to the virtual machine's ‘/var/do |config|Ĭonfig.vm.network "forwarded_port", guest: 80, host: 80Ĭonfig.vm.synced_folder "./", "/var/www", create: true, group: "www-data", owner: "www-data" Next, edit Vagrantfile and make it look something like this below (without the commented lines). Initialize Vagrant $ vagrant init bento/ubuntu-16.04 This will install Ubuntu 16.04, NGINX, MariaDB, PHP7-FPM and Gitġ.
0 Comments
Leave a Reply. |