How to install a webserver on FreeBSD
to install:
/etc/make.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
Installed as a dependency of portupgrade
Installed as a dependency of portupgrade
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/
Installed as dependency of Apache
build after apache:
# cd /usr/ports/lang/php5 # make install clean
build after php5:
# cd /usr/ports/lang/php5-extensions
make
:# make
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
make install clean
:# make clean
# cd /usr/ports/databases/phpmyadmin # make install clean
(this will also install pear
)
# cd /usr/ports/databases/pear-DB # make install clean
# cd /usr/ports/devel/pear-Config # make install clean
# cd /usr/ports/devel/pear-Console_Color # make install clean
# cd /usr/ports/devel/pear-Console_Getargs # make install clean
# cd /usr/ports/devel/pear-XML_RSS # make install clean
# cd /usr/ports/devel/pear-XML_NITF # make install clean
# cd /usr/ports/devel/pear-XML_SVG # make install clean
# cd /usr/ports/devel/pear-XML_Serializer # make install clean
pear-XML_Transformer
pear-XML_Tree
pear-XML_XPath
/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
my.cnf
- examples in /usr/local/share/mysql/
)