1. Download/ Extract the files
tar -zxf torrentflux_x.x.tar.gz
2. create database/ install tables.
cd torrentflux_x.x
mysql -u root -p
create database torrentflux;
quit
mysql -u root -p torrentflux <>
mysql -u root -p
create database torrentflux;
quit
mysql -u root -p torrentflux <>
2.1 check the tables
mysql -u root -p
use torrentflux;
show tables;
quit
use torrentflux;
show tables;
quit
จะแสดง tables ออกมาตามนี้ครับ
+-----------------------+
| Tables_in_torrentflux |
+-----------------------+
| tf_cookies |
| tf_links |
| tf_log |
| tf_messages |
| tf_rss |
| tf_settings |
| tf_users |
+-----------------------+
7 rows in set (0.00 sec)
Note: 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.
3. 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
nano config.php
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
nano config.php
$cfg["db_pass"] = ""; // password for database
ใส่ password ^ ลงไประหว่างเครื่อง "
(ตรงนี้ครับผมติด ถ้าไม่ได้ผู้เขียนนี้คงไม่ได้ใช้แน่ 5555)
4. 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
echo 'kern.ps_arg_cache_limit=1024' >> /etc/sysctl.conf
5. ก็เป็นเรื่องการ configure apache อาจจะทำ alias หรือจะทำเป็น domain ก็ตามใจครับ แต่ผมเลือกทำ alias ครับ ง่ายที่สุด ส่วนวิธีทำหาดูตาม net ครับไม่ยาก