Difference between revisions of "Installing MythTV on RHEL/CentOS"

From MythTV Official Wiki
Jump to: navigation, search
m (RHEL Installation moved to Installing MythTV on RHEL/CentOS: Moving to allign name with other dist. specific how-tos)
(update Link to install guide)
(46 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{outdated}}
+
[[Category:Distribution_Specific_Install_Guides]]
 +
This is a collection of information to help set up MythTV on a Red Hat Enterprise Linux (RHEL) or CentOS machine.
  
This is a collection of information to help set up MythTV on a RHEL or CentOS 4.5 or 5.0 machine.
 
  
== Installation Help ==
+
= Scope =
 +
Installing MythTV on RHEL/CentOS is nearly identical to Fedora. Fedora has well updated how-tos, so this guide will note only the differences in installing MythTV on RHEL or CentOS.
  
=== Howto ===
+
= Why choose RHEL/CentOS =
 +
Fedora is one of the most popular and most supported in the Myth community.  One of the major downfalls of Fedora is the life cycle is only ~6 months and packages are only updated for the two most recent releases.  This means to stay on a supported OS you must upgrade or completely redo your Myth box every year.  RHEL/CentOS gives you the advantage of using a OS that is nearly identical to Fedora yet supported for more than six years.
  
Step 1, you need a tuner that will work under your kernel.
+
== Choosing between RHEL or CentOS ==
If you don't already have a tuner that works, beyond the scope of these
+
RHEL is Red Hat's enterprise distribution, generally used for servers that require long life cycles and stability.  Based on the development of Fedora, RHEL is sold with support through Red Hat.  While support is of great value, many users of MythTV may be looking to save money, and rely on the community for support.  This is where CentOS comes in. Since RHEL is based on GPL software, Red Hat must release the source to the entire OS.  The CentOS developers remove the Red Hat logos and trademarks to create CentOS.  CentOS is 100% binary compatible with RHEL, so RPMs for EL work with CentOS.
instructions.
 
  
If your kernel doesn't include the modules that support your card, you
+
[http://www.scientificlinux.org/ Scientific Linux], another 100% RHEL binary compatible distribution, is another option.
should look into the CentOS "plus" kernel.
 
  
 +
= RHEL 5.x =
  
Step 2, get mythtv rpms. For example from ATrpms
+
== Enabling DVB ==
  
mythtv-backend-0.20.2-168.el4.i386.rpm
+
As RHEL is designed for being an enterprise class operating system, most of the DVB and v4l functionality is left out of the kernel to keep it minimalistic, free of clutter and to eliminate any possible issues with newly introduced modulesThe CentOSPlus kernel includes all v4l and DVB modules needed to work with most established tuner cardsTo install:
  mythtv-docs-0.20.2-168.el4.i386.rpm
 
mythtv-frontend-0.20.2-168.el4.i386.rpm
 
  mythtv-setup-0.20.2-168.el4.i386.rpm
 
mythtv-themes-0.20.2-168.el4.i386.rpm
 
and various libraries in next step
 
  
Step 3, resolve all dependencies.
+
<pre>su - 
Make sure you've got all the MySQL stuff, which would include something like the
+
yum update kernel --enablerepo=centosplus</pre>
following:
 
  
  mysql-4.1.20-2.RHEL4.1.i386.rpm
+
Enabling the CentOSPlus repo by default is strongly discouraged as there is a high likelihood of one of its packages conflicting with a base distribution package or serviceEnsure the CentOSPlus kernel is loaded on boot by running either <tt>system-config-boot</tt> from the GNOME System->Administration menu, or hand editing <tt>/boot/grub/grub.conf</tt>After installation, there should be no need to upgrade the kernel unless a critical flaw is found. If it aint broke, don't fix it!
  mysqlclient10-3.23.58-4.RHEL4.1.i386.rpm
 
mysql-server-4.1.20-2.RHEL4.1.i386.rpm
 
  perl-DBD-MySQL-2.9004-3.1.i386.rpm
 
perl-DBI-1.58-2.el4.rf.i386.rpm
 
qt-MySQL-3.3.3-13.RHEL4.i386.rpm
 
  
The final may be the only one you didn't already have.
 
  
For all the other dependencies, stuff like libmyth, libmythtv, etc., if yum
+
DVB should now be available.
didn't sort it out for you, it may be a bit of a chore.
 
  
 +
== Configuring Yum Repo's ==
  
Step 4, start and configure database
+
=== QT 4.5 ===
  
on initial start up, it will say something like the following. Take heed.
+
Starting with MythTV's subversion changeset 25232, compiling MythTV requires Qt v4.5.  Qt 4.5 RPMs for RHEL5/CentOS5 are available from pramberger.at.  The following required packages can be
 +
found from various mirrors around the net or by going to the main pramberger.at site directly.  Instructions for using the pramberger.at repository are available at:
 +
http://www.pramberger.at/peter/services/repository/
  
  Initializing MySQL databaseInstalling all prepared tables
+
qt45-4.5.2-1.el5.pp.i386.rpm
  Fill help tables
+
 
 +
qt45-config-4.5.2-1.el5.pp.i386.rpm
 +
 
 +
qt45-devel-4.5.2-1.el5.pp.i386.rpm
 +
 
 +
qt45-mysql-4.5.2-1.el5.pp.i386.rpm
 +
 
 +
=== PHP 5.3 ===
 +
 
 +
If you are using [[Mythweb]], you will also need to install PHP 5.3. Remi Collet has made them available at http://rpms.famillecollet.com/ as referenced on the [http://wiki.centos.org/AdditionalResources/Repositories CentOS repository page]
 +
 
 +
i386: http://rpms.famillecollet.com/enterprise/5/remi/i386/repoview/php.html
 +
 
 +
x86_64: http://rpms.famillecollet.com/enterprise/5/remi/x86_64/repoview/php.html
 +
 
 +
=== ATRPMS.net ===
 +
 
 +
{{Note box|el5 packages are available for MythTV 0.24.2 and 0.24.3 but not for 0.25+. Check http://dl.atrpms.net/el5-x86_64/atrpms/stable/ for current el5 availability.}}
 +
{{Note box|Axel has stated that 0.25+ will never be available for el5 since it cannot compile for the stock kernel due to library support issues. Other users have said that 0.25+ *can* run on el5 but you have to install a more modern kernel and manually compile and install your own version of MythTV.}}
 +
 
 +
Like Fedora, Axel provides great packages for RHEL/CentOS. 
 +
To install the repo on i386 run:
 +
 
 +
rpm -i http://dl.atrpms.net/el5-i386/atrpms/stable/atrpms-package-config-120-3.el5.i386.rpm
 +
 
 +
For x86-64
 +
 
 +
rpm -i http://dl.atrpms.net/el5-x86_64/atrpms/stable/atrpms-package-config-120-3.el5.x86_64.rpm
 +
 
 +
You will need to enable the testing repo to get the appropriate dependencies.
 +
 
 +
vim /etc/yum.repos.d/atrpms.repo
 +
 
 +
--cut--
 +
#
 +
# requires stable
 +
#
 +
[atrpms-testing]
 +
name=Red Hat Enterprise Linux 5 - x86_64 - ATrpms testing
 +
baseurl=http://dl.atrpms.net/el5-x86_64/atrpms/testing
 +
failovermethod=priority
 +
enabled=1
 +
--cut--
 +
 
 +
Example i386 version of /etc/yum.repos.d/ATrpms.repo
 +
 
 +
[atrpms]
 +
name=EL $releasever - $basearch - ATrpms
 +
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
 +
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
 +
  gpgcheck=1
 +
  enabled=1
 
   
 
   
  To start mysqld at boot time you have to copy support-files/mysql.server
+
  [atrpms-testing]
  to the right place for your system
+
name=EL $releasever - $basearch - ATrpms - ATrpms testing
   
+
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
+
  failovermethod=priority
To do so, start the server, then issue the following commands:
+
  enabled=1
  /usr/bin/mysqladmin -u root password 'new-password'
+
 
  /usr/bin/mysqladmin -u root -h localhost password 'new-password'
+
=== RPM Forge ===
See the manual for more instructions.
+
 
+
Although RPM Forge is not required for MythTV, it provides many packages a home user may want.
  You can start the MySQL daemon with:
+
 
cd /usr ; /usr/bin/mysqld_safe &
+
EL5 i386:
+
 
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
+
  rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
cd sql-bench ; perl run-all-tests
+
 
+
Red Hat Enterprise Linux 5 / x86_64:
Please report any problems with the /usr/bin/mysqlbug script!
+
 
+
  rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
The latest information about MySQL is available on the web at
+
 
  http://www.mysql.com
+
=== EPEL ===
Support MySQL by buying support/licenses at http://shop.mysql.com
+
 
+
EPEL was started because many Fedora contributors wanted to use the Fedora packages they maintain on Red Hat Enterprise Linux (RHEL) and its compatible derivatives.
+
 
Step 6, populate database.
+
To install for both i386 and x86-64
 +
 
 +
  rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
 +
 
 +
== Compiling MythTV 0.24 from source ==
 +
 
 +
On CentOS 5, you can compile MythTV 0.24 from source with some additional steps:
 +
 
 +
# Make sure you have the video4linux-devel, kernel-devel, and kernel-headers packages from ATrpms and CentOS installed
 +
# Add the --dvb-path=/usr/include/v4l line to your configure script to use the video4linux headers
 +
# Create a symbolic link from the kernel sources compile.h to your include directory using:
 +
 
 +
  ln -s /usr/src/kernels/`uname -r`/include/linux/compiler.h /usr/include/linux/compiler.h
  
go to /usr/share/doc/mythtv-docs*/database and run the database setup script
+
There will also be issues with Python because the Python version shipped with CentOS is older than what MythTV requires. This section should be updated with more detailed information on workarounds for that issue.
to set up the initial database. See section 6 of the mythtv howto (there should  
 
be a local copy now), but you will have to do
 
mysql  -u root -p < mc.sql
 
  
  
Step 7, configure mythtv
+
==Continue==
You should be able to run mythtv-setup. If it starts up ok, then you should
+
From this point the differences between Fedora and RHEL/CentOS are extremely Trival. Continue your install from the [[Installing_MythTV_on_Fedora#Fedora_setup|Fedora page]]
now configure everything.
 
  
1 General Config options should be fairly straightforward.
+
= RHEL 6.x =
2 Capture card config should have auto-detected any card you have installed
 
3 Configure a video source, call it videosource if you have no better name
 
4 Configure an input source, this is where you select which video input to
 
the card to use.
 
5 Channel Editor. This is where you scan for TV channels. If you get an
 
error "Failed to open the card" you may want to try manually setting the
 
video source.
 
  
Once you're done configuring, exit the configure utility
+
Installing MythTV on RHEL6 can be done from the ATRPMS Repos. I wrote a guide [http://wordpress.familiemartin.de/2014/05/27/rhel6-linux-family-server/ here].
  
Step 8, start mythbackend, then run either mythtv or mythfrontend
+
You can see which el6 MythTV package versions are currently available here: http://dl.atrpms.net/el6-x86_64/atrpms/stable/
  
Step 9, configure other bells and whistles like schedule grabbing, remote
+
= RHEL 7.x =
control, etc.
 
  
[[Category:HOWTO]]
+
Installing MythTV on RHEL7 (Currently Beta) can be done using the ATRPMS and EPEL repos.  It's trivial, but laborious as all RPMs have to be built manually. It's expected that EPEL and ATRPMS will update their repositories around the release of CentOS 7.
[[Category:RHEL]]
 

Revision as of 09:33, 5 July 2014

This is a collection of information to help set up MythTV on a Red Hat Enterprise Linux (RHEL) or CentOS machine.


Scope

Installing MythTV on RHEL/CentOS is nearly identical to Fedora. Fedora has well updated how-tos, so this guide will note only the differences in installing MythTV on RHEL or CentOS.

Why choose RHEL/CentOS

Fedora is one of the most popular and most supported in the Myth community. One of the major downfalls of Fedora is the life cycle is only ~6 months and packages are only updated for the two most recent releases. This means to stay on a supported OS you must upgrade or completely redo your Myth box every year. RHEL/CentOS gives you the advantage of using a OS that is nearly identical to Fedora yet supported for more than six years.

Choosing between RHEL or CentOS

RHEL is Red Hat's enterprise distribution, generally used for servers that require long life cycles and stability. Based on the development of Fedora, RHEL is sold with support through Red Hat. While support is of great value, many users of MythTV may be looking to save money, and rely on the community for support. This is where CentOS comes in. Since RHEL is based on GPL software, Red Hat must release the source to the entire OS. The CentOS developers remove the Red Hat logos and trademarks to create CentOS. CentOS is 100% binary compatible with RHEL, so RPMs for EL work with CentOS.

Scientific Linux, another 100% RHEL binary compatible distribution, is another option.

RHEL 5.x

Enabling DVB

As RHEL is designed for being an enterprise class operating system, most of the DVB and v4l functionality is left out of the kernel to keep it minimalistic, free of clutter and to eliminate any possible issues with newly introduced modules. The CentOSPlus kernel includes all v4l and DVB modules needed to work with most established tuner cards. To install:

su -  
yum update kernel --enablerepo=centosplus

Enabling the CentOSPlus repo by default is strongly discouraged as there is a high likelihood of one of its packages conflicting with a base distribution package or service. Ensure the CentOSPlus kernel is loaded on boot by running either system-config-boot from the GNOME System->Administration menu, or hand editing /boot/grub/grub.conf. After installation, there should be no need to upgrade the kernel unless a critical flaw is found. If it aint broke, don't fix it!


DVB should now be available.

Configuring Yum Repo's

QT 4.5

Starting with MythTV's subversion changeset 25232, compiling MythTV requires Qt v4.5. Qt 4.5 RPMs for RHEL5/CentOS5 are available from pramberger.at. The following required packages can be found from various mirrors around the net or by going to the main pramberger.at site directly. Instructions for using the pramberger.at repository are available at: http://www.pramberger.at/peter/services/repository/

qt45-4.5.2-1.el5.pp.i386.rpm

qt45-config-4.5.2-1.el5.pp.i386.rpm

qt45-devel-4.5.2-1.el5.pp.i386.rpm

qt45-mysql-4.5.2-1.el5.pp.i386.rpm

PHP 5.3

If you are using Mythweb, you will also need to install PHP 5.3. Remi Collet has made them available at http://rpms.famillecollet.com/ as referenced on the CentOS repository page

i386: http://rpms.famillecollet.com/enterprise/5/remi/i386/repoview/php.html

x86_64: http://rpms.famillecollet.com/enterprise/5/remi/x86_64/repoview/php.html

ATRPMS.net

Important.png Note: el5 packages are available for MythTV 0.24.2 and 0.24.3 but not for 0.25+. Check http://dl.atrpms.net/el5-x86_64/atrpms/stable/ for current el5 availability.

Important.png Note: Axel has stated that 0.25+ will never be available for el5 since it cannot compile for the stock kernel due to library support issues. Other users have said that 0.25+ *can* run on el5 but you have to install a more modern kernel and manually compile and install your own version of MythTV.

Like Fedora, Axel provides great packages for RHEL/CentOS. To install the repo on i386 run:

rpm -i http://dl.atrpms.net/el5-i386/atrpms/stable/atrpms-package-config-120-3.el5.i386.rpm

For x86-64

rpm -i http://dl.atrpms.net/el5-x86_64/atrpms/stable/atrpms-package-config-120-3.el5.x86_64.rpm

You will need to enable the testing repo to get the appropriate dependencies.

vim /etc/yum.repos.d/atrpms.repo
--cut--
#
# requires stable
#
[atrpms-testing]
name=Red Hat Enterprise Linux 5 - x86_64 - ATrpms testing
baseurl=http://dl.atrpms.net/el5-x86_64/atrpms/testing
failovermethod=priority
enabled=1
--cut--

Example i386 version of /etc/yum.repos.d/ATrpms.repo

[atrpms]
name=EL $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1

[atrpms-testing]
name=EL $releasever - $basearch - ATrpms - ATrpms testing
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing
failovermethod=priority
enabled=1

RPM Forge

Although RPM Forge is not required for MythTV, it provides many packages a home user may want.

EL5 i386:

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Red Hat Enterprise Linux 5 / x86_64:

rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

EPEL

EPEL was started because many Fedora contributors wanted to use the Fedora packages they maintain on Red Hat Enterprise Linux (RHEL) and its compatible derivatives.

To install for both i386 and x86-64

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

Compiling MythTV 0.24 from source

On CentOS 5, you can compile MythTV 0.24 from source with some additional steps:

  1. Make sure you have the video4linux-devel, kernel-devel, and kernel-headers packages from ATrpms and CentOS installed
  2. Add the --dvb-path=/usr/include/v4l line to your configure script to use the video4linux headers
  3. Create a symbolic link from the kernel sources compile.h to your include directory using:
ln -s /usr/src/kernels/`uname -r`/include/linux/compiler.h /usr/include/linux/compiler.h

There will also be issues with Python because the Python version shipped with CentOS is older than what MythTV requires. This section should be updated with more detailed information on workarounds for that issue.


Continue

From this point the differences between Fedora and RHEL/CentOS are extremely Trival. Continue your install from the Fedora page

RHEL 6.x

Installing MythTV on RHEL6 can be done from the ATRPMS Repos. I wrote a guide here.

You can see which el6 MythTV package versions are currently available here: http://dl.atrpms.net/el6-x86_64/atrpms/stable/

RHEL 7.x

Installing MythTV on RHEL7 (Currently Beta) can be done using the ATRPMS and EPEL repos. It's trivial, but laborious as all RPMs have to be built manually. It's expected that EPEL and ATRPMS will update their repositories around the release of CentOS 7.