Setting up Apache/mySQL/PHP in Jail

Server: FreeBSD 7.2-Release

Previously I admin a website that uses IP.Board as a forum. It was on a FreeBSD server but there were some issues with some other people on the server so the whole server has been resetup. It is has been set up as a Unix Jail and I was given root access. Apache has been installed I've been told but I'm not sure how to configure it so that it points to the domain but I'm waiting to hear back from him on that.

Right now I'm trying to install mySQL. However the base commands like groupadd and useradd that I would use to set up my mysql user aren't working. I'm not sure if that is because of the Unix Jail or something else.

Can anyone direct me on what I need to do to set up mySQL?

Why not just install it via ports?

cd /usr/ports/databases/mysql50-server
make install clean

If you dont have ports already you can do:

cd /usr/src
fetch "ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz"
tar xvfz ports.tar.gz -C /usr

Then repeat the commands above.

To keep your ports updated you can do:

portsnap fetch
portsnap update

Because I didn't know I could install it that way. Thank you, that seems to have made that part painless at least. I suppose the same thing can also be done to install PHP.

By chance do you also know how I can find out which folder apache is set up as the public or the www folder for the domain?

Edit: Ok I'm still having trouble with setting up my sql group and users.

groupadd mysql
useradd -g mysql mysql

Issue resolved now.