Table of Contents
Installing Drupal on Gandi AI
Drupal is a widely used content management system (CMS).
Creating a dedicated database
It's wise to have a database dedicated to Drupal. Let's go crazy, and call it “drupal”.
If you don't (yet) know how to go about this, please read this tutorial.
Creating a directory
You have a choice here. For “neatness'” sake, such applications are generally placed in a folder within the www sub-domain (www.example.com/drupal) or in a specific sub-domain of its own (drupal.example.com).
If you prefer to have your store in a folder
Easy! Just make sure the you create a specific folder for the store (as in www.example.com/drupal)
If you prefer to have a sub-domain specifically dedicated to your store, such as drupal.example.com
Two things to do:
- Configure your server for this sub-domain, as explained in this tutorial.
- Configure your sub-domain to point to the server you have just configured, as explained in this tutorial.
This is the option we will be using in the rest of the tutorial.
Fetching Drupal
To begin with, we need to download it. At the time of writing, the latest version was 5.7.
Nothing beats the official site to get the intial compressed file. I therefore recommend this link.
Now that you've downloaded the file onto your favorite hard drive, decompress it. You now have a folder (let's rename it drupal) containing all of the Drupal files.
Launch your favorite FTP client (we recommend FileZilla) and log in as admin onto your server. Then, open the folder corresponding to the VirtualHost you had initially defined.
In our example, the path of the FTP would therefore be:
/srv/d_my-gandai-ai/www/drupal.example.com/htdocs
…that is, unless you've changed the initial configuration of the web files. If that's the case, however, I'm assuming you knew what you were doing. :)
At this stage, we can upload the Drupal files onto your server.
- If you created a drupal.example.com kind of virtual host, you will want Drupal to come up as the front page (i.e. not within a folder in the sub-domain) and you should therefore upload the content of the drupal folder into the htdocs folder of your sub-domain.
- If you're not a fan of sub-domains and prefer a good old example.com/drupal, then you need to upload the complete folder into htdocs (or another folder if you want).
Preparing the Drupal files
For Drupal to configure properly, certain folders and files will need specific rights. In most cases, to change these rights with your FTP client, all you need to do is right-click on the file concerned and choose the right term in the menu (could be Rights, CHMOD, Properties…). Supposing you were using FileZilla, this is how the client would operate:
Right-click the concerned file and select “File Attributes…”. The window that has just opened gives you two different methods to change the file rights: boxes to tick and numeric values.
The point of the tutorial not being to teach the numeric values of rights in UNIX, let's just say you can simply replace the numeric value of the /sites/default/settings.php file by 777.
Installing Drupal
Using your web browser, open the Drupal folder on your website (drupal.example.com for instance).
1. Database configuration
You'll need to provide Drupal with some information to complete the installation:
Database type: Choose mysql
Database name: This is the name you gave to the database created at the beginning of the tutorial. In our case, we had called it drupal.
Database username: The username you created along with the database…
Database password: …and its associated password.
Then click Advanced Options, in order to fill in some additional fields:
Database host: localhost
Database host: localhost
Database port: You can leave this field empty.
Table prefix: It's always best to add a prefix to the tables you create, so as to avoid an accident where newly created tables “squash” existing tables with the same name. You can specify any prefix you want, as long as it ends with a “_”. Personally, I'm going to choose “dp_”
2. Drupal installation complete
You're already done! You should see a message displayed on the installation interface asking you to re-change the rights to the /sites/default/settings.php file from 777 back to 644, for security reasons.
Drupal configuration
To finish, we're going to create an administrator's account. Open the Drupal folder with your web brower and click “Create new account” in the left-hand menu. Since this is the first user created on your Drupal database, it will de facto have administrative rights. :)
Change the password that Drupal had automatically generated (unless you're fond of it), and confirm.
You're done, you are now the administrator of a brand new Drupal portal! If you would like more information on how to run Drupal, please consult the official Drupal support page.