InstallationOfFreeBSDports
From Sit
| SiT! Manual | Installation → InstallationOfFreeBSDports | Appendix A1 |
Contents |
A few words
Using the ports system on BSD will compile packages with options of your choice, the compiling can take a long time so please be patient.
When you are presented with a choice of what to add/remove in a package you can use the SPACE bar to select/deselect, CURSOR keys to navigate up and down, TAB to jump from field to field, and ENTER to accept the choice where the cursor is located (Accept/Cancel) this you should already be familiar with if you have installed FreeBSD yourself.
Requirements
- You have a working installation of FreeBSD (or other BSD, just change paths as neccesary)
- Your FreeBSD installation has access to the internet
- You know how to use a shell
- Your server has a FQDN and can be looked up by its DNS server or the FQDN is added to the hosts file, else apache won't run
Recommendations
- You know how to upgrade ports packages
Preparation
Install/Update Ports
If you don't have ports installed run the following command as root
# portsnap fetch extract
If you already have ports
# portsnap fetch update
Install Apache and MySQL
If you already have Apache and MySQL installed, skip this step.
I will not cover the installation of Apache and MySQL in details, this will be using default settings.
# cd /usr/ports/www/apache22
# make install
edit /usr/local/etc/httpd.conf and add the following to the addtype section
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Accept default settings, and wait til it finishes
# cd /usr/ports/databases/mysql51-server
# make install
add the following to /etc/rc.conf
apache22_enable="YES"
mysql_enable="YES"
Install SiT
Install SiT
# cd /usr/ports/www/sit/
# make install
This will install PHP5 and the required modules, and you can add the optional ones you require.
A copy of the screen text is added for reference
*****************************************************************
Create a database for SiT
Login to mysql using:
#> mysql -u root -p
mysql> create database sit;
mysql> create user 'sit'@'localhost' identified by 'yourpassword'
mysql> grant all privileges on sit.* to 'sit'@'localhost'
*****************************************************************
You will also need to configure Apache. Consider adding the following
to your httpd.conf:
Alias /sit "/usr/local/www/sit"
<Directory "/usr/local/www/sit">
AllowOverride all
Allow from all
</Directory>
Then restart Apache: 'apachectl graceful'
Please visit 'http://<yourhost>/sit/' in a
web-browser and follow the configuration instructions.
Remove SiT
To remove SiT just run the commands as below
# cd /usr/ports/www/sit/
# make deinstall
# mysql -u root -p
# drop database <sitdatabase>;
# drop user '<situser>'@'<host>';
# exit
Fill out the blanks with your own info, usually <sitdatabase> = sit, <situser> = sit, <host> = localhost.