First clone the Vagrant Box repo
git clone [email protected]:kae76/drupaldev-nginx.git
Follow the following steps, inspired from the repo's ReadMe file
but only running vagrant up
right at the end!
cd drupaldev-nginx
mkdir sites
All our drupal sites will go in here
cp manifests/example.pp manifests/devsites.pp
The devsites.pp is a puppet file which defines and creates the Virtualhost for your site.
edit manifests/devsites.pp by replacing every example.drupal.dev
with tcs-openatrium.drupal.dev
That will be the URL used to access your local dev site.
cd sites
git clone [email protected]:ChildrensSociety/TCS-OpenAtrium.git tcs-openatrium.drupal.dev
The last bit makes sure that the repo folder is the defined name, rather than what the repo is called.
cd tcs-openatrium.drupal.dev
cp www/sites/default/default.settings.php www/sites/default/settings.php
edit settings.php, at line 213, replace $databases = array();
with:
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'db_name',
'username' => 'db_user',
'password' => 'db_password',
'host' => 'localhost',
'port' => '3306',
'driver' => 'mysql',
'prefix' => '',
),
),
);
We are now going to prepare the database dump for automatic import
cd db/
bzip2 -dk TCS-OpenAtrium.sql.bz2
This unzips the compressed sql file (-d) and also keeps a compressed copy (-k)
The vagrant box will automatically import any database called import.sql in the /sites/www/tcs-openatrium.drupal.dev/db so we need to rename the current sql file
mv TCS-OpenAtrium.sql import.sql
Now, all that is left is to turn the ignition
vagrant up
But don't got away just yet, it will ask you for your password (the one you use to login to your Mac)
Now make tcs-openatrium.drupal.dev point to your vagrant machine by editing the host file
sudo nano /etc/hosts
add the following line
33.33.33.10 tcs-openatrium.drupal.dev
In theory, you should be able to go to http://tcs-openatrium.drupal.dev
To SSH into your vagrant machine just
vagrant ssh
Let's import the database dump, in the likely event it didn't import automatically:
cd /var/www/tcs-openatrium.drupal.dev/www/
drush sql-cli < ../db/importsql
drush cc all
just for good measure
Follow this... https://gist.github.com/waako/a101eb0f0e4ce2588756