I'm going to use the current versions available in de ports-repository:
Apache 2.2 (v2.2.21)
MySQL 5.5 server (v5.5.17)
PHP 5 (v5.3.8)
Install MySQL
(these are the installation instructions taken from the Joomla site).
Go to the ports directory and install
Accept the default settings.# whereis mysql55-server
mysql55-server: /usr/ports/databases/mysql55-server
# cd /usr/ports/databases/mysql55-server# make install clean
Copy the MySQL configuration file to /usr/local/etc and edit this file (my.cnf)
To enable an automatic start of MySQL at boot time do the following:cp /usr/local/share/mysql/my-medium.cnf /usr/local/etc/my.cnf
Before we continue we add a root password to MySQLecho mysql_enable=\"YES\" >> /etc/rc.conf
mysql -u root password {yourpasswordhere}Install Apache 2.2.x
# whereis apache22-- Accept default settings --
apache22: /usr/ports/www/apache22
# cd /usr/ports/www/apache22
# make install clean
After installation, uncomment the following lines in /usr/local/etc/apache22/httpd.conf
(We'll dive into SSL later).Include etc/apache22/extra/httpd-mpm.conf
Include etc/apache22/extra/httpd-default.conf
Let's add Apache to /etc/rc.conf to have it started at boottime
echo apache22_enable=\"YES\" >> /etc/rc.confAlso enable AcceptFilter suport in FreeBSD kernel:
echo apache22_http_accept_enable=\"YES\" >> /etc/rc.confThat takes care of loading accf_http kernel module at system startup. To manually load the module, use
kldload accf_httpThe utility of accf_http is such that a server will not have to context switch several times before performing the initial parsing of the request. Use this command to check whether the accf_http kernel module is successfully loaded:
kldstat | grep accf_httpTo start Apache HTTP server, you may restart the system or enter command:
service apache22 startYou can point your browser to that server's URL and see whether Apache is serving the default page.
Install PHP5
# whereis php5Select Apache Module and continue till it's done. After installation we need to copy a configuration file in /usr/local/etc:
php5: /usr/ports/lang/php5
# cd /usr/ports/lang/php5
# make install clean
cd /usr/local/etcLoad the php.ini in an editor and add/change the following:
cp php.ini-production php.ini
[Date]
date.timezone = "Europe/Amsterdam"
[Session]Edit your Apache configuration file (/usr/local/etc/apache22/httpd.conf) and add this:
session.save_path = "/var/tmp"
AddType application/x-httpd-php .phpIn the DirectoryIndex add php extentions like:
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php index.htmlStart/restart Apache22
apachectl restartCreate a file /usr/local/www/apache22/data/phpinfo.php with a single line:
echo '<?php phpinfo(); ?>' >> phpinfo.phpCheck if it works by browsing to {your serverip}/phpinfo.php
Thanks to the following links I was able to get here:
http://joomlab15.exonsoft.com/en-us/articles/joomla!15x/99-joomla-15-on-freebsd-81?start=3
http://www.unixmen.com/linux-tutorials/unix-tutorials/1397-how-to-install-apache-mysql-php-phpmyadmin-in-freebsd
The Joomla info is a bit outdated and not very accurate at some points (I struggled with mod.fcgid so I left it out).
At this point I'm having a bit of a dilemma to install phpmyAdmin as well.
No comments:
Post a Comment