How to install MythTV
Original Source: http://www.mythtv.org/wiki/User_Manual:Initial_Installation
In this guide we will discuss how to install MythTV from source into a fresh 'full' version of Salix and configure it.
The following packages must be installed; yasm, lame, mysql & qt.
The MySQL server must be configured and running, refer to the wiki page for detailed instructions.
For the other packages, they can all be installed with the following:
su slapt-get -u slapt-get -i yasm lame qt
Note: As of MythTV version 0.22, it is built using Qt4. In order to compile from source, you need the program qmake. At the time of
writting, qmake is only available within other packages, the smallest being the Qt developer package used above (qt).
There are many more 'dependencies' listed on the source site, however these are not essential for use in Salix
Installing MythTV from Source
Get the latest source code of MythTV. It is recommend to use stable code 0-22-fixes, found here:
It can be downloaded with the following commands (mythtv is compulsory, the others are optional);
cd ~/Download/ su svn co http://svn.mythtv.org/svn/branches/release-0-22-fixes/mythtv svn co http://svn.mythtv.org/svn/branches/release-0-22-fixes/mythplugins svn co http://svn.mythtv.org/svn/branches/release-0-22-fixes/myththemes
The source code will be downloaded into folders within your home/Download directory.
Within each folder, configure and build each component (example for mythtv folder):
cd ~/Download/mythtv/ ./configure make su make install
For mythplugins, if you don't want some modules you might want to disable them (run "./configure --help" in each directory to see the options you can set for the build). For example: ./configure --disable-mythgame --disable-mythnetflix
If you want to be able to easily uninstall later, for example to update to new set of fixes, use "checkinstall" rather than "make install". "checkinstall" identifies all files installed by a "make install", creates a Slackware package with those files and adds it to the installed packages database, allowing for easy package removal or distribution. "checkinstall" will prompt for a package description, and then you must supply a version number by following the prompts."checkinstall" is not the best method to use, refer this thread http://www.salixos.org/forum/viewtopic.php?f=30&t=632
MythTV - Configure User
To run MythTV as its own user (so the backend doesnt run as root), create a new user:
su useradd mythtv
MythTV - Configure Database Connections
You have to create a file for mythtv that lists the databse connections to use:
su mkdir /home/mthtv/ mkdir /home/mthtv/.mythtv/ mousepad /home/mthtv/.mythtv/mysql.txt
Fill the text file with the following;
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 # # # 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=yes # # # 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'
MySQL - Configure Database for MythTV
You have to create a database and let the user set above access it.
mysql -u root -p CREATE DATABASE mythconverg; CREATE USER 'mythtv'@'localhost' IDENTIFIED BY 'mythtv'; GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost'; CREATE USER 'mythtv'@'%' IDENTIFIED BY 'mythtv'; GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'%'; exit
To check the privileges for each MySQL accounts (whilst at mysql> prompt):
SHOW GRANTS FOR 'mythtv'@'%';
MythTV - Start
First you need to run MythTV's setup program, which will configure the database etc.
Once you have run the setup, you can start the back-end. This will also automatically upgrade your previous mythconverg database schema to the latest version.
If mythbackend is running OK, you can start the front-end.