In this article I'll show you how to install and configure Lighttpd web server on FreeBSD 8.1 with PHP5 support (through FastCGI) and MySQL support.
1. FreeBSD port tree update
Update FreeBSD ports using the following command:
portsnap fetch update
Once is done, we can proceed with the next step.Print This Post
eAccelerator is an open source PHP accelerator, optimizer, and dynamic content cache which provides a bytecode cache. eAccelerator increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.
1. Install prerequisites
There is no eAccelerator package in the official repositories, therefore we must compile and install it from the sources. Before we can do this, we need to install some prerequisites.Print This Post
1. Install Apache HTTP Server
Go to apache22 port:
# cd /usr/ports/www/apache22
# make config
Now you can choose the options from the menu.
# make install clean
To enable apache on boot, add the following line to /etc/rc.conf
To start apache http server, type
# /usr/local/etc/rc.d/apache22 start
2. Install PHP 5
Go to php port:
# cd /usr/ports/lang/php5