TorrentFlux.com Welcome, Guest. Please login or register.
07-03-2009, 00:20:53
Home Help Search Login Register donate
TorrentFlux Home | TorrentFlux Hosting

+  TorrentFlux Forums
|-+  TorrentFlux Support
| |-+  Linux Installations Support
| | |-+  FAQ - TF on FreeBSD
« previous next »
Pages: [1] Go Down Print
Author Topic: FAQ - TF on FreeBSD  (Read 8471 times)
stevebuck
Newbie
*
Offline Offline

Posts: 10




View Profile
« on: 01-09-2007, 20:14:58 »

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.0

I 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.
Code:
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
Code:
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.
Code:
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.
Code:
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.
 
« Last Edit: 01-27-2007, 20:33:58 by stevebuck » Logged

TorrentFlux2.3
FreeBSD 5.5
PHP4.4.2/MySQL4.1.18/Apache1.3.34/Python2.2.3
Qrome
Administrator
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 2783


TorrentFlux.com





View Profile
« Reply #1 on: 01-09-2007, 21:06:01 »

This is nice, but the only difference here between regular linux and FreeBSD is the last step with the

Quote
sysctl kern.ps_arg_cache_limit=1024
echo 'kern.ps_arg_cache_limit=1024' << /etc/sysctl.conf

Thanks for posting thing up clearly though.  Wink
Logged

Check out the new FireFox Extension by IceWind for TorrentFlux called TorrentFlux Add -- right click on torrents and have them added to your TorrentFlux list.
ribzer
Newbie
*
Offline Offline

Posts: 5




View Profile
« Reply #2 on: 03-12-2007, 04:50:10 »

Hi

This should also be added here although it is in the FAQ:

I've *BSD and TF isn't working properly
TF needs to access a full set of ps args to do things correctly. Normall BSD behaviour sets the length of the args returns less than needed so the following commands needs to be run as root.
Code:

sysctl kern.ps_arg_cache_limit=1024

Also, to make the change permanent you will need to edit /etc/sysclt.conf adding "kern.ps_arg_cache_limit=1024" to it.
Logged

Windows XP 64 bit | AMD Athlon 64 3200+ | Apache 2.0.39 | PHP 4.2.2 | WinMySQLadmin 1.3 | Mysql-3.23.38
Goofy
Newbie
*
Offline Offline

Posts: 1



View Profile
« Reply #3 on: 04-27-2008, 02:15:59 »

Great guide. I got this installed. My only problem is that in the frontpage of TF there's this

Free Space:     1.35 GB

i don't have any torrents and there should be 160 gb harddrive on my server, So how can i fix this?

Quote
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s1a    2.9G    1.3G    1.3G    50%    /
« Last Edit: 04-27-2008, 02:17:44 by Goofy » Logged
stevebuck
Newbie
*
Offline Offline

Posts: 10




View Profile
« Reply #4 on: 04-30-2008, 04:32:54 »

Hi Goofy,


In Torrentflux, check the settings under admin for the first item, "Path". You should have something like
/usr/local/www/data-dist/bt/downloads/
This is where Torrentflux will write downloads. If it isn't writeable, the LED will be Red. The quota will check space on this partition only.

/usr/local/www/data-dist/ is the Apache webroot. My Torrentflux runs in a directory called 'bt' and I use the default 'downloads' directory to write downloads. This directory needs to be writeable by Apache server. Apache 1.3.x on FreeBSD 6.X or above has the user and group both 'www'. You can either make Apache own the directory or make it world writeable. I prefer the first.
chown -R www:www /usr/local/www/data-dist/bt/downloads
or
chmod -R 777 /usr/local/www/data-dist/bt/downloads

I think that will solve your problem.
Logged

TorrentFlux2.3
FreeBSD 5.5
PHP4.4.2/MySQL4.1.18/Apache1.3.34/Python2.2.3
pseudonym
Newbie
*
Offline Offline

Posts: 4



View Profile
« Reply #5 on: 07-06-2008, 23:53:17 »

Thanks for the FAQ, wish I could say it was working for me, but when I got to http://servername/bt I only get INDEX OF BT and a listing of files.  I notice you say

"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."

but looking at the instructions below that, I am not seeing where you are setting the scripts to be executeable.

Please help. 

Thanks =)

Logged
pseudonym
Newbie
*
Offline Offline

Posts: 4



View Profile
« Reply #6 on: 07-08-2008, 00:08:46 »

Well.. slowly but surely getting better.  But still not working.  I have PHP up and running and python is installed.  Everything looks as it should except when I go to http://servername/bt I get:

Fatal error: Call to undefined function session_start() in /usr/local/www/apache22/data/bt/functions.php on line 27

PHP5 was compiled with sessons support and is in my extentions.ini.

Any ideas???
« Last Edit: 07-08-2008, 02:51:05 by pseudonym » Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP