How to update FreeNAS 11.2 plex server from 1.13.2.5154 to 1.13.5.5291

Mirakal

Dabbler
Joined
Jul 25, 2018
Messages
11
Hi,

I finally figured out how to install plex on freenass 11.2 took forever, now I'd like to upgrade the plex server from 1.13.2.5154 to 1.13.5.5291, any pointers?

Thank you in advance!
-Mirakal
 

shumi

Dabbler
Joined
Apr 7, 2018
Messages
11
of course, this is the way I used it.

./PMS_Updater.sh -v -c plexpass.txt -a

# more plexpass.txt
user=XXX
password=XXX
 

Mirakal

Dabbler
Joined
Jul 25, 2018
Messages
11
of course, this is the way I used it.

./PMS_Updater.sh -v -c plexpass.txt -a

# more plexpass.txt
user=XXX
password=XXX

It doesn't work because the structure for the iocage is different then waren(sp) I got errors couldn't find

Code:
/PMS_Updater.sh: /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Plex Media Server: not found
Using URL https://plex.tv/api/downloads/1.json?channel=plexpass
Downloading https://plex.tv/api/downloads/1.json?channel=plexpass
./PMS_Updater.sh: wget: not found
Error downloading https://plex.tv/api/downloads/1.json?channel=plexpass
 

shumi

Dabbler
Joined
Apr 7, 2018
Messages
11
It doesn't work because the structure for the iocage is different then waren(sp) I got errors couldn't find

Code:
./PMS_Updater.sh: wget: not found

make sure you have the wget command in your session.
 

shumi

Dabbler
Joined
Apr 7, 2018
Messages
11
# ./plex_update.sh
+ fetch -o PMS_Updater.sh https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh
PMS_Updater.sh 100% of 8818 B 77 MBps 00m00s
+ chmod 755 PMS_Updater.sh
+ ./PMS_Updater.sh -v -c plexpass.txt -a
Using URL https://plex.tv/api/downloads/1.json?channel=plexpass
Downloading https://plex.tv/api/downloads/1.json?channel=plexpass
--2018-08-09 16:00:38-- https://plex.tv/api/downloads/1.json?channel=plexpass
Resolving plex.tv (plex.tv)... 52.208.108.2, 54.77.129.25, 34.249.151.238, ...
Connecting to plex.tv (plex.tv)|52.208.108.2|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Last-modified header missing -- time-stamps turned off.
--2018-08-09 16:00:39-- https://plex.tv/api/downloads/1.json?channel=plexpass
Reusing existing connection to plex.tv:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘/tmp/1.json?channel=plexpass’

1.json?channel=plexpass [ <=> ] 20.22K --.-KB/s in 0s

2018-08-09 16:00:40 (257 MB/s) - ‘/tmp/1.json?channel=plexpass’ saved [20701]

Download Complete
Searching https://plex.tv/api/downloads/1.json?channel=plexpass for the FreeBSD download URL .....Done.
Already running latest version v1.13.5.5291-6fa5e50a8

this is a snippet from the script I just ran on my server.
 

Mirakal

Dabbler
Joined
Jul 25, 2018
Messages
11
Thanks, downloaded but couldn't update Plex Server since directories do not exist.

Code:
Download Complete
Verifying /tmp/PlexMediaServer-1.13.5.5291-6fa5e50a8-freebsd-amd64.tar.bz2 .....Done
Removing previous PMS Backup .....Done.
Stopping Plex Media Server .....plexmediaserver does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d), or is not executable
Done.
Moving current Plex Media Server to backup location .....mv: rename /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/ to /usr/pbi/plexmediaserver-amd64/share/plexmediaserver.bak/: No such file or directory
Done.
Extracting /tmp/PlexMediaServer-1.13.5.5291-6fa5e50a8-freebsd-amd64.tar.bz2 .....mkdir: /usr/pbi/plexmediaserver-amd64/share: No such file or directory
tar: could not chdir to '/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/'

Done.
ln: /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Plex_Media_Server: No such file or directory
ln: /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/libpython2.7.so: No such file or directory
Starting Plex Media Server .....plexmediaserver does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d), or is not executable
Done.
 

silverback

Contributor
Joined
Jun 26, 2016
Messages
134
Thanks, downloaded but couldn't update Plex Server since directories do not exist.

Code:
Download Complete
Verifying /tmp/PlexMediaServer-1.13.5.5291-6fa5e50a8-freebsd-amd64.tar.bz2 .....Done
Removing previous PMS Backup .....Done.
Stopping Plex Media Server .....plexmediaserver does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d), or is not executable
Done.
Moving current Plex Media Server to backup location .....mv: rename /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/ to /usr/pbi/plexmediaserver-amd64/share/plexmediaserver.bak/: No such file or directory
Done.
Extracting /tmp/PlexMediaServer-1.13.5.5291-6fa5e50a8-freebsd-amd64.tar.bz2 .....mkdir: /usr/pbi/plexmediaserver-amd64/share: No such file or directory
tar: could not chdir to '/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/'

Done.
ln: /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Plex_Media_Server: No such file or directory
ln: /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/libpython2.7.so: No such file or directory
Starting Plex Media Server .....plexmediaserver does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d), or is not executable
Done.
I don’t know if this will help, but my plexpass version is called "plexmediaserver-plexpass". I manually upgrade from pkg but I believe it lags a few days behind.
 

SamBGB

Cadet
Joined
Aug 29, 2018
Messages
2

Go into your Plex Jail via SSH
portsnap fetch update
portsnap fetch extract update
cd /usr/ports/ftp/wget
make install clean
A few options will come up just accept defaults
cd /usr/ports/editors/nano
make install clean
wget --no-check-certificate https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh

nano PMS_Updater.sh
Change: PMSPARENTPATH="/usr/pbi/plexmediaserver-amd64/share" to: PMSPARENTPATH="/usr/local/share"

** (Only do this section if using the plex pass)**
If you are using the PlexPass plugin change the following lines
Change: PMSLIVEFOLDER="plexmediaserver" to PMSLIVEFOLDER="plexmediaserver-plexpass"
Change: PMSBAKFOLDER="plexmediaserver.bak" to PMSBAKFOLDER="plexmediaserver-plexpass_bak"
**

Hold Control and then Strike X then with no other keys pressed strike Y

** (Only do this section if using the plex pass)** (Use Control and then W to search in nano)
In the PMS_Updater.sh file find the line: service plexmediaserver stop and change it to service plexmediaserver_plexpass stop
In the PMS_Updater.sh file find the line: service plexmediaserver start and change it to service plexmediaserver_plexpass start
**

Go here: https://www.plex.tv/media-server-downloads/ download the latest FreeBSD Plex Installer
In my case this was done using command: wget --no-check-certificate https://downloads.plex.tv/plex-media-server/1.13.6.5339-115f087d6/PlexMediaServer-1.13.6.5339-115f087d6-freebsd-amd64.tar.bz2
chmod 755 PMS_Updater.sh
./PMS_Updater.sh -l PlexMediaServer-1.13.6.5339-115f087d6-freebsd-amd64.tar.bz2 -vv -a (replace with actual plex file downloaded)
 

boybert

Cadet
Joined
Aug 11, 2016
Messages
3
That's it! The question was how to do this in the new Plex iocage plugin jail in FreeNAS 11.2, which required the PMS_Updater script changes outlined by SamBGB.



Go into your Plex Jail via SSH
portsnap fetch update
portsnap fetch extract update
cd /usr/ports/ftp/wget
make install clean
A few options will come up just accept defaults
cd /usr/ports/editors/nano
make install clean
wget --no-check-certificate https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh

nano PMS_Updater.sh
Change: PMSPARENTPATH="/usr/pbi/plexmediaserver-amd64/share" to: PMSPARENTPATH="/usr/local/share"

** (Only do this section if using the plex pass)**
If you are using the PlexPass plugin change the following lines
Change: PMSLIVEFOLDER="plexmediaserver" to PMSLIVEFOLDER="plexmediaserver-plexpass"
Change: PMSBAKFOLDER="plexmediaserver.bak" to PMSBAKFOLDER="plexmediaserver-plexpass_bak"
**

Hold Control and then Strike X then with no other keys pressed strike Y

** (Only do this section if using the plex pass)** (Use Control and then W to search in nano)
In the PMS_Updater.sh file find the line: service plexmediaserver stop and change it to service plexmediaserver_plexpass stop
In the PMS_Updater.sh file find the line: service plexmediaserver start and change it to service plexmediaserver_plexpass start
**

Go here: https://www.plex.tv/media-server-downloads/ download the latest FreeBSD Plex Installer
In my case this was done using command: wget --no-check-certificate https://downloads.plex.tv/plex-media-server/1.13.6.5339-115f087d6/PlexMediaServer-1.13.6.5339-115f087d6-freebsd-amd64.tar.bz2
chmod 755 PMS_Updater.sh
./PMS_Updater.sh -l PlexMediaServer-1.13.6.5339-115f087d6-freebsd-amd64.tar.bz2 -vv -a (replace with actual plex file downloaded)
 

Amsoil_Jim

Contributor
Joined
Feb 22, 2016
Messages
175
does this work for a non plugin version? I would assume it does but figure I would ask.
 

boybert

Cadet
Joined
Aug 11, 2016
Messages
3
does this work for a non plugin version? I would assume it does but figure I would ask.
For a regular install I'd think you'd be able to update Plex right from within the UI. But I think the Updater script should work perhaps with some path changes.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I have never liked scripts. They have to be set up exactly right. Unless you can read them, and understand what they do, you might find yourself in trouble. For the script above, you have to install some extra stuff.

To update Plex installed in an iocage jail, you can simply do the following from the shell:

- Sign in to jail console:
# iocage console JAILNAME

- Stop Plex with the following command (use the one that matches Plex or Plexpass):
# service plexmediaserver stop
# service plexmediaserver_plexpass stop (on FreeNAS)

- To actually update Plex, run the following command:
# pkg update && pkg upgrade multimedia/plexmediaserver
# pkg update && pkg upgrade multimedia/plexmediaserver-plexpass

- Lastly, start Plex again with the following command:
# service plexmediaserver start
# service plexmediaserver_plexpass start

- Exit the jail console
# exit

- Exit the shell
# exit

This is entirely consistent with standard iocage commands, and it doesn't matter what version of FreeNAS you have. The above pkg update command will do a couple of things. First, if needed, it will update components of your jail. Second, it will update your installation of Plex from the package repository.:)

Now, it's true that the package repository often lags the latest release by a few days but that isn't really much of an issue.
 

Darkflame

Dabbler
Joined
Sep 25, 2016
Messages
39
I've updated update script to work on 11.2-RC1 build.

Check Read me for install instructions.

https://github.com/luluhoc/PMS_Updater

I am such a noob but is there a step by step guide how to do this like where i enter in what and stuff like that.
i would like to learn but when i see this page i still don`t know what to do.
i usually follow you-tube tutorials.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
that isn't really much of an issue.
...except that people apparently feel a pathological need to be up-to-date on Plex. Baffles me, frankly. Although these steps from your post:
Code:
	# service plexmediaserver_plexpass stop  (on FreeNAS)
   # pkg update && pkg upgrade multimedia/plexmediaserver-plexpass
   # service plexmediaserver_plexpass start

Can be replaced with:
Code:
# pkg upgrade
# service plexmediaserver_plexpass restart

FreeBSD isn't Debian, and doesn't need the separate update/upgrade commands.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I am such a noob but is there a step by step guide how to do this like where i enter in what and stuff like that.
i would like to learn but when i see this page i still don`t know what to do.
i usually follow you-tube tutorials.
I understand your pain. Everybody is a noob at some point.

The problem with YouTube videos is that you need to make certain they are up-to-date with the version of FreeNAS you are using. There have been some significant changes in the last year, particularly with respect to jails. The old Warden jail manager has been replaced with with the newer (and easier to use) iocage. When following videos or tutorials, make certain they are using iocage 0.9 or newer.

I actually gave step-by-step instructions, above. However, you need to log in to the FreeNAS shell. If you don't know how to do that, start there. Go to the FreeNAS documentation and try to figure this out. It will be worth a little bit of effort.
 

Ixian

Patron
Joined
May 11, 2015
Messages
218

MountainTom

Cadet
Joined
Dec 10, 2018
Messages
5
Well I cant figure this out. Maybe i'm a noob or something. I have tried numerous steps to update my Plex. No matter what I try I usually get stopped at the first step. Someone please help!
I am currently running FreeNAS 11.2U1 and my Plex is on 1.12.2.4929 (new one is 1.14)
When i tried to run the PMS_Updater I got this after the first step.
Code:
[root@freenas ~]# pkg install ca_root_nss
Updating local repository catalogue...                                         
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite)
 failed: No such file or directory                                             
pkg: file:///usr/ports/packages/meta.txz: No such file or directory             
repository local has no meta file, using default settings                       
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory     
Unable to update repository local                                               
Error updating repositories!               

Actually all the pkg install commands do the same thing.

I also tried doing it via the Jail Console and again stopped at the first step.
Code:
[root@freenas ~]# iocage console 1                                             
jail '1' not found!                                                             
[root@freenas ~]# jls                                                           
   JID  IP Address      Hostname                      Path                     
     1                  plexmediaserver_1             /mnt/Media/pluginjails/plexmediaserver_1 


I must be doing something wrong, am I missing a step?
 
Top