Difference between revisions of "Ubuntu Intrepid Ibex Installation"
(→Something didnt work - what next?) |
m (moved Ubuntu-8.10 Source Install to Ubuntu Intrepid Ibex Installation: Consistency) |
||
(11 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
{| style="border: solid 1px; border-color:lightgray; margin: oem; background-color: #ffff99;" width=100% cellpadding=5 cellspacing=5 | {| style="border: solid 1px; border-color:lightgray; margin: oem; background-color: #ffff99;" width=100% cellpadding=5 cellspacing=5 | ||
| align=center valign=top | See [[Ubuntu Installation Guides]] for installing on other Ubuntu versions. | | align=center valign=top | See [[Ubuntu Installation Guides]] for installing on other Ubuntu versions. | ||
Line 9: | Line 9: | ||
== Prerequesites == | == Prerequesites == | ||
− | |||
+ | First install required packages (split in two parts because Terminal doesn't like pasting long lines): | ||
<code><pre> | <code><pre> | ||
sudo apt-get install build-essential liblircclient-dev libasound2-dev libdts-dev libdvdnav-dev \ | sudo apt-get install build-essential liblircclient-dev libasound2-dev libdts-dev libdvdnav-dev \ | ||
libxv-dev libxxf86vm-dev transcode libmp3lame-dev subversion qt4-dev-tools libqt4-dev libsamplerate0 \ | libxv-dev libxxf86vm-dev transcode libmp3lame-dev subversion qt4-dev-tools libqt4-dev libsamplerate0 \ | ||
− | libxvidcore4 liba52-0.7.4-dev libfame-dev libcdio-dev msttcorefonts libasound2-doc libmad0-dev | + | libxvidcore4 liba52-0.7.4-dev libfame-dev libcdio-dev msttcorefonts libasound2-doc libmad0-dev |
− | libid3tag0-dev libvorbis-dev libflac-dev libcdaudio-dev libcdparanoia0-dev fftw3-dev libfaad-dev | + | </pre></code> |
− | + | ||
+ | <code><pre> | ||
+ | sudo apt-get install libid3tag0-dev libvorbis-dev libflac-dev libcdaudio-dev libcdparanoia0-dev \ | ||
+ | fftw3-dev libfaad-dev libsmpeg-dev libmp4v2-dev libtag1-dev mysql-server libvisual-0.4-dev libexif-dev | ||
</pre></code> | </pre></code> | ||
Line 41: | Line 44: | ||
./configure | ./configure | ||
make | make | ||
− | make install | + | sudo make install |
</pre></code> | </pre></code> | ||
− | if you dont want some modules you might want to disable then in mythplugins (ie. | + | if you dont want some modules you might want to disable then in mythplugins (ie. flix support) |
<code><pre> | <code><pre> | ||
− | ./configure | + | ./configure --disable-mythnetflix |
</pre></code> | </pre></code> | ||
− | == optional tasks == | + | == optional/post install tasks == |
=== creating the mythtv user === | === creating the mythtv user === | ||
to run mythtv as its own user I created one (so the backend doesnt run as root) | to run mythtv as its own user I created one (so the backend doesnt run as root) | ||
Line 56: | Line 59: | ||
</pre></code> | </pre></code> | ||
+ | === mythtv database setup === | ||
+ | |||
+ | You have to create a file for mythtv for databse connections <code>~mythtv/.mythtv/mysql.txt</code> | ||
+ | <code><pre> | ||
+ | DBHostName=localhost | ||
+ | |||
+ | # By default, Myth tries to ping the DB host to see if it exists. | ||
+ | # If your DB host or network doesn't accept pings, set this to no: | ||
+ | # | ||
+ | DBHostPing=no | ||
+ | |||
+ | DBHostName=localhost | ||
+ | DBUserName=mythtv | ||
+ | DBName=mythconverg | ||
+ | DBPassword=mythtv | ||
+ | |||
+ | # Set the following if you want to use something other than this | ||
+ | # machine's real hostname for identifying settings in the database. | ||
+ | # This is useful if your hostname changes often, as otherwise you | ||
+ | # will need to reconfigure mythtv (or futz with the DB) every time. | ||
+ | # TWO HOSTS MUST NOT USE THE SAME VALUE | ||
+ | # | ||
+ | LocalHostName=MYCOOLMYTHTVHOST | ||
+ | |||
+ | # If you want your frontend to be able to wake your MySQL server | ||
+ | # using WakeOnLan, have a look at the following settings: | ||
+ | # | ||
+ | # | ||
+ | # The time the frontend waits (in seconds) between reconnect tries. | ||
+ | # This should be the rough time your MySQL server needs for startup | ||
+ | # | ||
+ | #WOLsqlReconnectWaitTime=0 | ||
+ | # | ||
+ | # | ||
+ | # This is the number of retries to wake the MySQL server | ||
+ | # until the frontend gives up | ||
+ | # | ||
+ | #WOLsqlConnectRetry=5 | ||
+ | # | ||
+ | # | ||
+ | # This is the command executed to wake your MySQL server. | ||
+ | # | ||
+ | #WOLsqlCommand=echo 'WOLsqlServerCommand not set' | ||
+ | |||
+ | </pre></code> | ||
+ | |||
+ | Then you have to create a database and let the user set above access it | ||
+ | <pre> | ||
+ | mysql -u root -p | ||
+ | create database mythconverg; | ||
+ | set password for 'mythtv'@'%' = password('mythtv'); | ||
+ | set password for 'mythtv'@'localhost' = password('mythtv'); | ||
+ | flush privileges; | ||
+ | </pre> | ||
+ | |||
+ | Run <code>mythbackend</code> to test. This will automatically upgrade your previous mythconverg database schema to the latest version: | ||
+ | <pre>mythbackend</pre> | ||
+ | If mythbackend is running OK, test mythfrontend: | ||
+ | <pre>mythfrontend</pre> | ||
=== running mythtv on start === | === running mythtv on start === | ||
Line 220: | Line 282: | ||
after that restart and have fun: | after that restart and have fun: | ||
<code><pre> | <code><pre> | ||
− | sudo /etc/init.d/ | + | sudo /etc/init.d/apache2 restart |
</pre></code> | </pre></code> | ||
Line 228: | Line 290: | ||
[[Category:Distribution_Specific_Install_Guides]] | [[Category:Distribution_Specific_Install_Guides]] | ||
[[Category:Ubuntu]] | [[Category:Ubuntu]] | ||
+ | |||
+ | === Pulse Audio is running!!! === | ||
+ | |||
+ | If you get this error when running mythfrontend: | ||
+ | |||
+ | <code><pre> | ||
+ | ERROR: ***Pulse Audio is running!!!!*** | ||
+ | ERROR: But MythTV has not been compiled with Pulse Audio disabling support. EXITING! | ||
+ | </pre></code> | ||
+ | |||
+ | You need to install the pulse dev package: | ||
+ | |||
+ | <code><pre> | ||
+ | $sudo apt-get install libpulse-dev | ||
+ | </pre></code> | ||
+ | |||
+ | Then recompile mythtv. This time when you run ./configure the Pulse audio support will be indicated. |
Latest revision as of 13:18, 3 November 2009
See Ubuntu Installation Guides for installing on other Ubuntu versions. |
This will allow you to build and install the latest build on ubuntu 8.10.
I personally suggest installing xubuntu over ubuntu - it boots just that much faster - but thats a personal opinion.
Contents
Prerequesites
First install required packages (split in two parts because Terminal doesn't like pasting long lines):
sudo apt-get install build-essential liblircclient-dev libasound2-dev libdts-dev libdvdnav-dev \
libxv-dev libxxf86vm-dev transcode libmp3lame-dev subversion qt4-dev-tools libqt4-dev libsamplerate0 \
libxvidcore4 liba52-0.7.4-dev libfame-dev libcdio-dev msttcorefonts libasound2-doc libmad0-dev
sudo apt-get install libid3tag0-dev libvorbis-dev libflac-dev libcdaudio-dev libcdparanoia0-dev \
fftw3-dev libfaad-dev libsmpeg-dev libmp4v2-dev libtag1-dev mysql-server libvisual-0.4-dev libexif-dev
To install css support use:
/usr/share/doc/libdvdread3/install-css.sh
If you want mythweb as well - you need
sudo apt-get install apache2 php5 libapache2-mod-php5 php5-mysql
How do I get and compile the source code?
svn co http://svn.mythtv.org/svn/trunk/mythtv
svn co http://svn.mythtv.org/svn/trunk/mythplugins
svn co http://svn.mythtv.org/svn/trunk/myththemes
then simply go in each directory and run:
./configure
make
sudo make install
if you dont want some modules you might want to disable then in mythplugins (ie. flix support)
./configure --disable-mythnetflix
optional/post install tasks
creating the mythtv user
to run mythtv as its own user I created one (so the backend doesnt run as root)
sudo useradd mythtv
mythtv database setup
You have to create a file for mythtv for databse connections ~mythtv/.mythtv/mysql.txt
DBHostName=localhost
# By default, Myth tries to ping the DB host to see if it exists.
# If your DB host or network doesn't accept pings, set this to no:
#
DBHostPing=no
DBHostName=localhost
DBUserName=mythtv
DBName=mythconverg
DBPassword=mythtv
# Set the following if you want to use something other than this
# machine's real hostname for identifying settings in the database.
# This is useful if your hostname changes often, as otherwise you
# will need to reconfigure mythtv (or futz with the DB) every time.
# TWO HOSTS MUST NOT USE THE SAME VALUE
#
LocalHostName=MYCOOLMYTHTVHOST
# If you want your frontend to be able to wake your MySQL server
# using WakeOnLan, have a look at the following settings:
#
#
# The time the frontend waits (in seconds) between reconnect tries.
# This should be the rough time your MySQL server needs for startup
#
#WOLsqlReconnectWaitTime=0
#
#
# This is the number of retries to wake the MySQL server
# until the frontend gives up
#
#WOLsqlConnectRetry=5
#
#
# This is the command executed to wake your MySQL server.
#
#WOLsqlCommand=echo 'WOLsqlServerCommand not set'
Then you have to create a database and let the user set above access it
mysql -u root -p create database mythconverg; set password for 'mythtv'@'%' = password('mythtv'); set password for 'mythtv'@'localhost' = password('mythtv'); flush privileges;
Run mythbackend
to test. This will automatically upgrade your previous mythconverg database schema to the latest version:
mythbackend
If mythbackend is running OK, test mythfrontend:
mythfrontend
running mythtv on start
I use a slightly modified script from mythbuntu for that. Just copy the content to /etc/init.d/mythtv-backend
- chmod it with sudo chmod 755 /etc/init.d/mythtv-backend
To start every time you still have to add it to the rc:
update-rc.d mythtv-backend defaults
Also create a log directory for mythtv:
sudo mkdir /var/log/mythtv
sudo chown mythtv:mythtv /var/log/mythtv
#! /bin/sh
### BEGIN INIT INFO
# Provides: mythtv-backend
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop the MythTV server.
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/mythbackend
NAME="mythbackend"
DESC="MythTV server"
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
set -e
prime_firewire()
{
if [ "$ENABLE_FIREWIRE" = "TRUE" ]; then
log_daemon_msg "Priming Firewire "
su - $USER -c "/usr/bin/mythprime"
log_end_msg $?
fi
}
USER=mythtv
USER_HOME=$(grep ^$USER /etc/passwd | awk -F : '{print $6}')
RUNDIR=/var/run/mythtv
ARGS="--daemon --logfile /var/log/mythtv/mythbackend.log --pidfile $RUNDIR/$NAME.pid"
EXTRA_ARGS=""
NICE=0
if [ -f /etc/default/mythtv-backend ]; then
. /etc/default/mythtv-backend
fi
ARGS="$ARGS $EXTRA_ARGS"
mkdir -p $RUNDIR
chown -R $USER $RUNDIR
unset DISPLAY
unset SESSION_MANAGER
#create a symbolic link for mysql.txt so it can't be overwritten
mkdir -p $USER_HOME/.mythtv
chown -R $USER $USER_HOME/.mythtv
if [ ! -e $USER_HOME/.mythtv/mysql.txt ]; then
ln -s /etc/mythtv/mysql.txt $USER_HOME/.mythtv/mysql.txt
fi
case "$1" in
start)
if [ -e $RUNDIR/$NAME.pid ]; then
PIDDIR=/proc/$(cat $RUNDIR/$NAME.pid)
if [ -d ${RUNDIR} -a "$(readlink -f ${RUNDIR}/exe)" = "${DAEMON}" ]; then
log_success_msg "$DESC already started; use restart instead."
exit 1
else
log_success_msg "Removing stale PID file $RUNDIR/$NAME"
rm -f $RUNDIR/$NAME.pid
fi
fi
prime_firewire
log_daemon_msg "Starting $DESC: $NAME "
start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC: $NAME "
start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --exec $DAEMON -- $ARGS
log_end_msg $?
test -e $RUNDIR/$NAME.pid && rm $RUNDIR/$NAME.pid
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC: $NAME "
start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --exec $DAEMON -- $ARGS
sleep 3
prime_firewire
start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
--chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
log_end_msg $?
;;
status)
# We want to maintain backward compatibility with Hardy,
# so we're not going to use status_of_proc()
pidofproc -p $RUNDIR/$NAME.pid $DAEMON >/dev/null && status=0 || status=$?
if [ $status -eq 0 ]; then
log_success_msg "$NAME is running"
else
log_failure_msg "$NAME is not running"
fi
exit $status
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 2
;;
esac
exit 0
autostart frontend in xubuntu
Create a file in ~/.config/autostart/mythfrontend.desktop
:
[Desktop Entry]
Encoding=UTF-8
Version=0.9.9
Type=Application
Name=MythTV Frontend
Comment=
Exec=mythfrontend
StartupNotify=false
Terminal=false
Hidden=false
mythweb
For mythweb I just created a symlink to the checked out mythweb in the /var/www
:
sudo ln -s /usr/local/src/mythtv/mythplugins/mythweb /var/www/mythweb
# make sure data is writeable
sudo chown -R www-data /usr/local/src/mythtv/mythplugins/mythweb/data
you have to enable mod-rewrite
sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
and copy/edit the apache config
sudo cp mythplugins/mythweb/mythweb.conf.apache /etc/apache2/sites-available/mythweb.conf
sudo ln -s /etc/apache2/sites-available/mythweb.conf /etc/apache2/sites-enabled/mythweb.conf
after that restart and have fun:
sudo /etc/init.d/apache2 restart
Something didnt work - what next?
With this you should be able to compile and install mythtv on a new (x)ubunut box. Most problems come with mythtv setup (config files, database initialisation etc.) Please refer to the other wiki pages/documentation for info on that
Pulse Audio is running!!!
If you get this error when running mythfrontend:
ERROR: ***Pulse Audio is running!!!!***
ERROR: But MythTV has not been compiled with Pulse Audio disabling support. EXITING!
You need to install the pulse dev package:
$sudo apt-get install libpulse-dev
Then recompile mythtv. This time when you run ./configure the Pulse audio support will be indicated.