Jump to content

Fedora/CentOS (RPM)


Luke

Recommended Posts

The package has been installed and tested on Fedora 19+ and CentOS 6.5+

 

For CentOS you need to enable/install the epel repository:
 

sudo yum install epel-release

For Fedora:

 

*If you have the rpmfusion repositories then install ffmpeg from there and the server won't download it when it first boot up.

 

For all:

You can also create/modify the file at /etc/opt/MediaBrowser/MediaBrowserServer/MediaBrowserServer.cfg and add a path for ffmpeg and ffprobe if you dont have them installed in /bin in the following format:

FFmpeg="/bin/ffmpeg"
FFprobe="/bin/ffprobe"

If the server cant find them it will download them the first time you start it.
 

Steps:

Download and install the repo package from here

Update to latest repo:

sudo yum update MediaBrowserServer-repositories

If your system meets the server dependancies you can go ahead and install the server:

sudo yum install MediaBrowserServer

if not you can enable the MediaBrowserServer-Dependancies repo to supply the dependancies

sudo yum-config-manager --enable MediaBrowserServer-Dependancies

and then proceed to install the server.

You can start the service by typing:

sudo service MediaBrowserServer start

To stop/restart or see the status of the service substitute start with the appropriate command.

 

On init.d system such as CentOS 6.5 (it comes on by default)

sudo chkconfig MediaBrowserServer on   

to stop it from starting when the system boots up:

sudo chkconfig MediaBrowserServer off    

To enable Beta releases type

sudo yum-config-manager --enable MediaBrowserServer-Beta

System Tray Icon:

To have a tray-icon just like the Windows version install MediaBrowserServer-sysTray

Only tested on gnome at the moment

sudo yum install MediaBrowserServer-sysTray

After it is installed reload gnome by pressing [alt]+[f2] typing [r] in the box and pressing [enter].

Start the tray icon by clicking on the Media Browser Server application.
It will start the server service when you click on the application and close it if you click exit on the tray icon.

Edited by jose
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Test init.d script for CentOS 6.5/6.6 

THIS is now included on the official repo.

 

It uses the basic daemon functions: daemon , killproc , status

Create a file called MediaBrowserServer with the text below and place it on /etc/init.d/.

After that run:

#So that you can use service MediaBrowserServer start/stop/restart 

chkconfig --add MediaBrowserServer

#So that it starts at bootime
chkconfig --level 2345 MediaBrowserServer on 

#So that it doesnt start at bootime

chkconfig MediaBrowserServer off 

#!/bin/sh
### BEGIN INIT INFO
# Provides:          MediaBrowserServer
# Required-Start:    $network $local_fs
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of MediaBrowser Server
# Description:       starts instance of MediaBrowser Server using start-stop-daemon
### END INIT INFO


# chkconfig: 2345 20 80
#The above indicates that the script should be started in levels 2, 3, 4, and 5, #that its start priority should be 20, and that its stop priority should be 80. 
# Source function library.
. /etc/rc.d/init.d/functions
#Define variables
EXEC="/opt/MediaBrowser/MediaBrowserServer/start.sh"
NAME="MediaBrowserServer"
USER="MediaBrowserServer"
LOCKFILE=/var/lock/subsys/$NAME
PIDFILE=/var/run/$NAME.pid
RETVAL=0
LOGFILE=/var/log/$NAME.log

start() {
    [ -x $EXEC ] || exit 5
    if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then
		echo 'Service already running' >&2
		exit 1
    fi
    echo -n $"Starting $NAME: "
    # use daemon to start the service 
    daemon --user $USER $EXEC > $LOGFILE 2>&1 &
    MAIN_PID=$!
    echo $MAIN_PID > $PIDFILE 
    RETVAL=$?
    [ $RETVAL -eq 0 ] && touch $LOCKFILE
    echo
    return $RETVAL
}

stop() {
    echo -n $"Stopping $NAME: "
    # use kill proc to stop the service
    MAIN_PID=$(cat $PIDFILE)
    echo "MAIN PID $MAIN_PID""A" 
    if [[  $MAIN_PID =~ ^[0-9]+$ ]] ; then       
        PIDMONO=$(pstree -pah $MAIN_PID |grep mono|head -1 |cut -d "," -f 2|cut -d " " -f 1)
        echo Test    
    else
        KILL_MONO='echo "PID NOT FOUND"'    
    fi
    echo $PIDMONO
    killproc $NAME
    RETVAL=$?
    if [[  $PIDMONO =~ ^[0-9]+$ ]] ; then
        KILL_MONO="kill $PIDMONO"
        echo 'kill'
    fi
    eval "$KILL_MONO"  
    [ $RETVAL -eq 0 ] && rm -f $LOCKFILE && rm -f $PIDFILE
    return $RETVAL
}

restart() {
    stop
    start
}

reload() {
    restart
}

force_reload() {
    restart
}

rh_status() {
    # run checks to determine if the service is running or use generic status
    status $NAME
    cat $LOGFILE | tail -5
}

rh_status_q() {
    rh_status >/dev/null 2>&1
}


case "$1" in
    start)
        #Only if not running,  start

       $1
        ;;
    stop)
        # Only if service is running stopt
        rh_status_q || exit 0
        $1
        ;;
    restart)
        $1
        ;;
    reload)
        rh_status_q || exit 7
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        rh_status
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
        restart
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
        exit 2

esac
exit $?
:
Edited by jose
Link to comment
Share on other sites

For beta:

sudo yum-config-manager --enable MediaBrowserServer-Beta

for deb remove beta or stable and

sudo yum-config-manager --enable MediaBrowserServer-Dev

 

Right now the latest between stable and beta is stable. Dev doesnt have a version number in the package so you have to uninstall the server and also disable the beta and stable repositories then enable the deb repository and reinstall the server

Link to comment
Share on other sites

  • 2 weeks later...

Now the dev package will update/ install over beta and stable versions. 

If by chance the latest stable or beta is greater than dev, dev wont be updated you have to remove it and disable the repo. 

The beta will be overridden by a greater version of stable.

Also you wont see the version number from yum, you will have to open the web browser and go to the server directly to see the version of it.

 

To get the latest packaged dev version:

sudo yum-config-manager --enable MediaBrowserServer-Dev
sudo yum install MediaBrowserServer-dev

If you wish to revert back you will need to remove MediaBrowserServer-dev

sudo yum remove MediaBrowserServer

and also disable the dev repository.

Link to comment
Share on other sites

  • 3 weeks later...

Please forgive me if I'm hijacking the thread,

 

 

I was running MB3 about 2 months ago, all working very well, and had to take it off for a bit.  When i went to reinstall, I the new current release requires libwebp 0.42   my machine (Fedora 19) only has libwebp 0.31.   I've not had the time to blow it down and upgrade to FC20  (FC21 will be  a disaster for me as I need both workstation and server.. aka. a lot of manual package installations after it stabilizes)

 

 

 

As first step, I've  built 0.42 and dropped it in and updated ldconfig appropriately.

 

Is there a suggested way to either

 

a. grab the previous version RPM and do the binary install

 

or

 

b. grab the source tree and config/build/install locally ?

 

 

 

Thanks,
C

.

Edited by ChuckL
Link to comment
Share on other sites

You can just go without libwebp. The server will recover just fine without it. When the next release rolls around in a few weeks it won't be used anymore anyway.

Link to comment
Share on other sites

Please forgive me if I'm hijacking the thread,

 

 

I was running MB3 about 2 months ago, all working very well, and had to take it off for a bit.  When i went to reinstall, I the new current release requires libwebp 0.42   my machine (Fedora 19) only has libwebp 0.31.   I've not had the time to blow it down and upgrade to FC20  (FC21 will be  a disaster for me as I need both workstation and server.. aka. a lot of manual package installations after it stabilizes)

 

 

 

As first step, I've  built 0.42 and dropped it in and updated ldconfig appropriately.

 

Is there a suggested way to either

 

a. grab the previous version RPM and do the binary install

 

or

 

b. grab the source tree and config/build/install locally ?

 

 

 

Thanks,

C

.

a new dependencies repo for 19 is being build it will provide all the dependencies needEd. When the new release comes out i will take libwebp out as a dependency.
Link to comment
Share on other sites

  • 2 weeks later...

      *Admins, please feel free to move this out of this thread to a more appropriate location

 

As a follow-up to my previous,  FC20 is installed (fresh w/ homemake package list migration tool)  

 

MBS installation MediaBrowserServer.noarch 0:3.0.5490.2-Stable.59.1   fails for deps

 

FC20 current versions not meeting MBS requirements are:

 

   mono-devel   2.10.8-5.fc20   (mono-core also 2.10.8-5)

   libwebp = 0.3.1-2.fc20

   libgdiplus = 2.10-10.fc20

Link to comment
Share on other sites

thefirstofthe300

That mono version won't actually work with the server. Mono 3.2.8 is the minimum required and Mono 3.4 or greater is recommended (except for 3.12 which has a known bug that causes massive slowness in MB).

Link to comment
Share on other sites

*Admins, please feel free to move this out of this thread to a more appropriate location

 

As a follow-up to my previous, FC20 is installed (fresh w/ homemake package list migration tool)

 

MBS installation MediaBrowserServer.noarch 0:3.0.5490.2-Stable.59.1 fails for deps

 

FC20 current versions not meeting MBS requirements are:

 

mono-devel 2.10.8-5.fc20 (mono-core also 2.10.8-5)

libwebp = 0.3.1-2.fc20

libgdiplus = 2.10-10.fc20

Did you activate rhe dependencies repo

 

sudo yum-config-manager --enable MediaBrowserServer-Dependancies

Link to comment
Share on other sites

  • 3 weeks later...

I've got a dependency problem to update to the latest Beta release on CentOS 7 (x64):

 

Resolving Dependencies
--> Running transaction check
---> Package MediaBrowserServer.noarch 0:3.0.5518.7-Stable.61.1 will be updated
---> Package MediaBrowserServer.noarch 0:3.0.5557.0-Beta.35.1 will be an update
--> Processing Dependency: libgdiplus-opt > 3.0.0 for package: MediaBrowserServer-3.0.5557.0-Beta.35.1.noarch
--> Finished Dependency Resolution
Error: Package: MediaBrowserServer-3.0.5557.0-Beta.35.1.noarch (MediaBrowserServer-Beta)
           Requires: libgdiplus-opt > 3.0.0
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Can you check it please? Edited by fc7
Link to comment
Share on other sites

That is my fault i have been busy working on other sutff and forgot to update the dependencies for beta you don't need libgdiplus it is going to use imagemagick now which will be provided by the dependencies repo.  

Link to comment
Share on other sites

  • 2 weeks later...
stangri

Have problem updating to Stable.63.1 on CentOS release 6.6:

--> Processing Dependency: ImageMagick > 6.8 for package: MediaBrowserServer-3.0.5569.0-Stable.63.1.noarch
--> Finished Dependency Resolution
Error: Package: MediaBrowserServer-3.0.5569.0-Stable.63.1.noarch (MediaBrowserServer)
           Requires: ImageMagick > 6.8
           Available: ImageMagick-6.5.4.7-7.el6_5.i686 (base)
               ImageMagick = 6.5.4.7-7.el6_5

I've tried to install ImageMagick-last (6.9.0.4) from remi, but that doesn't help to resolve dependency.

 

Any ideas?

Link to comment
Share on other sites

Have problem updating to Stable.63.1 on CentOS release 6.6:

 

--> Processing Dependency: ImageMagick > 6.8 for package: MediaBrowserServer-3.0.5569.0-Stable.63.1.noarch--> Finished Dependency ResolutionError: Package: MediaBrowserServer-3.0.5569.0-Stable.63.1.noarch (MediaBrowserServer)           Requires: ImageMagick > 6.8           Available: ImageMagick-6.5.4.7-7.el6_5.i686 (base)               ImageMagick = 6.5.4.7-7.el6_5
I've tried to install ImageMagick-last (6.9.0.4) from remi, but that doesn't help to resolve dependency.

 

Any ideas?

You can try:

 

yum update MediaBrowserServer --disablerepo=base
I'm assuming you are not using yum's priority plugin. If you are just assign base and MediaBrowser repos the same priority.

Also check that MediaBrowserDependencies repo is enable.

That should solve the problem.

Edited by fc7
  • Like 1
Link to comment
Share on other sites

stangri

Also check that MediaBrowserDependencies repo is enable.

Thanks man, that solved my problem -- the MediaBrowserDependencies was NOT enabled in /etc/yum.repos.d/MediaBrowserServer.repo. Once I've enabled it, the update went smoothly.

Link to comment
Share on other sites

stangri

Uhm, I think it worked properly yesterday, but today I've started having problems:

# /etc/init.d/MediaBrowserServer status
MediaBrowserServer is stopped
        Mono: 3.10.0 (tarball Sat Nov 15 01:40:41 UTC 2014)
        Application Path: /opt/MediaBrowser/MediaBrowserServer/bin/MediaBrowser.Server.Mono.exe
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an insta
nce of an object
  at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0

It crashes on start leaving orphaned pid and subsys files.

 

UPDATE: Weird, I've "shutdown" the server from the web-page and it started working again.

Edited by stangri
Link to comment
Share on other sites

the-dumb1

I have primarily run Windows as my operating system of choice, but recently decided to switch to Linux.  I played with a bunch of different Linux distributions before settling on CentOS primarily because packages were developed for it.  I'm grateful for this forum and the directions, but I struggled quite a bit in getting it up and running.  I found that I had to disable SELinux in my CentOS 7 install because it was preventing the Emby service from running (I know this because even after following the directions in this thread, there was no process listening port 8096).

 

Just thought I'd add this info in case anyone else struggled.

Link to comment
Share on other sites

I have primarily run Windows as my operating system of choice, but recently decided to switch to Linux. I played with a bunch of different Linux distributions before settling on CentOS primarily because packages were developed for it. I'm grateful for this forum and the directions, but I struggled quite a bit in getting it up and running. I found that I had to disable SELinux in my CentOS 7 install because it was preventing the Emby service from running (I know this because even after following the directions in this thread, there was no process listening port 8096).

 

Just thought I'd add this info in case anyone else struggled.

Has anyone else has this problem? i have installed the package on fresh centos7 setups and had.no problems
Link to comment
Share on other sites

I'm running Emby on CentOS7 with SELINUX disabled too.

I can't remember if I even tried to run it with SELINUX enabled. Usually I just disable SELINUX because is causing me more pain and headaches than any other thing.

Link to comment
Share on other sites

  • 2 weeks later...
Doonga

Looks like the repository got switched over to the Emby naming. What do I need to run to pick that up along with the latest version?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...