DirectAdmin: Web control panel

Updating FreeBSD and custombuild ports

by ross at 03:44:55 on December 8, 2011

You have to be carefull when updating FreeBSD ports as some of the software is installed via DirectAdmin's custombuild script not via ports. This software could depend on particular version of a library, so updating that library via ports will break things...

But first, read the custombuild FAQ. Personally, I decided to stay with version 1.1 of custombuild until PHP 6 is production ready.

PHP and GD

Fix GD/libjpeg error with corrupted JPEG images (switch from PHP-bundled GD to standalone version from ports).

# cd /usr/local/directadmin/custombuild
# ./build clean
# ./build update
# mkdir -p custom/ap2
# cp -fp configure/ap2/configure.php5 custom/ap2/

Edit custom/ap2/configure.php5. We actually need to change --with-gd line only but custombuild crippled mysql lines somehow, had to reset them to working version.

#!/bin/sh
./configure \
        --with-apxs2 \
        --with-curl=/usr/local/lib \
        --with-gd=/usr/local/lib \
        --enable-gd-native-ttf \
        --with-ttf \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-freetype-dir=/usr/local/lib \
        --with-kerberos \
        --with-openssl \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr/local/mysql \
        --with-mysqli=/usr/local/mysql/bin/mysql_config \
        --with-pcre-regex=/usr/local \
        --with-pdo-mysql=/usr/local/mysql \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --enable-zip \
        --with-iconv=/usr/local \
        --enable-bcmath \
        --enable-calendar \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-mbstring
# pkg_delete gd-\* jpeg-\* png-\*
# cd /usr/ports/graphics/gd
# make install clean
# find /usr/local/include -type f -name "gd*" -depth 1 -exec ln -s {} /usr/local/lib/ \;
# cd /usr/local/directadmin/custombuild
# ./build php n

 

Comments