# Apache 2.4, MySQL 5.5, PHP 5.4.10, and CMS



## planetary (Dec 24, 2012)

Hi, first post here.

I have a FreeBSD 9.0 VM with the ports database installed. My goal is to set up an AMP stack and to support a CMS package, probably Typo3 or possibly just plain-old WordPress. My issue is that the versions of the AMP components are a bit dated for Typo3, though I think they're just fine for WordPress. And Typo3 looks pretty cool and I'd like to try it out and see what I can make it do.

So I am going to install Apache, PHP, and MySQL from the latest codebases to give Typo3 a whirl.

I'm asking for a bit of advice. I'm thinking through the interdependencies and configuration management, and there are a lot of variables in how I can configure these three codebases to work together optimally. 

It would be great if someone who has done this before could point out the most important and fundamental dependencies to concern myself with. Things like building PHP as an Apache module, whether to use multi-threaded Apache, and the nature of the dependencies on MySQL coming from PHP and Apache are the first things that come to mind--I'm sure there are others, hence my request.


Thanks in advance, Kris


----------



## UNIXgod (Dec 26, 2012)

> "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" - Donald Knuth



Okay lets start at the beginning. What specifically is your goal? To learn about FreeBSD? To set up this service on a vm? To have the most control to change stuff later as you experience growth?

Might I recommend reading tuning(7). Also read the handbook. Specifically on how the ports system works.

Also consider separating your database server from your web server.

From there ask one question at a time.


----------



## planetary (Dec 27, 2012)

I have a meta-goal, which is to learn how to use FreeBSD competently as a sysadmin. If I can't do that, then all other efforts with FreeBSD are meaningless. 

Since I would like to host a CMS system, Typo3, on FreeBSD, I need to learn the dependencies between the components of the AMP stack that Typo3 relies on. From there, I would like to learn how to deploy and configure Typo3, just as I would if I was working on a Linux distro, a Mac, or Windows.

Things like the tuning man page are quite useful, thank you very much, and address some aspects of my VM, such as the system handling a minimum to a moderate amount of network traffic. FreeBSD running on the ESXi virtual file system requires more research into VMware's strategy for virtualizing file systems, as it's unclear how that takes place, although my research is ongoing. I also read the ports system documentation and the set of examples. 

I'm asking one question right now:

What is pkg2ng and how am I supposed to use it? I can't find it in the doc. I'm using FreeBSD-9.1.

Thanks, Kris


----------



## SirDice (Dec 27, 2012)

planetary said:
			
		

> What is pkg2ng and how am I supposed to use it? I can't find it in the doc. I'm using FreeBSD-9.1.


Part of the new package system.

http://wiki.freebsd.org/pkgng


----------



## tomsdongle (Dec 27, 2012)

I've been running TYPO3 atop of FreeBSD for quite some time now, there are quite a few dependancies required to run the CMS, which can become quite frustrating. Luckily, the TYPO3 installer tells you exactly what is missing (namely PHP libraries).

TYPO3 is available via ports, however i've always struggled to get it to work that way, instead I just fetch it down from typo3.org and install the old fashioned way :S

If you get stuck let me know.


----------

