Drupal

From SME Server
Jump to navigationJump to search
PythonIcon.png Skill level: medium
The instructions on this page require a basic knowledge of linux.


This guide shows you how to correctly install Drupal ( http://www.drupal.org ) into your Primary ibay on SME Server 8.

Setting up PHP to work correctly for Drupal

db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary:/tmp
signal-event ibay-modify Primary
db configuration setprop php MemoryLimit 128M
db configuration setprop php PostMaxSize 112M
db configuration setprop php UploadMaxFilesize 96M
expand-template /etc/php.ini 
sv t httpd-e-smith

Setting up the overrides for Apache

db accounts setprop Primary AllowOverride all
db accounts setprop Primary FollowSymLinks enabled
db accounts setprop Primary Indexes disabled
signal-event ibay-modify Primary

Setting up ftp

In order to be able to ftp new themes and modules to your Drupal installation, you need to go to the server-manager panel in smeserver and:

  • Create a user from the user panel and reset their password
  • Enable ftp from local networks (I only allow administration of websites from the local network as a matter of security principle!)
  • Give the user you just created the correct access permissions using the fix_permissions.sh script from http://drupal.org/node/244924

For example, say you created a user called fred, then in order for fred to be able to ftp the required files via the Drupal interface, then you give them permission to do so like this:

bash fix-permissions.sh /home/e-smith/files/ibays/Primary/html fred

Where fred is the user account you will use in Drupal to ftp the files (for example installing a new theme) and www is the account that smesever runs the web server under.

Lastly you have to modify the /etc/proftpd.conf file and comment out the "DefaultRoot" line ( I used the nano editor for this ):

cp /etc/e-smith/templates/etc/proftpd.conf/05DefaultRoot /etc/e-smith/templates-custom/etc/proftpd.conf/
nano /etc/e-smith/templates-custom/etc/proftpd.conf/05DefaultRoot

Comment out the DefaultRoot like:

#DefaultRoot            /home/e-smith/files

Now save the file by pressing the control and o keys together, then exit nano by pressing the control and the x keys together.

Then you need to expand the template:

expand-template /etc/proftpd.conf

To confim this:

config show ftp

Should return:

ftp=service
   LoginAccess=private
   TCPPort=21
   access=private
   status=enabled

Finally, you are ready to follow the install instructions for Drupal

Now SME Server is all set up ready for you to follow the Drupal installation guide at: http://drupal.org/documentation/install


This has been tested on 8Beta6 and the 8Beta7 release.

Note: You may need to delete the index.htm file in your Primary ibay so that Drupal's index.php file is picked up.

As a footnote, I would recommend only enabling ftp via the server-manager panel just when you need it so that it is not turned on all the time!