Here is my method for setting up MythTV on Debian 7 (Wheezy). I chose Debian as I found it the most stable Linux distribution and also allowed for a very minimal installation. This is a backend only setup as I use XBMC as the frontend on another PC.
Note: The commands below are run as the root user unless specified.
- Install Debian. I used the network install ISO, set up on a USB stick. During installation I did not choose to install any packages other than SSH.
- Login via SSH. I use PuTTY on my Windows machine. In order to get mythtv-setup to work, you will need to install an X Windows server. I use Xming.
- In PuTTY, enable X11 forwarding. Enter localhost:0 for the X display location. Make sure Xming is running before connecting.
- Update /etc/apt/sources.list. We need to add the repository at deb-multimedia.org, so MythTV can be installed.
deb http://www.deb-multimedia.org wheezy main non-free deb http://www.deb-multimedia.org wheezy-backports main
- Add non-free to the existing sources as well. This was required to download the firmware for the Sony PlayTV tuner I’m using.
- Run the following to install the deb-multimedia package source.
apt-get update apt-get install deb-multimedia-keyring apt-get update
- Here I’m installing the firmware for the tuner, as well as ntp client and the X Windows Server.
apt-get install firmware-linux-nonfree xorg ntp
- Install MythTV. We need to install from the Wheezy-Backports repository as the stable one does not have the latest version.
apt-get -t wheezy-backports install mythtv mythweb
- I open access to Apache for access to MythWeb on the local subnet. Edit /etc/mythtv/mythweb.conf.
Allow from <Subnet>/24
Where is your LAN IPv4 network address.
- Restart the Apache server for the above change to take effect.
- Create MythTV storage directories. I have a drive mounted to /mnt/storage, and create a directory here called mythtv. Under this I create two directories, one for recorded TV, the other for the live TV buffer. I then give the mythtv user read and write permission on the directories.
cd /mnt/storage mkdir mythtv mkdir mythtv/recordedtv mkdir mythtv/livetv chown mythtv:mythtv recordedtv/ chown mythtv:mythtv livetv/ chmod 755 recordedtv/ chmod 755 livetv/
- Run mythtv-setup as your non-root user. Refer to the MythTV Wiki for setup help.
- Make sure mythtv-backend is running. You can start the backend like so.
- The MythTV backend should now be ready.