Installing Drupal on Nitrous Cloud IDE

Having recently discovered the true magic of developing in the cloud with Nitrous, and also finding myself espousing the wonders of Drupal for hours in the pub last night, I thought I’d put together a quick article on installing Drupal in Nitrous.io.

Firs off, head over to Nitrous and create an account, once you are logged in, you need to create your first box.

So click New Box, choose PHP as your language, give it a name and click create box

Screenshot 2015-01-15 at 17.30.56

Then you’ll need to sit tight for just a few seconds whilst Nitrous builds your box for you. After that it will forward you into your environment. Helpfully, it will have installed both Apache and MySQL for you, so you’re ready to rock.

Although first off, let’s install phpMyAdmin. From the top menu click on Autoparts > Manage Packages. From this section you can install popular add ons for your environment, so search for phpMyAdmin and click install.

As logging in without a password as root is forbidden with phpMyAdmin by default (not to mention bad practice) we’ll need to create the password for the root user.

In the terminal type the following:

mysqladmin -u root password YOURPASSWORD

Screenshot 2015-01-15 at 17.40.12

Now if you click Preview from the top level navigation and choose Port 3000 then a tab will be opened, if all is working correctly you will simply see a link to phpmyadmin, click it and enter the username of “root” and the password you just specified.

Once logged in we need to create our DB, click “Databases” on the top nav, and in the field titled “Create database” enter the name for it, and click create. I’m simply calling mine drupal.

Now that our blank database is created, we need to get the Drupal core itself. So let’s head back to the workspace terminal and use our command line skills.

To get the core we’ll need to check the latest stable Drupal release, so scroll down to the downloads section and get the URL. At the time of writing it is: http://ftp.drupal.org/files/projects/drupal-7.34.tar.gz

So now we need to get these files onto our workspace, so in the command line, execute the following set of instructions:

Navigate to the correct directory
cd workspace/www

Get the Drupal core
wget http://ftp.drupal.org/files/projects/drupal-7.34.tar.gz

Extract the files
tar -xzvf drupal-7.34.tar.gz

Remove the tar.gz
rm drupal-7.34.tar.gz

Move everything up a level
mv drupal-7.34/* drupal-7.34/.htaccess ./

We’ve now got everything setup for the install. So if we go back to Preview > Port 3000 from the workspace navigation, then we should – all things working correctly – be presented with the Drupal install screen as below.

Screenshot 2015-01-15 at 18.03.34

So let’s get installing…

Leave the radio button of “Standard” selected, and click save and continue.

The next page is used to specify your language. I’m ashamed to admit that I only speak the one language, so we’ll be leaving the default English ticked, and click continue. For the bi-linguals amongst us, there is the options to install in different languages from the link on the page.

Next up is specifying the credentials and details for the database we created above.

Screenshot 2015-01-15 at 18.09.16

Leave “MySql, MariaDB, or equivalent” selected, and then fill in the details of the database we created above. The Database username is “root”, the password is whatever you specified, and the Database name is whatever you called it, in my case it is “drupal”.

Leave the “Advanced Options” alone, as Nitrous apps for MySQL connect on localhost.

Now sit back and wait whilst Drupal works its magic for a minute or so. You will then be forwarded onto the next page which is where you setup your site config and admin details.

Screenshot 2015-01-15 at 18.18.57

Fill in your email address, username, password, default country etc. Hit the Save & Continue button, and you’re now done with a brand spanking new Drupal site to play with. Nice and easy eh?

Leave a Comment

Your email address will not be published.