This article describes how to setup Drupal and configure Apache, MySQL or PostgreSQL, PHP, and Postfix to work with it. It is assumed that you have some sort of LAMP (Apache, MySQL, PHP) or LAPP (Apache, PostgreSQL, PHP) server already setup.
Install the package.
In order to send e-mails with Drupal, you will need to install Postfix. Drupal uses e-mails for account verification, password recovery, etc. First install .
- Edit Postfix configuration file
/etc/postfix/main.cfas needed. All that you should have to do is change the hostnames under "Internet Host and Domain Names"
myhostname = hostname1
- Send a test e-mail to yourself:
mail myusername@localhost. Enter a subject, some words in the body, then press
Ctrl+dto exit and send the letter. Wait 10 seconds, and then type
- Make sure port 25 is fowarded if you have a router so that mails can be sent to the Internet at large
- Edit the file
/etc/php/php.ini. Find the line that starts with,
;sendmail_path=""and change it to
sendmail_path="/usr/sbin/sendmail -t -i"
- Restart the Apache web server.
- Uncomment the
- Enable a PDO extension for your database. For MySQL, the line
extension=pdo_mysql.soshould be uncommented.
Copy the example Apache configuration file:
# cp /etc/webapps/drupal/apache.example.conf /etc/httpd/conf/extra/drupal.conf
And include it at the bottom of
/etc/httpd/conf/httpd.conf, also uncomment the
LoadModule rewrite_module modules/mod_rewrite.so line.
/usr/share/webapps/drupal/.htaccess and replace
Require all denied by
Require all granted.
Tips and tricks
Scheduling with Cron
Drupal recommends running cron jobs hourly. Cron can be executed from the browser by visiting http://localhost/drupal/cron. It is also possible to run cron via script by copying the appropriate file from the "scripts" folder into
/etc/cron.hourly and making it executable.
Upload progress not enabled
Upon successful installation you may see the following message in the Status Report:
Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC.
First, install thepackage. Next, use the pecl command to automatically download, compile and install the library:
# pecl install uploadprogress
Finally, add to