2009/09/06

Drupal install on CentOS5

PHP 5.3 is not supported on current Drupal (6.14), and CentOS's PHP version is still on 5.1.9. So the drupal installation needs a little bit of work.

1. Install MySQL 5.1
cd /etc/yum.repos.d
wget wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
yum --enablerepo=remi install mysql mysql-server mysql-devel mysql-libs


2. Install PHP 5.2.9 from CentOS testing repository:
cd /etc/yum.repos.d
wget http://dev.centos.org/centos/5/CentOS-Testing.repo
yum --enablerepo=c5-testing install php php-devel php-pear php-pecl php-mcrypt php-xml php-xml php-imap php-soap php-mbstring php-mysql php-cli php-mysql


3. drupal clean URL config (sample)
there are many ways to turn on clean URL. Here's how I do it:
AllowOverride All
Options Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from all

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Alias /drupal /var/www/drupal


4. PHP.ini
modify the following keys, this is my settings:

max_input_time = 100 ; Maximum amount of time each script may spend parsing request data
memory_limit = 100M ; Maximum amount of memory a script may consume (16MB)
error_reporting = E_ALL
memory_limit = 100M ; Maximum amount of memory a script may consume (16MB)
upload_max_filesize = 100M


5. upload progress

add the extension to php.ini:
if you don't have gcc installed:
yum -y groupinstall "Development Tools"

install pecl related if you don't have them yet:

yum -y install php-devel php-pecl php-pear


install the upload progress:

pecl install uploadprogress


edit your /etc/php.ini and add this line under extension section:

extension=uploadprogress.so


6. GD library

yum --enablerepo=c5-testing install gd gd-devel php-gd


6. Install drupal

沒有留言:

Mercury簡易改裝

有同好有一樣的困擾 - 如何使用自己的data logging軟體,因此寫了這篇來分享我的簡易改裝。 Background 雲豆子 MERCURY roaster 烘豆機的設計是使用自行開發的軟體,來:1. 操控風門/火力; 2. data logging/自動烘焙。 ...