Theserve Blog

web hosting and virtual server blogHow to configure CentOS 5 to allow Plesk Sitebuilder to publish

Posted On: 15th February 2012 under linux

After choosing to adopt Parallels Plesk Sitebuilder for our customers we were required to modify our servers slightly in order for the publishing part of sitebuilder to work.

First off, its worth mentioning that we have installed the IUS repositories in order to install the php53u rpms. This enables us to run PHP 5.3 on our servers and maintain packages using yum.

We begin by updating all the packages on the server:

# yum update

Once happily updated we need to have the Ioncube extensions installed:

# yum install php53u-ioncube-loader.x86_64

Sitebuilder also requires SQLITE v2 which is a shame as V3 is now the standard, however you can have both installed:

# yum install compat-readline43.x86_64
# wget http://pkgs.repoforge.org/sqlite/sqlite-2.8.17-1.el4.rf.x86_64.rpm
# rpm -i --force sqlite-2.8.17-1.el4.rf.x86_64.rpm

Now we need to configure the sqlite module, in order to do this we need to install the php-devel packages so we have phpize available

# yum install php53u-devel.x86_64

And then download the PHP .src.rpm to compile the module

# cd /home
# mkdir tmp
# cd tmp
# wget http://mirror.rackspace.co.uk/ius/stable/Redhat/5/SRPMS/php53u-5.3.10-1.ius.el5.src.rpm

Now we use rpm2cpio to extract the source

# rpm2cpio php53u-5.3.10-1.ius.el5.src.rpm | /bin/cpio -idmv
# tar xvzf php-5.3.10.tar.gz
# cd php-5.3.10/ext/sqlite

Sitebuilder also requires sqlite to have UTF-8 support so we need to modify one of the source files as follows

# vi libsqlite/src/main.c

and change this:

#ifdef SQLITE_UTF8
const char sqlite_encoding[] = "UTF-8";
#else
const char sqlite_encoding[] = "iso8859";
#endif

to

//#ifdef SQLITE_UTF8
const char sqlite_encoding[] = "UTF-8";
//#else
//const char sqlite_encoding[] = "iso8859";
//#endif

And then we compile the module

# phpize
# ./configure
# make

And finally move it in place and add the config file

# cp modules/sqlite.so /usr/lib64/php/modules/
# echo extension=sqlite.so > /etc/php.d/sqlite2.ini
# service httpd restart

And if all went well, you should now be able to pubish your sitebuilder websites to your web hosting using the Sitebuilder publishing tools.