Difference between revisions of "MythWeb"

From ArchWiki
Jump to: navigation, search
(Updated for MythTV 0.21)
(Rewrite)
Line 1: Line 1:
 +
{{translateme}}
 +
= MythWeb =
 +
 +
== Introduction ==
 +
MythWeb is a web interface for [[MythTV]]
 +
 +
== Installation ==
 
Install MythWeb
 
Install MythWeb
 
  pacman -S mythweb
 
  pacman -S mythweb
  
Create a symlink to your video directory under the mythweb directory
+
=== Change Owner and Group ===
  ln -s /home/video /home/httpd/html/mythweb/video_dir
+
The files of the ''mythweb'' package will be owned by the ''nobody'' user and group. Apache now uses the ''http'' user and group.  You can change the owner of ''mythweb'' with:
 +
  chown -R http:http /srv/http/mythweb
  
Start editing httpd.conf
+
=== Link to the MythWeb  Directory ===
  nano /etc/httpd/conf/httpd.conf
+
The ''mythweb'' package will install to ''/srv/www/mythweb'' however the ''apache'' package now uses the ''/srv/httpd'' directory. You can create a link with:
 +
  ln -s /srv/http/mythweb /srv/www/mythweb
  
Uncomment the line
+
=== Link to the Video Directory ===
  LoadModule php5_module            modules/libphp5.so
+
MythWeb looks in the ''video_dir'' directory for ''[[MythTV]]'' recordings. You will need to create a link to the folder where your MythTV recordings are stored.
 +
  ln -s <recording_dir> /srv/http/mythweb/video_dir
  
Set the DocumentRoot in httpd.conf
+
== Configuration ==
DocumentRoot "/srv/www"
+
=== MythWeb ===
.
+
Copy the MythWeb configuration file ''mythweb.conf'' to the [[Apache]] configuration directory.
.
+
.
+
<Directory "/srv/www">
+
.
+
.
+
.
+
</Directory>
+
 
+
Insert the following line towards the end of httpd.conf
+
Include /etc/httpd/conf/extra/mythweb.conf
+
 
+
 
+
Copy the mythweb configuration file to the Include location stated in httpd.conf
+
 
  cp /srv/www/mythweb/mythweb.conf  /etc/httpd/conf/extra/mythweb.conf
 
  cp /srv/www/mythweb/mythweb.conf  /etc/httpd/conf/extra/mythweb.conf
  
Update the Directory reference in mythweb.conf
+
Edit ''mythweb.conf'' to check that the configuration matches your [[MythTV]] setup. If you have changed the database login or password you will need to change the following section.
  <Directory "/srv/www/mythweb">
+
  setenv db_server        "localhost"
 +
setenv db_name          "mythconverg"
 +
setenv db_login        "mythtv"
 +
setenv db_password      "mythtv"
  
NOTE: You should secure this directory.
+
=== Apache ===
 +
Edit the ''[[Apache]]'' configuration file ''/etc/httpd/conf/httpd.conf''
  
 +
Uncomment the line
 +
LoadModule php5_module modules/libphp5.so
  
Edit your mysql server settings in mythweb.conf
+
Insert the following two lines in the ''Supplemental Configuration'' section of ''httpd.conf'', it's found towards the end of the file.
  setenv db_server        "localhost"
+
  Include conf/extra/php5_module.conf
  setenv db_name          "mythconverg"
+
  Include conf/extra/mythweb.conf
setenv db_login        "login"
+
setenv db_password      "password"
+
 
+
  
Activate the mysql and posix modules in PHP
+
=== PHP ===
nano /etc/php/php.ini
+
Edit the [[PHP]] configuration file ''/etc/php/php.ini''
  
Uncomment the following lines
+
Uncomment the following lines in the ''available extensions'' section, found near the end of the configuration file.
 
  extension=mysql.so
 
  extension=mysql.so
 
  extension=posix.so
 
  extension=posix.so
  
Update open_basedir to include the DocumentRoot
+
Add ''/srv/www/'' to the ''open_basedir'' option to allow file operation in the MythWeb directory.
  open_basedir= /home/:/srv/www/:/tmp/
+
  open_basedir = /srv/http/:/srv/www/:/home/:/tmp/:/usr/share/pear/
  
 +
Enable the ''allow_url_fopen'' option for MythWeb's status page to work.
 +
allow_url_fopen = On
  
Start Apache
+
== Using MythWeb ==
 +
You can now start the Apache daemon, ''mythbackend'' must already be running.
 
  /etc/rc.d/httpd start
 
  /etc/rc.d/httpd start
  
Browse to MythWeb
+
Open MythWeb in your browser.
 
  http://localhost/mythweb
 
  http://localhost/mythweb

Revision as of 03:34, 31 January 2009

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:MythWeb#)

MythWeb

Introduction

MythWeb is a web interface for MythTV

Installation

Install MythWeb

pacman -S mythweb

Change Owner and Group

The files of the mythweb package will be owned by the nobody user and group. Apache now uses the http user and group. You can change the owner of mythweb with:

chown -R http:http /srv/http/mythweb

Link to the MythWeb Directory

The mythweb package will install to /srv/www/mythweb however the apache package now uses the /srv/httpd directory. You can create a link with:

ln -s /srv/http/mythweb /srv/www/mythweb

Link to the Video Directory

MythWeb looks in the video_dir directory for MythTV recordings. You will need to create a link to the folder where your MythTV recordings are stored.

ln -s <recording_dir> /srv/http/mythweb/video_dir

Configuration

MythWeb

Copy the MythWeb configuration file mythweb.conf to the Apache configuration directory.

cp /srv/www/mythweb/mythweb.conf   /etc/httpd/conf/extra/mythweb.conf

Edit mythweb.conf to check that the configuration matches your MythTV setup. If you have changed the database login or password you will need to change the following section.

setenv db_server        "localhost"
setenv db_name          "mythconverg"
setenv db_login         "mythtv"
setenv db_password      "mythtv"

Apache

Edit the Apache configuration file /etc/httpd/conf/httpd.conf

Uncomment the line

LoadModule php5_module modules/libphp5.so

Insert the following two lines in the Supplemental Configuration section of httpd.conf, it's found towards the end of the file.

Include conf/extra/php5_module.conf
Include conf/extra/mythweb.conf

PHP

Edit the PHP configuration file /etc/php/php.ini

Uncomment the following lines in the available extensions section, found near the end of the configuration file.

extension=mysql.so
extension=posix.so

Add /srv/www/ to the open_basedir option to allow file operation in the MythWeb directory.

open_basedir = /srv/http/:/srv/www/:/home/:/tmp/:/usr/share/pear/

Enable the allow_url_fopen option for MythWeb's status page to work.

allow_url_fopen = On

Using MythWeb

You can now start the Apache daemon, mythbackend must already be running.

/etc/rc.d/httpd start

Open MythWeb in your browser.

http://localhost/mythweb