Цитата(kiabrin @ 21.4.2009, 20:05)
имею сервак под FreeBSD, вывешеный через port forwarding под реальный IP, в корбине, в митино. работает круглосуточно, привязан домен.
как на этом повесить бы ретрекер?
Код
make -C /usr/ports/devel/subversion install clean
Код
make -C /usr/ports/devel/boost install clean
Код
rehash
Код
cd /usr/local/ && svn co https://xbtt.svn.sourceforge.net/svnroot/xbtt/trunk/xbt/misc xbt/misc && svn co https://xbtt.svn.sourceforge.net/svnroot/xbtt/trunk/xbt/Tracker xbt/Tracker
Код
cd xbt/Tracker && chmod +x make.bsd.sh && ./make.bsd.sh
Собсно создать базу в mysql и залить туда дамп:
Код
mysql -uroot -p
Код
>CREATE USER 'xbt'@'localhost' IDENTIFIED BY '***YOU_PASSWORD***';
>GRANT USAGE ON *.* TO 'xbt'@'localhost' IDENTIFIED BY '***YOU_PASSWORD***';
>CREATE DATABASE IF NOT EXISTS `xbt`;
>GRANT ALL PRIVILEGES ON `xbt`.* TO 'xbt'@'localhost';
>exit;
Код
mysql -uxbt -p xbt < xbt_tracker.sql
Код
cp xbt_tracker.conf.default xbt_tracker.conf && ee xbt_tracker.conf
У меня содержимое такое (над своим думай сам.):
Код
mysql_host = localhost
mysql_user = xbt
mysql_password = xbt
mysql_database = xbt
pid_file = /var/run/xbt_tracker.pid
announce_interval = 1800
anonymous_connect = 1
anonymous_announce = 1
anonymous_scrape = 1
auto_register = 1
clean_up_interval = 60
daemon = 1
debug = 0
full_scrape = 0
gzip_debug = 1
gzip_scrape = 1
listen_ipa = 10.27.12.214
listen_port =
listen_port = 2710
log_access = 0
log_announce = 0
log_scrape = 0
read_config_interval = 60
read_db_interval = 60
redirect_url = http://re-tracker.ru
scrape_interval = 0
table_announce_log = xbt_announce_log
table_files = xbt_files
table_files_users = xbt_files_users
table_scrape_log = xbt_scrape_log
table_users = xbt_users
write_db_interval = 15
Запуск такой мулькой:
Код
ee /usr/local/etc/rc.d/xbt.sh
Содержимое xbt.sh:
Код
#!/bin/sh
. /etc/rc.subr
name="xbt_tracker"
rcvar=`set_rcvar xbt_tracker`
load_rc_config ${name}
: ${xbt_tracker_enable="NO"}
: ${xbt_tracker_flags="--conf_file /usr/local/xbt/Tracker/xbt_tracker.conf"}
pidfile="/var/run/${name}.pid"
command="/usr/local/xbt/Tracker/${name}"
required_files="/usr/local/xbt/Tracker/${name}.conf"
case "${xbt_tracker_flags}" in
*-p\ *)
echo "ERROR: \$xbt_flags includes -p option." \
"PID file is already set to $pidfile."
exit 1
;;
*)
command_args="-p ${pidfile} ${xbt_tracker_flags}"
;;
esac
run_rc_command "$1"
Код
chmod +x /usr/local/etc/rc.d/xbt.sh
Код
echo xbt_tracker_enable="YES" >> /etc/rc.conf
echo xbt_tracker_flags="--conf_file /usr/local/scripts/xbt/Tracker/xbt_tracker.conf" >> /etc/rc.conf
Код
/usr/local/etc/rc.d/xbt.sh start
Код
ps -ax | grep xbt
Код
1244 ?? Ss 0:00,48 /usr/local/scripts/xbt/Tracker/xbt_tracker --conf_file /usr/local/xbt/Tracker/xbt_tracker.conf -p /var/run/xbt_tracker.pid
1526 p0 S+ 0:00,00 grep xbt