How to upgrade PHP and MySQL on DirectAdmin

Kal K

Member
Registered
Joined
Feb 2, 2015
Messages
37
Points
0
To upgrade PHP version 5.3 on DirectAdmin, you can follow the steps below:

SSH login your server and type following lines:

Code:
cd /usr/local/directadmin/custombuild
./build update   
./build set php5_ver 5.3   
./build php n
If you get this error

this version of PCRE is not complied with PCRE_UTF8
Then you can do these steps

First, edit /usr/local/directadmin/custombuild/configure/ap2/configure.php5
Replace --with-pcre-regex=/usr/local with --with-pcre-regex
After that run these commands
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set php5_ver 5.3
./build php n
And check phpinfo() to see if PHP and PCRE are updated.

Alternative solution
First, install PCRE 8.10:
Code:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.bz2
tar jxf pcre-8.10.tar.bz2 && cd pcre-8.10
./configure --prefix=/usr/local
Install
Code:
cd /usr/local/directadmin/custombuild/
./build update
./build set php5_ver 5.3
./build php n
Finally, check phpinfo() to see if it's properly installed.
PHP Version: 5.3.x
PCRE Library Version: 8.10
Under Configure Command, you should find: --with-pcre-regex=/usr/local

Upgrade to PHP 5.4.x

Code:
cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build set php5_ver 5.4
./build update
./build clean
./build php d
How to upgrade Mysql with custombuild
To upgrade mysql using the custombuild script, do the following:
Code:
cd /usr/local/directadmin/custombuild
./build set mysql 5.1
./build set mysql_inst yes
./build set mysql_backup yes
./build update
./build mysql
Where mysql can be 5.0, 5.1 or 5.5.

A full raw sql backup will be run prior to the upgrade if you have mysql_backup=yes set. It goes without saying, always make backups, either with this tool, or with other means.

After the mysql update, always recompile php.

Code:
./build php n
 
Older Threads
Latest Threads
Recommended Threads
  • Locked
Replies
5
Views
4,462
Replies
2
Views
2,172
Similar Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top