HowToInstallOnFreeBSD » History » Revision 8
Revision 7 (Anonymous, 2006-12-24 04:59) → Revision 8/11 (Anonymous, 2007-03-17 11:44)
== Lighttpd on FreeBSD == (If If you don't want PHP skip to the step 2) 2 *this HowTo is deprecated (php5-cgi port moved to lang/php5 on 2006-05-06 REASON: Unification of php slave ports)* === Step 1. Verify ports installation Compiling PHP === You should have a recent ports tree installed on your system. If you have not updated your ports tree recently, please do so before continuing. If you do not have a ports tree installed, you can use cd ports/www/phpX-cgi (where X is the portsnap utility to install or update it. I find this to be an extreemly quick way (under 15 minutes on a decent broadband connection) to install the full ports tree. And you don't even have to worry about cvsup or setting up configuration files. Download most recent ports snapshot: {{{ $ sudo portsnap fetch or # portsnap fetch }}} Example output: {{{ Looking up portsnap.FreeBSD.org mirrors... 2 mirrors found. Fetching public key from portsnap1.FreeBSD.org... done. Fetching snapshot tag from portsnap1.FreeBSD.org... done. Fetching snapshot metadata... done. Fetching snapshot generated at Fri Mar 16 19:19:25 CDT 2007: dbc38dfcfd2f738fc6ffa7c9d6b1b583982a39c19db371 32% php version of 46 MB 212 kBps 02m33s (... download continues ...) dbc38dfcfd2f738fc6ffa7c9d6b1b583982a39c19db371100% of 46 MB 202 kBps 00m00s Extracting snapshot... done. Verifying snapshot integrity... done. Fetching snapshot tag from portsnap1.FreeBSD.org... done. Fetching snapshot metadata... done. Updating from Fri Mar 16 19:19:25 CDT 2007 to Sat Mar 17 04:02:50 CDT 2007. Fetching 3 metadata patches.. done. Applying metadata patches... done. Fetching 0 metadata files... done. Fetching 19 patches.....10.... done. Applying patches... done. Fetching your choice. 4 new ports or files... done.* }}} Extract snapshot: {{{ $ sudo portsnap extract or # portsnap extract }}} Example output: {{{ (... a lot of directories ...) /usr/ports/x11/xsnow/ /usr/ports/x11/xstarroll/ /usr/ports/x11/xstroke/ /usr/ports/x11/xtacy/ /usr/ports/x11/xtattr/ /usr/ports/x11/xterm/ /usr/ports/x11/xtermcontrol/ /usr/ports/x11/xtermset/ /usr/ports/x11/xtestpicture/ /usr/ports/x11/xtoolwait/ /usr/ports/x11/xtrlock/ /usr/ports/x11/xtset/ /usr/ports/x11/xvattr/ /usr/ports/x11/xvkbd/ /usr/ports/x11/xwatchwin/ /usr/ports/x11/xwit/ /usr/ports/x11/xxkb/ /usr/ports/x11/xzoom/ /usr/ports/x11/yakuake/ /usr/ports/x11/yalias/ /usr/ports/x11/yelp/ /usr/ports/x11/zenity/ Building new INDEX files... done. }}} === Step 2. Install PHP 5 === {{{ cd /usr/ports/lang/php5 5) $ sudo make config or # make config }}} Verify that CGI - Enable force-cgi-redirect support, and FastCGI are checked (deafult), and you want to enable REDIRECT as well. Choose ok. (Perhaps discard-path support as well?) Enable fastcgi support. Now to compile and install it: {{{ $ sudo make install clean or # && make install clean }}} === Step 3. Install lighttpd 2. Compiling Lighttpd === {{{ cd /usr/ports/www/lighttpd ports/www/lighttpd $ sudo make config or # make config }}} Verify whatever - select appropriate options for what you want for your installation of lighttpd. want/need Now to compile and install it: {{{ $ sudo make install clean or # && make install clean }}} === Step 4. Post install configuration === Refer to ["TutorialLighttpdAndPHP"] for more fun.