Using FreeBSD Ports tree for services?

Geffy

Verified User
Joined
Aug 24, 2004
Messages
82
How feasible would it be to use things like php, gd, apache, mysql and all that sort of thing from the FreeBSD ports tree instead of the ones DirectAdmin installs. Assuming one changed the directories that the ports installed into and things like that how possible would it be.
Are the DirectAdmin builds tweaked much?
 

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
Yes it's entirely possible. At the moment, I've only moved MySQL to the ports system. I'm quite happy to leave Apache, PHP, GD etc as the customapache build system works fine. I'm using FreeBSD 5.3.

To move MySQL to the ports system, I use these make options in /usr/local/etc/pkgtools.conf:

MAKE_ARGS = {
'databases/mysql40-server*' => 'DB_DIR=/usr/local/mysql/data BUILD_OPTIMIZED=1 BUILD_STATIC=1 WITH_LI
NUXTHREADS=1 WITH_CONDWAIT_PATCH=1',
}

It works great, no problems at all. Just be careful with your data if you make the change and don't forget to make backups.

HTH,
Matt :)
 

Geffy

Verified User
Joined
Aug 24, 2004
Messages
82
thats pretty good.

the main reason I am wondering is that I cant seem to get php to build on a 5.4 amd64 server, it craps out when checking for mysqlclient mysql_close and mysql_error stuff.

granted this isnt the FreeBSD 5.x section, but the ports question was more 4.x 5.x ranging
 

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
To be honest, if PHP won't compile using the customapache build system, it probably won't using the ports. Can you post the compile error?

Matt :)
 

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
Just to add to my comments about moving MySQL to ports... some of those make options are essential (such as the data directory), otherwise the ports build won't work properly with DA. Also, I deleted /usr/local/etc/rc.d/mysqld (DA's MySQL init script), and renamed /usr/local/etc/rc.d/mysql-server.sh (can't remember the exact filename) to /usr/local/etc/rc.d/mysqld so that it's compatible with DA. Please double check the filenames and their contents, I can't remember the process exactly so please just use this as a very rough guide.

Thanks,
Matt
 

Geffy

Verified User
Joined
Aug 24, 2004
Messages
82
the data directory for the ports version can be changed by setting mysql_dbdir="/home/mysql" in your /etc/rc.conf file.
 
Top