Setting Up MythTV in Debian 8 (or Armbian Jessie)

  • Boot Debian 8 Network Install CD (or Armbian Jessie image. If running Armbian with a USB harddrive, now would be a good time to run ‘nand-sata-install’ to boot off the HDD.)
  • Select “Install”.
  • Create “myth” user.
  • Choose separate “home” partition.
  • When prompted for software packages to install, unselect everything except “SSH Server” and “Standard System Utilities”.
  • Log in as “root” and run “apt-get install sudo”.  Then add “myth    ALL=(ALL:ALL) ALL” to /etc/sudoers & log out.
  • Log in as “myth” and add the following to /etc/apt/sources.list:
    • #deb-multimedia
    • deb http://deb-multimedia.org/ jessie main non-free
  • Add the following to /etc/apt/sources.list.d/webmin.list:
    • deb http://download.webmin.com/download/repository sarge contrib
  • Create the following directories:
    • mkdir /home/myth/recordings
    • chmod -R 777 /home/myth/recordings
    • mkdir /home/myth/recordings/banners
    • mkdir /home/myth/recordings/fanart
    • mkdir /home/myth/recordings/coverart
  • Run the following commands:
    • wget http://www.webmin.com/jcameron-key.asc
    • sudo apt-key add jcameron-key.asc
    • sudo apt-get update
    • sudo apt-get install deb-multimedia-keyring
    • sudo apt-get update
    • sudo apt-get upgrade
    • sudo apt-get install xauth webmin

      (Set Time Zone in Webmin. Time server is pool.ntp.org.)
    • sudo apt-get install mythtv mythweb
    • sudo service ntp start
    • wget https://github.com/MythTV/mythtv/raw/master/mythtv/programs/scripts/database/mythconverg_restore.pl
    • chmod a+x mythconverg_restore.pl
      (Use Webmin to copy MythTV database backup to root folder)
    • ./mythconverg_restore.pl –drop_database –create_database –directory /home/myth –filename mythconverg-1317-20170223222314.sql.gz
  • Edit /etc/php5/apache2/php.ini to fix a bug in mythweb:
    • max_input_vars = 100000
  • Add the IP address of the computer to /etc/mysql/my.cnf:
    • bind-address = 10.0.1.10
  • Restart Apache and MySQL. Also, start Myth Backend and run mythtv-setup from a remote computer:
    • sudo service apache2 restart
    • sudo service mysql restart
    • sudo service mythtv-backend start
    • (from remote computer) ssh myth@10.0.1.10 -X
    • (from remote computer) sudo nano /etc/mythtv/config.xml (copy database password)
    • (from remote computer) mythtv-setup (change the IP address to the IP address running MythTV and paste the database password).  You should now be able to finish setting up MythTV.
    • mythmetadatalookup –refresh-all-rules
    • mythmetadatalookup –refresh-all
    • mythmetadatalookup –refresh-all-artwork