|
Setting Up Apache in FreeBSD with PHP and MySQL support |
Sunday, October 23, 2005
Setting up your own Apache web server is not has difficult as you may think! Here, I will detail how to setup an Apache web server on a FreeBSD Unix machine. This web server will be setup with PHP with MySQL database support, because those are the necessary components to run this web site.
This article will also include information on setting up port forwarding on your router and configuring DNS to point to a static IP. The examples provided here are from a FreeBSD 5.4 installation on a VMware virtual workstation.
First, let's install Apache from the FreeBSD port system. I will be installing Apache version 1.3 plus mod_ssl (apache13-modssl).
| |
# cd /usr/ports/www/apache13-modssl
# make install clean
|
|
Now, let's install the PHP version 5.
| |
# cd /usr/ports/lang/php5
# make install clean
|
|
The installation of the PHP module above does not include MySQL support by default. Now, we will install PHP5 extensions for the supported functions we will need specifically, MySQL database support.
| |
# cd /usr/ports/lang/php5-extensions/
# make config
|
|
This will bring up the PHP5 extensions configuration options. Scroll down to MYSQL and select it. You may select other supported features as needed.
Press [OK] after selecting the supported functionality you want. Now, install the PHP5 extensions.
|