My server just trashed my Centos install, so I had to do it all again. Here are my cheat notes from struggling for a couple of hours last night.
Keywords for google: installing transmission torrent on Centos headless server web interface (for dummies).
I'll get two things out of the way, because they are the most important frustrations. First is the daemon execution script.
This is different for Centos/Redhat because they don't have the start-stop-daemon function.
You will notice that I've commented out a few DAEMON-ARGS , which didn't work for me.
The smaller one with "-T and --blocklist" will force Transmission to start the web interface with no password, and force
"rpc-authentication-required": false, this is terribly annoying.
It appears best to start Transmission using no args, and then then the
settings.json appears in
/home/transmission/.config/transmission,
after you've run it, and stopped it.
If you are terribly stuck, you can start transmission-daemon as root (using no script), and then everything, including settings.json appears in root home.
The
transmission-daemon script for
/etc/init.d/
Code: Select all
#!/bin/bash
#
# chkconfig: - 16 84
# description: Start up transmission-daemon
#
# processname: transmission-daemon
# config: /etc/sysconfig/transmission
# source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
[ "${NETWORKING}" = "no" ] && exit 0
# Defaults
TRANSMISSION_HOME=/var/lib/transmission
DAEMON_USER="transmission"
#DAEMON_ARGS="-T --blocklist -g $TRANSMISSION_HOME/.config/transmission"
#DAEMON_ARGS="-T --blocklist "
DAEMON_ARGS=""
# Daemon
NAME=transmission-daemon
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DAEMON=$(which $NAME)
DAEMON_PIDFILE=/var/run/$NAME.pid
DAEMON_LOCKFILE=/var/lock/subsys/$NAME
DAEMON_SCRIPTNAME=/etc/init.d/$NAME
DAEMON_LOGFILE=/var/log/$NAME.log
[ -x "$DAEMON" ] || exit 0
start() {
echo -n $"Starting ${NAME}: "
if [ -n "$TRANSMISSION_HOME" ]; then
export TRANSMISSION_HOME
fi
su - $DAEMON_USER -c "$DAEMON $DAEMON_ARGS"
sleep 2
status $NAME &> /dev/null && echo_success || echo_failure
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
touch $DAEMON_LOCKFILE
pidof -o %PPID -x $NAME > $DAEMON_PIDFILE
fi
echo
}
stop() {
echo -n $"Shutting down ${NAME}: "
killproc $NAME
RETVAL=$?
[ $RETVAL -eq 0 ] && /bin/rm -f $DAEMON_LOCKFILE $DAEMON_PIDFILE
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status $NAME
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|status}" >&2
exit 3
;;
esac
Something important for converting Centos to a real OS, is connecting it to a real repository. I found the default repository has nothing in it, so yum never finds any useful packages.
Code: Select all
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Once you have connected to the real world, you can start to gear-up with real software.
yum update -y (this will install about 100MB of updates, and make you feel like you have done something. Surprisingly, you have.)
yum install the following :
libevent-devel
nano
intltool
curl
curl-devel
gcc
gcc-c++
m4
make
automake
libtool
gettext
openssl-devel
pkgconfig
Prior to the make, the environment has to be told where pkgconfig is. pkgconfig ends up in
/usr/lib/pkgconfig for Centos; different places in other distribs
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
create a source directory for Transmission :
mkdir /usr/src/transmission, go there :
cd /usr/src/trans*
get a decent version of Transmission
Code: Select all
wget http://download.m0k.org/transmission/files/transmission-2.13.tar.bz2
extract it, change to it, then hopefully make it:
tar xvjf transmission-2.13.tar.bz2
cd transmission-2.13
./configure -q && make -s
make install
Starting it up. The daemon script will start Transmission as user "transmission". This user needs a /home so that transmission can work in it. No password needs to be set.
adduser transmission
Put the script I supplied up top into a file :
/etc/init.d/transmission-daemon, using nano editor. Make sure the nano SSH window is very wide before pasting into it, or lines will be cut.
make sure the script is executable:
chmod +x transmission-daemon
Start and stop the service to create the Transmission settings file
settings.json
service transmission-daemon start
service transmission-daemon stop
Go to the transmission config directory
cd /ho*/tr*/.c*/t*
edit the file settings.json (
nano se* )
mess with the following values : (at the very least)
"rpc-authentication-required": true,
"rpc-enabled": true,
"rpc-password": "mypassword",
"rpc-username": "mysuperlogin",
"rpc-whitelist-enabled": false,
Start the service again, and check if it's working on your server on port :9091
If it's not working, I don't know what the hell's wrong. honestly
