This page explains how to install Drupal on Fedora systems. The
/usr/share/doc/drupal-*/drupal-README.fedora page on your system also has up-to-date instructions for your versions of Fedora and Drupal.
Web and SQL server setup
- Switch to the root account. Enter the root password at the prompt.
- Install necessary packages:
dnf install @'Web Server' mariadb-server drupal7
- If you have not already done so, start the MariaDB database server:
systemctl start mariadb
- If you have not already done so, set up the MySQL database server's administrator account. First press enter for the password and then provide a root password.
- Create a database for Drupal:
mysqladmin -u root -p create drupal
- Grant rights for a Drupal administrator on this database:
[root@publictest1 ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 11 Server version: 10.0.20-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> GRANT ALL PRIVILEGES ON drupal.* TO drupaladmin@localhost IDENTIFIED BY 'DRUPAL_PASSWORD'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> QUIT; ByeThe drupaladmin account and the DRUPAL_PASSWORD you used above are the ones you will use in Drupal's installation process shortly.
- Turn on the SELinux booleans that allow the Apache web server to contact the MySQL database via the network and send email:
setsebool -P httpd_can_network_connect_db=1 setsebool -P httpd_can_sendmail=1
- Edit the
/etc/httpd/conf.d/drupal7.conffile. If you are installing on the same system where you run your Web browser, keep the default values below:
If you are installing on a different system on your network, change the previous lines so they read as follows:
Require all grantedSave the file.
- Edit the
/usr/share/drupal7/.htaccessfile. Uncomment the line below:
RewriteBase /drupalSave the file.
- If necessary, change your firewall settings to permit TCP port 80 (HTTP) traffic.
- Copy and change the permissions on the default settings file:
cp /etc/drupal7/default/default.settings.php /etc/drupal7/default/settings.php chmod 666 /etc/drupal7/default/settings.php
- Edit the
/etc/php.inifile to set the
date.timezonefor PHP on the system. Uncomment the line and insert your timezone, for example:
date.timezone = America/New_YorkIf you are unsure what to put here, look in the Drupal system's
/usr/share/zoneinfodirectory. You can use the relative name of a file in that directory for the timezone setting here.
- Start the Apache web server:
systemctl start httpd
- Point your web browser at the system to be installed and follow the instructions on screen. When prompted for database information, remember to use the information for the drupal MySQL database you installed earlier. When the site asks for Drupal administrator account information later, you should use a different user name and passphrase.
- Remove write permissions from the settings file:
chmod 644 /etc/drupal7/default/settings.php