Installing Drupal 7 on Centos 5.x machine

Installing Drupal is easy. Just follow instructions on project page and this shouldn't take more than 30 minutes to install and run your site.
But I spotted two problems while installing Drupal 7.x on my Centos 5.6 machine.
I've already have apache with php set up and working, but Drupal needs php>5.2 and default Centos php is 5.1.
Fast google search, and I have new rpm repository:

/etc/yum.repos.d/CentOS-Test.repo:
[c5-Test]
name=CentOS-5 Test
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*

Then
yum update php
and you are ready.
But I've also have some missing packages for Drupal. I've already have: php-cli, php-ldap, php-pdo, php, php-pgsql, php-common, php-mysql, but it turns out that I also need some additional. So fast:
yum install php-gd
yum install php-dom
yum install php-mbstring
service httpd restart

And I'm done with requirements.

But after that I get to database connection screen and there's another surprise. I got database on another host set up and ready for connecting (can connect with cli tool), but Drupal setup claims that "SQLSTATE[HY000] [2003] Can't connect to MySQL server on ..". Strange. I've done fast tcpdump check and there are no packets traveling to database system.
So another fast google search :). And yes, as I wonder SElinux love to block things (I'm kinda fan of SElinux ;). One additional command:
setsebool -P httpd_can_network_connect=1
and Drupal is set up and working.

Have fun!

Comments

I don't see the connection between the contents with the title or the article? Tune your title.

Tuned. Even with not tuned title was positioning well with google ;)

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Main menu

Article | by Dr. Radut