PT3による多チャンネル仮想録画サーバ構築 〜epgregUNA導入

epgrec

さて・・ようやく録画サーバに必要となるソフトの
導入に入ります。
Chinachuと違って、色々と自分んでやる必要があり、
いささか面倒な面もありますね〜


epgrecUNAを利用できるようにするためには、以下のような準備が必要になります。

No 必要なソフトウェア 備考
1 HTTPサーバ nginxを使用します。apacheより早いので。
2 php−fpm phpの実効速度が上がるので、nginxでphp−fpmが使えるように準備します
3 データベース MySQLを使用します
おそらくPostgreSQLでも問題はないと思いますが
4 recpt1 前の記事でも紹介しましたが、httpパッチ適用済みのrecpt1が必要となります
5 epgdump
  1. epgrecUNA用にパッチ適用済みのepgdumpが必要になります。
  1. nginxのインストール
    nginxはバイナリーで提供されているので、epelリポジトリーを有効にして、さっくり入れましょう。

    # wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 
    # rpm -ivh  epel-release-7-5.noarch.rpm
    # yum install nginx

    /etc/nginx/nginx.confの例です。次に述べるphp−fpmの設定も含まれています。

    # For more information on configuration, see:
    #   * Official English Documentation: http://nginx.org/en/docs/
    #   * Official Russian Documentation: http://nginx.org/ru/docs/
    
    user nginx;
    worker_processes auto;
    error_log /var/log/nginx/error.log;
    pid /run/nginx.pid;
    
    events {
        worker_connections 1024;
    }
    
    http {
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';
    
        access_log  /var/log/nginx/access.log  main;
    
        sendfile            on;
        tcp_nopush          on;
        tcp_nodelay         on;
        keepalive_timeout   65;
        types_hash_max_size 2048;
    
        include             /etc/nginx/mime.types;
        default_type        application/octet-stream;
    
        # Load modular configuration files from the /etc/nginx/conf.d directory.
        # See http://nginx.org/en/docs/ngx_core_module.html#include
        # for more information.
        include /etc/nginx/conf.d/*.conf;
    
        server {
            listen       80 default_server;
            listen       [::]:80 default_server;
            server_name  _;
            root        /var/www/epgrec;
        charset     utf-8;
        index       index.php index.html;
        
    
            # Load configuration files for the default server block.
            include /etc/nginx/default.d/*.conf;
    
            location / {
            }
    
            error_page 404 /404.html;
                location = /40x.html {
            }
    
            error_page 500 502 503 504 /50x.html;
                location = /50x.html {
            }
    
        location ~ [^/]\.php {
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        }
        }
    }
  2. php−fpmのインストール
    こちらもepelリポジトリからインストールします。
  3. # yum inttall php-fpm

    設定については、以下に記載したnginx.confの例をみてください。デフォルトではlocalhost:9080ポートになっていますが、socketの方が早いので、そのようにしています。

    ocation ~ [^/]\.php {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
    }
  4. データベースのインストール
    こちらはインストール時に入れちゃってるのでスルーでw
    自分で入れるなら、こんな感じでしょうか?

    # yum install mariadb
  5. recpt1のインストール
    〜recpt1仕込みまでを参照してください(ぉぃ)
  6. epgdumpのインストール
    適当な何かの別館からepgdumpをダウンロードしてコンパイルしましょう。

    # cd epgdump
    # make
    # make install
  7. epgrecUNAのインストール
    適当な何かの別館からepgrecUNAを落としましょう。
    可能な限り最新版を。パッチもあるのでお忘れなく。
    パスコードについては、頑張ってください。仕込みについては、自分に負けないラボラトリーさんで解説されているので、そちらを参照ください。手順としては、こんな感じでしょうか。
    ・epgrecUNAで使うデータベースを作成する。
    ・epgrecUNAのアーカイブを展開する
    ・トップページへアクセスし、初期設定を行う

では、快適な録画ライフを!

コメント

タイトルとURLをコピーしました