How to create RRR from scratch » History » Version 7
Daniele Barchiesi, 2013-12-05 11:09 AM
1 | 1 | Daniele Barchiesi | h1. How to create RRR from scratch |
---|---|---|---|
2 | 1 | Daniele Barchiesi | |
3 | 5 | Daniele Barchiesi | h2. Setup Drupal website environment |
4 | 1 | Daniele Barchiesi | |
5 | 5 | Daniele Barchiesi | This will depend on whether you are developing the website on your local machine or on a remote server. |
6 | 1 | Daniele Barchiesi | |
7 | 5 | Daniele Barchiesi | h3. Local machine (tested on MacBook air) |
8 | 5 | Daniele Barchiesi | |
9 | 5 | Daniele Barchiesi | * Install XAMMP - web stack including database and web server apache |
10 | 5 | Daniele Barchiesi | ** Download relevant version from http://www.apachefriends.org/en/xampp-macosx.html#849 |
11 | 5 | Daniele Barchiesi | ** Run the installer |
12 | 5 | Daniele Barchiesi | ** Open XAMPP manager application and start all the servers (MySQL, Apache and ProFTPD) |
13 | 5 | Daniele Barchiesi | * Navigate to your XAMMP/htdocs/ folder |
14 | 1 | Daniele Barchiesi | |
15 | 5 | Daniele Barchiesi | h3. Remote server (tested on a Linux machine running Ubuntu) |
16 | 5 | Daniele Barchiesi | |
17 | 5 | Daniele Barchiesi | * ssh to remote machine |
18 | 5 | Daniele Barchiesi | * setup http web server (e.g. apache) |
19 | 5 | Daniele Barchiesi | * edit web server configuration files |
20 | 5 | Daniele Barchiesi | * go to your /var/www folder |
21 | 5 | Daniele Barchiesi | |
22 | 5 | Daniele Barchiesi | h2. Install software, using for example, apt-get install |
23 | 5 | Daniele Barchiesi | |
24 | 1 | Daniele Barchiesi | * Install drush - command line utility to manage Drupal websites |
25 | 1 | Daniele Barchiesi | * Install git - command line utility to manage version control |
26 | 1 | Daniele Barchiesi | |
27 | 6 | Daniele Barchiesi | h2. Create new database |
28 | 6 | Daniele Barchiesi | |
29 | 6 | Daniele Barchiesi | * run the following command |
30 | 6 | Daniele Barchiesi | <pre> |
31 | 6 | Daniele Barchiesi | mysqladmin -u root -p create dbname |
32 | 6 | Daniele Barchiesi | </pre> |
33 | 6 | Daniele Barchiesi | |
34 | 6 | Daniele Barchiesi | where dbname is the name of the database and root is the user |
35 | 6 | Daniele Barchiesi | |
36 | 6 | Daniele Barchiesi | * set privileges following instructions in the INSTALL.dbtype file in the Drupal folder (where dbtype is the kind of database used - e.g. MySQL) |
37 | 6 | Daniele Barchiesi | |
38 | 4 | Daniele Barchiesi | h2. Install drupal and use git to track its repository |
39 | 1 | Daniele Barchiesi | * run the following command |
40 | 4 | Daniele Barchiesi | <pre> |
41 | 1 | Daniele Barchiesi | drush dl drupal --package-handler=git_drupalorg |
42 | 1 | Daniele Barchiesi | </pre> |
43 | 4 | Daniele Barchiesi | * Rename the folder with the name of your site site_name |
44 | 1 | Daniele Barchiesi | |
45 | 6 | Daniele Barchiesi | h2. Configure Drupal |
46 | 4 | Daniele Barchiesi | |
47 | 6 | Daniele Barchiesi | * Point a browser to localhost/site_name |
48 | 6 | Daniele Barchiesi | * Start the Drupal configuration |
49 | 4 | Daniele Barchiesi | |
50 | 4 | Daniele Barchiesi | h3. Verify requirements |
51 | 6 | Daniele Barchiesi | |
52 | 5 | Daniele Barchiesi | * Enable php GD extension |
53 | 5 | Daniele Barchiesi | <pre> |
54 | 5 | Daniele Barchiesi | apt-get install php5-gd (enable php gd extension) |
55 | 4 | Daniele Barchiesi | /etc/init.d/apache2 restart |
56 | 5 | Daniele Barchiesi | </pre> |
57 | 6 | Daniele Barchiesi | |
58 | 5 | Daniele Barchiesi | * Create writable files directory |
59 | 4 | Daniele Barchiesi | <pre> |
60 | 5 | Daniele Barchiesi | mkdir site_name/sites/default/files |
61 | 4 | Daniele Barchiesi | chmod ga+w site_name/sites/default/files |
62 | 5 | Daniele Barchiesi | </pre> |
63 | 6 | Daniele Barchiesi | |
64 | 1 | Daniele Barchiesi | * Create writable settings file |
65 | 4 | Daniele Barchiesi | <pre> |
66 | 5 | Daniele Barchiesi | cp site_name/sites/default/default.settings.php site_name/sites/default/settings.php |
67 | 5 | Daniele Barchiesi | chmod ga+w site_name/sites/default/settings.php |
68 | 5 | Daniele Barchiesi | </pre> |
69 | 6 | Daniele Barchiesi | |
70 | 5 | Daniele Barchiesi | h3. Configure site |
71 | 5 | Daniele Barchiesi | * Revoke public and group write permissions to avoid security issues |
72 | 5 | Daniele Barchiesi | <pre> |
73 | 5 | Daniele Barchiesi | chmod ga-w site_name/sites/default/settings.php |
74 | 5 | Daniele Barchiesi | chmod ga-w site_name/sites/default/ |
75 | 5 | Daniele Barchiesi | </pre> |
76 | 6 | Daniele Barchiesi | |
77 | 5 | Daniele Barchiesi | At this point, you have a clean Drupal website that can be accessed locally at http://host/site_name |
78 | 3 | Daniele Barchiesi | |
79 | 3 | Daniele Barchiesi | h2. Obtain RRR modules and settings |
80 | 3 | Daniele Barchiesi | * Clone the RR repository to a folder of your choice by running the command |
81 | 3 | Daniele Barchiesi | <pre> |
82 | 3 | Daniele Barchiesi | hg clone https://code.soundsoftware.ac.uk/hg/rr-repo |
83 | 3 | Daniele Barchiesi | </pre> |
84 | 1 | Daniele Barchiesi | * 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 |
85 | 1 | Daniele Barchiesi | * Enable modules by running |
86 | 1 | Daniele Barchiesi | <pre> |
87 | 1 | Daniele Barchiesi | drush pm-enable experiments_list |
88 | 1 | Daniele Barchiesi | </pre> |
89 | 7 | Daniele Barchiesi | |
90 | 7 | Daniele Barchiesi | h2. Notes |
91 | 7 | Daniele Barchiesi | * The module simpletest requires php-curl. To install run the following command |
92 | 7 | Daniele Barchiesi | <pre> |
93 | 7 | Daniele Barchiesi | apt-get install php5-curl |
94 | 7 | Daniele Barchiesi | </pre> |