-
Install VirtualBox 5.2.14 and Vagrant 2.0.2
-
Download the custom vagrant box curemint-dev-env-v4.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 "your_email@example.com"
-
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 curemint_env(preferable)
-
Within this folder place the above downloaded curemint-dev-env-v4.box and Vagrantfile
-
From within this folder through your Terminal (or command prompt) run
vagrant box add curemint-dev-env-v4 curemint-dev-env-v4.box
(this will take a while)
-
Then after that run
sudo vagrant up
(this will bring up the vagrant machine)
-
Then after than run
sudo 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 pantheon repository by running
git clone ssh://codeserver.dev.e7c1f0be-57f1-4a87-81a6-ee8dbf055d10@codeserver.dev.e7c1f0be-57f1-4a87-81a6-ee8dbf055d10.drush.in:2222/~/repository.git curemint
(it will askAre you sure you want to continue connecting (yes/no)?
then enteryes
) this will clone the pantheon repo.
Leave this step for now
- Then we need to import the database curemint.sql(place this file within the curemint_dev folder and it will available inside the vagrant box) for this we need to do the following:
sudo mysql -u vagrant -p
then it will prompt for a password then enterVagrant@123
after this we will in the MySQL terminal.- Then run
create database curemint;
- Then run
use curemint;
- Then run
source curemint.sql;
(this will take a while) - When done run
exit
this will kick us out of MySQL
- After this process is complete enter
exit
and run. (This is will take us out of the Vagrant box)
END
-
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.curemint
-
Then in your browser navigate to
http://localdev
it will show us apache's default page which means It Works :) . -
For Windows users perform these additional steps for SMB/CIFS file mount
sudo apt-get install samba
- Then do
sudo vi /etc/samba/smb.conf
this will open thesmb.conf
file in write mode. - Add this snippet to the end of the
smb.conf
file and save this file.; ###start-curemint-share### [curemint] comment = /home/vagrant/web/curemint path = /home/vagrant/web/curemint public = yes browsable = yes writable = yes guest ok = yes force user = vagrant force group = vagrant force create mode = 0644 force directory mode = 0755 map to guest = Bad Password guest account = nobody [tmp] comment = /tmp path = /tmp public = yes browsable = yes writable = yes guest ok = yes force user = vagrant force group = vagrant force create mode = 0644 force directory mode = 0755 map to guest = Bad Password guest account = nobody ; ###end-curemint-share###
- Then restart the Samba service by
sudo service smbd restart
.
-
To manage files, connect via network share using NFS or CIFS to 192.168.68.8
- Windows: start -> run -> \192.168.68.8\home\vagrant\web\curemint
- macOS: ⌘+K -> nfs://192.168.68.8/home/vagrant/web/curemint
- linux: mount -t nfs 192.168.68.8:/home/vagrant/web/curemint MOUNT_POINT
- In the browser navigate to http://localdev.curemint and complete the drupal setup.
- In the database details enter the following:
Database Name as curemint
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.local.php
- Then edit the file settings.local.php and make the following changes
- search for
databases = array()
and replace it with the follwing which are appended in the settings.php file
$databases['default']['default'] = array ( 'database' => 'curemint', 'username' => 'vagrant', 'password' => 'Vagrant@123', 'host' => '127.0.0.1', 'port' => '3306', 'driver' => 'mysql', 'prefix' => 'Drupal\\Core\\Database\\Driver\\mysql', 'collation' => 'utf8mb4_general_ci', );
- search for
$settings['hash_salt'] = '';
and replace with$settings['hash_salt'] = '<curemint_hash>';
- search for
- Then revert the settings.php file to its original state.