Transmission is a fast, easy, and free multi-platform BitTorrent client with a focus on being lightweight yet feature-packed.
» Learn More
Contents [hide]
Libxml is required by PHP so is needed.
Find your latest version: http://ftp.gnome.org.
# cd /tmp/myfiles/ # wget http://ftp.gnome.org/pub/gnome/sources/libxml2/2.6/libxml2-2.6.27.tar.gz # tar xfz libxml2-2.6.27.tar.gz # cd libxml2-2.6.27 # ./configure # make # make install
PHP needs a copy of libxml2 in the /lib/ directory.
# cp /usr/local/lib/libxml2.so.2 /lib
Find your latest version: http://be2.php.net.
# cd /tmp/myfiles/ # wget http://uk.php.net/distributions/php-5.2.5.tar.gz # tar xvfz php-5.2.5.tar.gz # cd php-5.2.5 # ./configure —without-iconv —without-pear —enable-fastcgi —enable-discard-path —enable-force-cgi-redirect —without-mysql —enable-sockets # make # make install
You can also do a make test to run an extensive test on PHP...
You need to edit lighttpd's config file as follows:
# cd /etc/lighttpd
Make a backup in case you mess up.
# cp lighttpd.conf lighttpd.conf.backup
Edit lighttpd.conf and replace this:
“nasMaster.pl” => (( “socket” => “/tmp/lighttpd.fcgi.socket”,
“check-local” => “disable”,
))
)
with this:
“nasMaster.pl” => (( “socket” => “/tmp/lighttpd.fcgi.socket”,
“check-local” => “disable”,
)),
“.php” => (( “bin-path” => “/usr/local/bin/php-cgi”,
“socket” => “/tmp/php.socket”,
))
)
Change the line that reads:
index-file.names = ( "nasMaster.pl" )
with this:
index-file.names = ( "nasMaster.pl", "index.html", "index.php" )
After you make these changes, you need to restart lighttpd:
# /etc/init.d/lighttpd.sh restart
Now to test PHP with a simple webpage.
# cd /usr/www/lib # mkdir test # cd test # vi index.php
Enter this line below into index.php.
<?php phpinfo(); ?>
Browse to http://<MyBook-IP>/test/index.php You should see all the information about the PHP installation.
This package is required and so must be installed.
Find your latest version: http://www.openssl.org.
# cd /tmp/myfiles/ # wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz # tar -xvf openssl-0.9.8g.tar.gz # cd openssl-0.9.8g/ # ./configure # make # make install
This package is required and so must be installed.
Find your latest version: http://pkgconfig.freedesktop.org.
# cd /tmp/myfiles/ # wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz # tar -xvf pkg-config-0.22.tar.gz # cd pkg-config-0.22/ # ./configure # make # make install
First of all, you MUST set the following path:
export PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig/
Find your latest version: http://download.m0k.org/transmission/
# wget http://download.m0k.org/transmission/files/transmission-1.03.tar.bz2 # tar jxvf transmission-1.03.tar.bz2 # cd transmission-1.03
Now configure and install.
# ./configure --disable-gtk # make # make install
Download and install the Web Interface for Transmission.
# cd /usr/www/lib/ # wget http://clutchbt.com/Files/Clutch-0.4.tar.gz # tar -xvf Clutch-0.4.tar.gz # mv Clutch-0.4 Clutch # chmod -R 777 Clutch/ # rm Clutch-0.4.tar.gz
Edit the socket path file.
# cd Clutch # vi remote/data/socket.txt
Insert the path to the socket file.
/tmp/transmission.socket
Save and close socket.txt.
Start the daemon by executing this command:
# transmission-daemon -s /tmp/transmission.socket
You can see if transmission-deamon is running:
# ps aux | grep transmission-daemon
root 813 0.0 2.8 1840 856 ? S 11:28 0:01 /usr/local/bin/transmission-daemon -s /tmp/transmission.socket root 816 0.0 2.8 1840 856 ? S 11:28 0:00 /usr/local/bin/transmission-daemon -s /tmp/transmission.socket root 817 0.0 2.8 1840 856 ? S 11:28 0:00 /usr/local/bin/transmission-daemon -s /tmp/transmission.socket
You need to create a symlink as below for transmission-remote to set the download path.
# cd /root/.transmission/daemon # ln -s /tmp/transmission.socket socket
Check that socket points to the transmission socket (socket -> /tmp/transmission.socket)
# ls -l
Now set the download path of the remote daemon.
# transmission-remote -f /shares/internal/PUBLIC/
Now go to http://<MyBook-IP>/Clutch and set your torrent download directory.
Saving Clutch preferences creates pref.txt in the same directory as remote/data/socket.txt.
If at this point transmission-daemon is not running, giving errors or your Clutch webui is giving errors,
probably some of your file or directory permissions are not correct.
Here are my permission settings :
[root@mybookworld /]# cd /tmp/ [root@mybookworld tmp]# ls -l -a transmission.socket srwxrwxrwx 1 root www-data 0 Dec 22 20:06 transmission.socket [root@mybookworld tmp]# cd /usr/www/lib/torrents/remote/data/ [root@mybookworld data]# ls -l -a socket.txt -rwxrwxrwx 1 501 501 25 Dec 21 16:14 socket.txt
To start transmission automatically with all correct permissions, create a simple shell script.
# cd /etc/init.d # vi transmission.sh
Add the following into the file:
#!/bin/sh
#
# Copyright (C) 2007 JRM
#
# Starts or stops the transmission daemons.
# Writes directory permissions and changes owner for
# the transmission.socket.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME="Transmission"
DESC="torrent daemon"
case "$1" in
start)
echo -n "Starting $DESC: "
transmission-daemon -s /tmp/transmission.socket
echo "$NAME."
sleep 2
chmod -R 777 /tmp/transmission.socket
chown -R www-data:www-data /tmp/transmission.socket
sleep 2
transmission-remote -f /shares/internal/PUBLIC/
;;
stop)
echo -n "Stopping $DESC: "
killall transmission-daemon
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop}" >&2
exit 1
;;
esac
exit 0
Run it like this: /etc/init.d/transmission.sh start
Edit the file post_network_start.sh.
Change this:
start() {
if [ ! -e "$POST_NETWORK_STARTED_FILE" ]
then
$SCRIPTS_PATH/crond.sh start
# $SCRIPTS_PATH/mionet.sh start
touch $POST_NETWORK_STARTED_FILE
fi
}
stop() {
if [ -e "$POST_NETWORK_STARTED_FILE" ]
then
# $SCRIPTS_PATH/mionet.sh stop
$SCRIPTS_PATH/crond.sh stop
rm $POST_NETWORK_STARTED_FILE
fi
}
to this:
start() {
if [ ! -e "$POST_NETWORK_STARTED_FILE" ]
then
$SCRIPTS_PATH/crond.sh start
# $SCRIPTS_PATH/mionet.sh start
$SCRIPTS_PATH/transmission.sh start
touch $POST_NETWORK_STARTED_FILE
fi
}
stop() {
if [ -e "$POST_NETWORK_STARTED_FILE" ]
then
$SCRIPTS_PATH/transmission.sh stop
# $SCRIPTS_PATH/mionet.sh stop
$SCRIPTS_PATH/crond.sh stop
rm $POST_NETWORK_STARTED_FILE
fi
}
Save, close and reboot the mybook.
This concludes the guide for installing Transmission with Clutch WebUI.
Q: The Transmission daemon does not appear to be running.
Q: Connection failed. Could not connect to the server.