This is the first screen after a sucessful Drupal 7.22 install.
Drupal is a content management system that runs at least 2.1% of all websites(1). It is easy to use, extensable with over 20,000 add-ons, and runs beautifully with a LAMP stack.
At the heart of most Drupal sites is a MySQL database with, as of Version 7.22, 76 tables. Recently I was asked what needs to be done to a ‘generic’ Drupal to get it running on MySQL 5.6. It is a very easy update that provides better performance, security, and allows access to the newest MySQL 5.6 updates.
For this example, the generic box is a two CPU Dell x86_64 box running Centos 6.4. This is fairly typical of what a low-end hosted system from one of the many web hosting businesses a small busines might rent. Centos 6.4 was installed.
Now to use Yum to get the with the default versions of Apache, PHP, and MySQL. Sadly the MySQL provided is 5.1.69 not 5.6 (out for a month or so) or even 5.5 (two years since GA status). We will upgrade MySQL later.
yum -y install mysql-server httpd php php-mysql wget
chkconfig httpd on
chkconfig mysqld on
Next we need to create a database for Drupal’s use. This is how it can be down from a Linux shell for those shy on using the MySQL client program.
echo 'CREATE DATABASE drupal;' | mysql
echo "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'drupal';" | mysql
echo "FLUSH PRIVILEGES;" | mysql
Now to get Drupal installed. Make sure your Apache DocRoot is where you install the software.
tar -xzf drupal-7.22.tar.gz --strip-components=1
chown -R apache.apache .
cp ./sites/default/default.settings.php ./sites/default/settings.php
Now Drupal can be configured using a web browser. Be sure to plug in your infromation from the GRANT ALL PRIVILEGES ON drupal.* TO ‘drupal’@'localhost’ IDENTIFIED BY ‘drupal’; step for you database name, user and password. You should see something similar to the graphic at the top of this post.
So now we have a fairly generic Drupal installation that is ready to upgraded to MySQL 5.6 and next time the upgrade steps will be detailed as well as some upgrade methodologies that need to be considered.
- See http://trends.builtwith.com/cms/Drupal