Difference between revisions of "Installing MythTV on Debian"
m (Up to date with v35) |
(→Dependencies: - install mariadb-client-compat for mysql_tzinfo_to_sql) |
||
(One intermediate revision by the same user not shown) | |||
Line 22: | Line 22: | ||
./mythtv.yml --limit=localhost --extra-vars='{"venv_active":true}'<br> | ./mythtv.yml --limit=localhost --extra-vars='{"venv_active":true}'<br> | ||
export VIRTUAL_ENV=/home/whu/.virtualenvs/mythtv <b># actual path with be provided by command above</b> | export VIRTUAL_ENV=/home/whu/.virtualenvs/mythtv <b># actual path with be provided by command above</b> | ||
+ | </code> | ||
+ | |||
+ | As of v35, MariaDB is installed by default, but the client compatibility package is not. This will cause one of the configuration steps to fail. For now, just install manually: | ||
+ | |||
+ | <code> | ||
+ | mariadb-client-compat | ||
</code> | </code> | ||
Line 98: | Line 104: | ||
* Configure a weekly backup of the database using cron, if applicable. | * Configure a weekly backup of the database using cron, if applicable. | ||
* Create desktop entries to launch MythTV from various desktop menus. | * Create desktop entries to launch MythTV from various desktop menus. | ||
− | + | * Install rsyslog configuration (but does not install rsyslog) | |
+ | |||
Once the software is installed, proceed to [[Post Installation Tasks]]. | Once the software is installed, proceed to [[Post Installation Tasks]]. | ||
[[Category:Software Installation|1900]] [[Category:Distribution_Specific_Install_Guides]] | [[Category:Software Installation|1900]] [[Category:Distribution_Specific_Install_Guides]] |
Latest revision as of 13:49, 13 September 2025
This page is up-to-date as of MythTV version 35.0, the current release is 35.0
Contents
Introduction
This page will describe how to build MythTV from source and then install using the package manager.
See Packages to install pre-built packages.
Build your own Packages
Dependencies
First install the dependencies by following the instructions at https://github.com/MythTV/ansible/blob/master/README.md, for example
sudo apt update
sudo apt upgrade
sudo apt install git ansible
mkdir -p ~/build
cd ~/build
git clone http://github.com/mythtv/ansible
cd ansible
./mythtv.yml --limit=localhost --extra-vars='{"venv_active":true}'
export VIRTUAL_ENV=/home/whu/.virtualenvs/mythtv # actual path with be provided by command above
As of v35, MariaDB is installed by default, but the client compatibility package is not. This will cause one of the configuration steps to fail. For now, just install manually:
mariadb-client-compat
Getting and compiling the source code
Note: The following example builds and installs the Debian packages under the user's home directory. Once the packages are built, the user _apt must have read access to the location of the packages, which includes execute access for the entire path. It is likely the user's home directory will not allow execute access to others, and therefore apt will not be able to access the packages unless permissions are changed or the packages are moved (or built somewhere that _apt can access).
Step | Command to run |
---|---|
create a directory | cd
|
clone the git mythtv packages | cd ~/build
|
Start the build. This script checks out the latest version of fixes/35 from git and builds the packages. | ./build-debs.sh fixes/35
|
In general, you should probably choose the stable version. If you don't mind if your MythTV system is non-functional or has serious bugs that may prevent proper operation/result in lost recordings or inability to play back recordings, you may try using the unstable, development code by replacing the above fixes/35
with master
. If using unstable, development code, you should follow the mythtv-commits and mythtv-dev mailing lists.
After about 30 minutes the build will complete and there will be a lot of .deb files in the current directory.
Choose Your Package
Decide what type of installation you need.
If this is your first system and you are using a single box for recording and watching, you need a complete frontend, backend and database. Choose the mythtv package.
If you are adding a Frontend to an existing system, to allow for watching on another TV or computer system, choose the mythtv-frontend package.
If you are adding a Slave Backend use mythtv-backend. This is an advanced usage that few people will need.
There are packages for installing a complete system, or for installing parts of a multi server system.
mythtv | Complete frontend and backend system with database. |
mythtv-frontend | Frontend that connects to a separate backend. |
mythtv-backend | Backend without database. This is either a master backend where there is a separate database server or a slave backend. |
mythtv-backend-master | Master Backend with database. |
mythtv-database | MythTV database only. Advanced use where there is a separate database server from backend. You will need to also install mysql server when using this. |
mythplugins | Plugins for a frontend system. Install this after installing your main package from earlier in this list. |
mythweb (prior to v35) | MythWeb provided a frontend for scheduling and managing recordings from a web browser. Mythweb has been replaced by the web application at http://your_backend:6544. |
Install Software
Install one of the newly created packages, as follows:
dpkg-scanpackages -m . | gzip -c > Packages.gz
echo "deb [trusted=yes] file:/`pwd` ./" | sudo tee /etc/apt/sources.list.d/mythtv.list
sudo apt-get update
sudo apt-get install packagename
Note: The procedures in this article have created packages as a non-root user, and configured the system to trust packages created by that user which reside in a certain directory. This is quite insecure, as should the user account be compromised, an attacker could put arbitrary packages in the directory and have them installed and executed with root privileges. /etc/apt/sources.list.d/mythtv.list should be removed once the packages are installed.
The packages do the following:
- Create the user mythtv, if necessary.
- Install MythTV software and all prerequisites.
- Install MariaDB database software, if necessary.
- Create a MariaDB database user for MythTV, if necessary.
- Set up the MythTV configuration file.
- Create the mythtv-backend service for systemd to automatically run the backend at system startup time, if applicable.
- Configure a weekly backup of the database using cron, if applicable.
- Create desktop entries to launch MythTV from various desktop menus.
- Install rsyslog configuration (but does not install rsyslog)
Once the software is installed, proceed to Post Installation Tasks.