Installing PHP 5.3.1 on BlueOnyx Linux
Articles / Website construction
Date: Feb 23, 2010 - 11:15 PM
|
After reading there was no way to do this, I decided to give it a go myself.
What follows are instructions on how to install the latest PHP 5.3.1 onto BlueOnyx, alongside the old PHP, so that BlueOnyx control panel still uses the old one.
Your sites can choose to run the old or new version.
Please note that I did this install successfully on my clean BlueOnyx install.
Because it requires compiling PHP from source, the below will yum install the gcc compiler and various devel packages. BlueOnyx does not install these as standard (I believe a security decision). The PHP configure compiler options I have chosen are fairly standard, but of course you can change them to suit. Installation is done in /home/habitableplanet following the convention of other third party apps.
mkdir /home/habitableplanet
cd /home/habitableplanet
mkdir -p usr/local/php53 etc/php53 etc/php53.d
yum install \
gcc \
libicu-devel \
libxml2-devel \
mysql-devel \
libpng-devel \
libjpeg-devel \
curl-devel \
bzip2-devel \
gettext-devel \
gmp-devel \
pcre-devel \
freetype-devel \
gd-devel \
aspell-devel \
db4-devel \
libxslt-devel \
php-xml
cd ~
wget http://uk.php.net/get/php-5.3.1.tar.bz2/from/this/mirror
tar xvjf php-5.3.1.tar.bz2
cd php-5.3.1
./configure \
--prefix=/home/habitableplanet/usr/local/php53 \
--with-config-file-path=/home/habitableplanet/etc/php53 \
--with-config-file-scan-dir=/home/habitableplanet/etc/php53.d \
--with-bz2 \
--with-db4=/usr \
--with-curl \
--with-exec-dir=/usr/bin \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--without-gdbm \
--with-gettext \
--with-gmp \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl \
--with-pspell \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-wddx \
--with-kerberos \
--enable-ucd-snmp-hack \
--enable-shmop \
--enable-calendar \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-libxml-dir=/usr \
--with-gd=/usr \
--with-regex=system \
--with-xsl=/usr \
--enable-mbstring
gmake
gmake install
Now for each site you want to use PHP 5.3 do
vi /etc/httpd/conf/vhosts/site1.include
Add the entries:
ScriptAlias /php53-cgi /home/habitableplanet/usr/local/php53/bin/php-cgi
Action application/x-http-php53 /php53-cgi
AddHandler application/x-http-php53 .php
Also add this in /etc/httpd/conf/vhosts/preview if you make use of the site preview
Thats it. The above took me a few attempts to work out :)
All at your own risk, of course :)
|
This article comes from Jansz.Com
http://www.jansz.com/
The URL for this story is:
http://www.jansz.com/modules.php?op=modload&name=News&file=article&sid=89
|
|