EmuMannen Wrote:I just switched to Squeeze. Where did you install tvheadend from (deb or repos, if repo what repo, source or binary)?
I'm interested in any details (instructions or experiences on Debian (preferably Squeeze. I'm about to turn my new Fusion based media server into a combined front- and back-end.
I build from git since the repos are ubuntu. You don't want to mix Debian and Ubuntu.
Here is how I did it on 32 as well as 64 bits Debian Squeeze.
OK, this assumes that you have a nvidia graphic card installed.
First you have to get your repos right, meaning enabling contrib, non-free and add multimedia.
My sources.list looks like this:
Code:
# deb http://mirrors.nl.kernel.org/debian/ squeeze main
deb http://mirrors.nl.kernel.org/debian/ squeeze main contrib non-free
deb-src http://mirrors.nl.kernel.org/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free
# squeeze-updates, previously known as 'volatile'
deb http://mirrors.nl.kernel.org/debian/ squeeze-updates main
deb-src http://mirrors.nl.kernel.org/debian/ squeeze-updates main
deb http://www.debian-multimedia.org squeeze main non-free
deb-src http://www.debian-multimedia.org squeeze main non-free
Don't forget to install
debian-multimedia-keyring
Code:
apt-get update && apt-get --yes --quiet --allow-unauthenticated install debian-multimedia-keyring
Then make sure your dependencies are met and install your nvidia driver:
(all as root)
Code:
apt-get update && apt-get dist-upgrade -y
apt-get build-dep xbmc -y
apt-get install -y nvidia-kernel-dkms nvidia-settings nvidia-xconfig && nvidia-xconfig
apt-get install autoconf automake autotools-dev bison cvs fp-compiler fp-units-rtl g++-4.3 gdc gdc-4.3 git-core libboost-date-time1.42-dev libboost-serialization1.42-dev libboost-serialization1.42.0 libboost-thread-dev libboost-thread1.42-dev libltdl-dev libmpeg3-1 libmpeg3-dev libphobos-4.3-dev libsdl-gfx1.2-4 libsdl-gfx1.2-dev libsqlite0 libssh-dev libstdc++6-4.3-dev libtool libyajl-dev libyajl1 pmount python-dev python-sqlite yasm gdb
Now you are ready to compile xbmc and tvheadend from git.
Do:
Code:
cd /usr/src
git clone -b Eden-pvr-cec git://github.com/Pulse-Eight/xbmc.git
cd xbmc
git reset --hard HEAD
./bootstrap && ./configure --prefix=/usr && make && make install
That was xbmc. Now for tvheadend, if you want that too, do this:
Code:
cd /usr/src
git clone git://github.com/opdenkamp/tvheadend.git
cd tvheadend
git reset --hard HEAD
./configure --release
make
adduser --system --group hts
cp -f /usr/src/tvheadend/build.Linux/tvheadend /usr/bin/tvheadend
Now you want to autostart tvheadend.
First do
Code:
nano /etc/init.d/tvheadend
Then copy and past this into /etc/init.d/tvheadend
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: tvheadend
# Required-Start: $local_fs $remote_fs udev
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
# Author: Andreas Öman
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="HTS Tvheadend"
NAME=tvheadend
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-f -u hts -g video"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
udevadm settle
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
:
then do:
Code:
chmod 755 /etc/init.d/tvheadend
update-rc.d tvheadend defaults 21 21
Restart your machine and you are done.
Enjoy!
Bas.
PS:
Should you encounter problems accessing the webui of tvheadend, have a look at
this.