Install and configure Apache with PHP & MySQL

Hello guys,
it's the first time I seriously want to set up a webserver.

I want to use Apache 2.2 and I need PHP and a MySQL-Database.

Of course I'd like to keep the installation as minimal as possible, so I don't want anything not necessary for my purposes.
I have consulted the Apache documentation, but the short description of the modules did not really help me.

The problem is, that I don't really know what modules I need and how to install and configure it.

Do I have to install PHP and MySQL seperately or can I pull it in with the Apache installation?
And do I have to change some configuration before installing, so that modules I don't need are not compiled?
Or should I do a standard installation and configure everything later (removing unwanted modules, etc.)?

What procedure would you recommend?

I hope you can give me some tips...

Thanks,
Nokobon
 
Short version:
Code:
cd /usr/ports/www/apache22
make install clean
cd /usr/ports/lang/php5
make install clean # Select the option to build the apache module
cd /usr/ports/databases/php5-mysql
make install clean
That should pretty much cover the installation.
 
Thank you for your answer!

I did exactly this on a testing mashine, but I have thought there could be some options I can disable at installation...

So, you think I just should install it this way and except for the PHP-module use the default options?
Doesn't that default configuration compiles modules I do not need for my purpose?
 
dennylin93 said:
Descriptions of the Apache modules can be found here: http://httpd.apache.org/docs/2.2/mod/. If the module is a core module or you're unsure, don't uncheck it.
As I said in my first post, I've read that part of the documentation, but the short descriptions of the modules does not really help me to decide whether I need it or not.
I am new to webserver-administration, therefore I don't really know if I need thinks like "RFC 1413 ident lookups" and "Content cache keyed to URIs".
So I'll just keep the standard module-configuration...
dennylin93 said:
If you're using MySQL, you might want to check out lang/php5-extensions.
What's the actual advantage of that port?
Does it install MySQL to work with PHP for me?
 
vivek said:
I strongly suggest you get one LAMP book from oreilly books
I got the apache cookbock from oreilly...
It's great but not suitable for beginners who just want install and configure Apache for the first time.
Is there any specific book you would recommend for this?
 
I do not want to create a new thread, so I will ask here - what is a possibility to install the latest versions of described software using ports? When I try to search using, for example [CMD=]whereis php[/cmd], I have nothing in output info. Thank you.
 
Back
Top