How to create RRR from scratch » History » Version 5

Version 4 (Daniele Barchiesi, 2013-12-02 04:15 PM) → Version 5/8 (Daniele Barchiesi, 2013-12-02 04:50 PM)

h1. How to create RRR from scratch

h2. Setup local Drupal website environment

This will depend on whether you are developing the website on your local machine or on a remote server.

h3. Local machine (tested on MacBook air)



* Install XAMMP - web stack including database and web server apache
**


*
Download relevant version from http://www.apachefriends.org/en/xampp-macosx.html#849
**

*
Run the installer
**

*
Open XAMPP manager application and start all the servers (MySQL, Apache and ProFTPD)
* Navigate to your XAMMP/htdocs/ folder

h3. Remote server (tested on a Linux machine running Ubuntu)

* ssh to remote machine
* setup http web server (e.g. apache)
* edit web server configuration files
* go to your /var/www folder

h2. Install software, using for example, apt-get install


* Install drush - command line utility to manage Drupal websites
* Install git - command line utility to manage version control

h2.

*
Install drupal and use git to track its repository


* run the following command Navigate to your XAMMP/htdocs/ folder
* Run

<pre>
drush dl drupal --package-handler=git_drupalorg
</pre>

* Rename the folder with the name of your site site_name

h2.


*
Create new database

* run the following command
Run
<pre>
mysqladmin -u root -p create dbname
</pre>
where dbname is the name of the database and root is the user

* set privileges following instructions in the INSTALL.dbtype file in the Drupal folder (where dbtype is the kind of database used - e.g. MySQL)

h2.


*
Create new site

* Point a browser to localhost/site_name
* Start Follow the installation instructions
At this point, you have a clean drupal website that can be accessed locally at http://localhost/site_name

h2. Setup remote
Drupal configuration website environment.
h3. Verify requirements
These instructions are very similar to the above, with the exception that instead of hosting the website on a local machine, it will be hosted on a remote server.
* Enable php GD extension
ssh to the remote server
* Install drush - command line utility to manage Drupal websites
* Install git - command line utility to manage version control
* Install drupal and use git to track its repository

* Navigate to your /var/www folder
* Run
<pre>
apt-get install php5-gd (enable php gd extension) drush dl drupal
/etc/init.d/apache2 restart
</pre>

* Rename the folder with the name of your site site_name

*
Create writable files directory
new database

* Run
<pre>
mkdir site_name/sites/default/files mysqladmin -u root -p create dbname
chmod ga+w site_name/sites/default/files
</pre>

where dbname is the name of the database and root is the user

* set privileges following instructions in the INSTALL.dbtype file in the Drupal folder (where dbtype is the kind of database used - e.g. MySQL)

*
Create writable settings file
<pre>
cp site_name/sites/default/default.settings.php site_name/sites/default/settings.php
chmod ga+w site_name/sites/default/settings.php
</pre>
h3. Configure
new site


* Revoke public and group write permissions Point a browser to avoid security issues hostname/site_name
* Follow the installation instructions

<pre>
chmod ga-w site_name/sites/default/settings.php
chmod ga-w site_name/sites/default/
</pre>
At this point, you have a clean Drupal drupal website that can be accessed locally at http://host/site_name http://hostname/site_name

h2. Obtain RRR modules and settings
* Clone the RR repository to a folder of your choice by running the command
<pre>
hg clone https://code.soundsoftware.ac.uk/hg/rr-repo
</pre>
* Copy the features module rr-repo/sites/all/modules/experiments_list to the modules folder of your website XAMPP/htdocs/site_name/sites/all/modules
* Enable modules by running
<pre>
drush pm-enable experiments_list
</pre>