-
Install VirtualBox 5.2.14 and Vagrant 2.0.2
-
Download the custom vagrant box pttgc-dev-env-v1.box and the Vagrantfile
-
Install the vagrant-disksize plugin
vagrant plugin install vagrant-disksize
-
Windows user's install git bash (or cygwin (preferable))
-
Generate the SSH keys(if not already present):
ssh-keygen -t rsa -b 4096 -C "[email protected]"
-
Then add your SSH key to the ssh-agent (This step is to be performed on HOST Machine)
ssh-add -K ~/.ssh/id_rsa
- For Windows users if the above step did not work then run
eval $(ssh-agent -s)
-
Check whether your SSH key are added to the ssh-agent
ssh-add -l
orssh-add -l -Emd5
-
Go to you Documents(preferable) folder on you system and create a folder pttgc_env(preferable)
-
Within this folder place the above downloaded pttgc-dev-env-v1.box and Vagrantfile
-
From within this folder through your Terminal (or command prompt) run
vagrant box add pttgc-dev-env-v1 pttgc-dev-env-v1.box
(this will take a while)
-
Then after that run
vagrant up
(this will bring up the vagrant machine)
-
Then after than run
vagrant ssh
(this will take us inside the vagrant box (which has ubuntu xenial LTS will all the tools that we need) which will act as out development environment)
-
When inside the vagrant box go to the
/home/vagrant/web
folder by runningcd /home/vagrant/web
-
Then clone the gcmarketplace repository by running
git clone [email protected]:srijanaravali/gcmarketplace.git pttgc
(it will askAre you sure you want to continue connecting (yes/no)?
then enteryes
) this will clone the gcmarketplace repo.- Then navigate inside the pttgc directory and run
chmod -R 0777 .
and then rungit config core.fileMode false
-
Then edit the hosts file by running
sudo vi /etc/hosts
and at the end add these two lines and save the hosts file.192.168.68.8 localdev
192.168.68.8 localdev.pttgc
-
Then in your browser navigate to
http://localdev
it will show us apache's default page which means It Works :) . -
To manage files, connect via network share using NFS or CIFS to 192.168.68.8
- Windows: start -> run -> \192.168.68.8\pttgc
- macOS: ⌘+K -> nfs://192.168.68.8/home/vagrant/web/pttgc
- linux: mount -t nfs 192.168.68.8:/home/vagrant/web/pttgc MOUNT_POINT
- In the browser navigate to http://localdev.pttgc and complete the drupal setup.
- In the database details enter the following:
Database Name as pttgc
Database User as vagrant
Database Password as Vagrant@123
- In the Advanced Options enter the
Host as 127.0.0.1
- Navigate to the mounted point directory.
- The navigate to the sites/default directory
- Make a copy of default.settings.php file as settings.php and make sure it is writable
curl https://drupalconsole.com/installer -L -o drupal.phar
sudo mv drupal.phar /usr/local/bin/drupal
chmod +x /usr/local/bin/drupal