install webserver

How to install a webserver on FreeBSD

Information

to install:

  1. perl (installed by portupgrade)
  2. ruby (installed by portupgrade)
  3. mysql50 (didn't seem to listen to my WITH_OPENSSL=yes statement in /etc/make.conf)
  4. apache22
  5. python (installed by apache)
  6. php5
  7. php5-extesions
  8. phpmyadmin (installs a TON of php extensions)
  9. pear-DB (also installs pear)
  10. apache logfile analysis program - FIXME
  11. ImageMagick/magickwand - FIXME

Proceedure

make.conf and pkgtools.conf

you must define things in make.conf and pkgtools.conf in order for things to go right - make.conf is invoked when directly installing a port, and pkgtools.conf is used when upgrading or installing dependencies

Perl

Installed as a dependency of portupgrade

Ruby

Installed as a dependency of portupgrade

MySQL

Apache

Install apache22

The following isn't needed if apache_enable=“YES” in make.conf:

# kldload accf_http

http://www.mydigitallife.info/2006/04/23/freebsd-apache-http-accept-filter-error/

Python

Installed as dependency of Apache

PHP5

build after apache:

# cd /usr/ports/lang/php5
# make install clean

PHP5 Extensions

build after php5:

  1. # cd /usr/ports/lang/php5-extensions
  2. run make:
    # make
    1. I used the following options for my build:
      WITH_BZ2=yes
      WITH_CTYPE=yes
      WITH_CURL=yes
      WITH_DBA=yes
      WITH_DBASE=yes
      WITH_DOM=yes
      WITH_EXIF=yes
      WITH_FILEINFO=yes
      WITH_FILTER=yes
      WITH_GD=yes
      WITH_GETTEXT=yes
      WITH_HASH=yes
      WITH_ICONV=yes
      WITH_JSON=yes
      WITH_MBSTRING=yes
      WITH_MCRYPT=yes
      WITH_MYSQL=yes
      WITH_OPENSSL=yes
      WITH_PCRE=yes
      WITH_PDO=yes
      WITH_PDO_SQLITE=yes
      WITH_POSIX=yes
      WITH_SESSION=yes
      WITH_SIMPLEXML=yes
      WITH_SNMP=yes
      WITH_SOCKETS=yes
      WITH_SPL=yes
      WITH_SQLITE=yes
      WITH_TOKENIZER=yes
      WITH_XML=yes
      WITH_XMLREADER=yes
      WITH_XMLWRITER=yes
      WITH_ZIP=yes
  3. run make install clean:
    # make clean

phpMyAdmin

# cd /usr/ports/databases/phpmyadmin
# make install clean

pear

pear-DB

(this will also install pear)

# cd /usr/ports/databases/pear-DB
# make install clean

pear-Config

# cd /usr/ports/devel/pear-Config
# make install clean

pear-Console_Color

# cd /usr/ports/devel/pear-Console_Color
# make install clean

pear-Console_Getargs

# cd /usr/ports/devel/pear-Console_Getargs
# make install clean

pear-XML_RSS

# cd /usr/ports/devel/pear-XML_RSS
# make install clean

pear-XML_NITF

# cd /usr/ports/devel/pear-XML_NITF 
# make install clean

pear-XML_SVG

# cd /usr/ports/devel/pear-XML_SVG
# make install clean

pear-XML_Serializer

# cd /usr/ports/devel/pear-XML_Serializer
# make install clean

pear-XML_Transformer

pear-XML_Tree

pear-XML_XPath

Post-installation Configuration

  1. setup certificates
  2. configure apache log rotation (/etc/newsyslog.conf):
    /var/log/httpd-access.log               644  7     100  24    B    /var/run/httpd.pid 30
    /var/log/httpd-error.log                644  7     100  24    B    /var/run/httpd.pid 30
    /var/log/httpd-ssl_request.log          644  7     100  24    B    /var/run/httpd.pid 30
    /var/log/httpd-svn.log                  644  7     100  24    B    /var/run/httpd.pid 30
  3. configure mysql (my.cnf - examples in /usr/local/share/mysql/)
freebsd/install_webserver.txt · Last modified: 2007/08/12 04:07 by john
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki