I'm hoping my experience will help others here that want to run TF on our beloved FreeBSD and that this can lead to a 'FreeBSD Installations Support' forum topic. Up to our moderator lo.
The following FAQ assumed you have full root access to a FreeBSD system. This procedure should work for both 5.X and 6.X branches of FreeBSD. It also assumes that you have MySQL, Apache, PHP and Python already installed and configured properly. For that, please see other FAQ:
http://www.torrentflux.com/forum/index.php?topic=2469.0I have made two modifications since the original post to correct a copy error with FreeBSD 6.1 and a typo error for adding the sysctl to rc.conf. I also recommend using 'ee' on FreeBSD is you are unfamiliar with 'vi' for doing edits. 'ee' is much easier to use.
Upload the TF 2.3 Linux package file to your user workspace.
Extract the files, create database, install tables.
tar -zxf torrentflux_2.3.tar.gz
cd torrentflux_2.3
mysql -u root -p
create database torrentflux;
quit
mysql -u root -p torrentflux < sql/mysql_torrentflux.sql
check the tables
mysql -u root -p
use torrentflux;
show tables;
quit
This is the correct result when showing the tables of the torrentflux database.
+-----------------------+
| Tables_in_torrentflux |
+-----------------------+
| tf_cookies |
| tf_links |
| tf_log |
| tf_messages |
| tf_rss |
| tf_settings |
| tf_users |
+-----------------------+
7 rows in set (0.00 sec)
If you are not root, su to superuser now. Note, in FreeBSD, you must be a member of the group 'wheel' to use the 'su' command.
Now we are going to copy the required files to the web root, into a folder called 'bt', we'll make Apache own it and then make the Python scripts executeable. Lastly the config file needs to add the MySQL password.
mkdir /usr/local/www/data/bt
cd html
cp -R * /usr/local/www/data/bt
cd /usr/local/www/data
chown -R www:www bt
cd bt
chmod -R 755 TF_BitTornado
ee config.php
$cfg["db_pass"] = ""; // password for database
put the password ^ between the quotes
Now the last thing we need to do is correct the cache limit for 'ps'. We'll do that in two steps, first cahnge it in real time, then modify the startup script so that it is correct on later reboots of the server.
sysctl kern.ps_arg_cache_limit=1024
echo 'kern.ps_arg_cache_limit=1024' >> /etc/sysctl.conf
Now point your browser to your webserver and 'bt' directory and do initial login.
It is probably a good idea to change 'Show Server Load' to false, since this function depends on Linux loadavg and FreeBSD doesn't have that.