The installation of OpenCart is FreeBSD is pretty straight forward. The following article can be used as a procedure to do a basic install of OpenCart on FreeBSD. This is tested on FreeBSD 10.2.
For installing OpenCart on FreeBSD, we need to have a FAMP stack. Check this article to install FAMP stack.
Install the ‘opencart’ package. This also installs the dependencies required.
pkg install opencart
Once the package and its dependencies are installed, edit the file /usr/local/etc/apache24/httpd.conf and make the following changes.
DocumentRoot "/usr/local/www/opencart" <Directory "/usr/local/www/opencart"> .... Options Indexes FollowSymLinks .... AllowOverride None .... Require all granted </Directory>
Restart Apache service once the changes are made.
Let us now create the database and the user required by OpenCart.
mysql -uroot -p mysql> create database opencart; mysql> GRANT ALL ON opencart.* TO 'opencartuser'@'localhost' IDENTIFIED BY 'opencartpassword'; mysql> quit
The installation can be started by using the following URL on the browser.
Complete the installation through the web pages. Once the installation is complete remove the install directory.
rm -rf install
Now you can login to the admin console using the following URL