freenas:install_plex_in_a_jail
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
freenas:install_plex_in_a_jail [2020/06/23 13:20] – created peter | freenas:install_plex_in_a_jail [2020/10/21 10:44] (current) – removed 192.168.1.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== FreeNAS - Install Plex in a Jail ====== | ||
- | |||
- | Navigate to **Jails -> Configuration**. | ||
- | |||
- | Select a **Jail Root** that is suitable to where you want your jails to be stored. | ||
- | |||
- | Fill in the network settings to match your environment. | ||
- | |||
- | Navigate to **Jails -> Add Jails**. | ||
- | |||
- | A window will popup with options to configure your jail. | ||
- | |||
- | Select the following: | ||
- | |||
- | * Jail Name: plex | ||
- | * Type: pluginjail or standard (your choice) | ||
- | * IPv4 Address: 192.168.x.x (Anything that isn't taken and isn't in your DHCP scope) | ||
- | * Autostart: Checked (default) | ||
- | * VIMAGE: Checked (default) | ||
- | * vanilla: Checked (default) | ||
- | |||
- | |||
- | Click " | ||
- | |||
- | |||
- | |||
- | |||
- | Once the jail is created, navigate to a shell prompt, either through the FreeNAS WebUI Shell or via SSH. | ||
- | |||
- | Once at a shell prompt, view the currently installed jails with the following command: | ||
- | |||
- | <code bash> | ||
- | jls | ||
- | </ | ||
- | |||
- | |||
- | You should see something like this: | ||
- | |||
- | <code bash> | ||
- | 1 - plex / | ||
- | </ | ||
- | |||
- | |||
- | In this case, the plex jail has a JID of 1, so to get a shell prompt in the jail, use the following command: | ||
- | |||
- | <code bash> | ||
- | jexec 1 tcsh | ||
- | </ | ||
- | |||
- | |||
- | Next, to download the ports tree (this includes the files to compile Plex), run the following: | ||
- | |||
- | <code bash> | ||
- | portsnap fetch extract | ||
- | </ | ||
- | |||
- | |||
- | Now, to install Plex, run the following command: | ||
- | |||
- | <code bash> | ||
- | cd / | ||
- | </ | ||
- | |||
- | |||
- | Once that is complete, you need to setup Plex to start automatically when the jail starts with the following command: | ||
- | |||
- | <code bash> | ||
- | echo plexmediaserver_enable=" | ||
- | </ | ||
- | |||
- | |||
- | Next, start Plex with the following: | ||
- | |||
- | <code bash> | ||
- | service plexmediaserver start | ||
- | </ | ||
- | |||
- | Plex is now ready to use and you can navigate to it with this URL: http:// | ||
- | |||
- | Once you tie a Plex account with your server, you will be able to access Plex internally and externally via: https:// | ||
- | |||
- | |||
- | |||
- | ---- | ||
- | |||
- | ===== Accessing Mounted Storage In Your Jail With Plex ===== | ||
- | |||
- | To add storage to your FreeNAS Jail, start by following this documentation: | ||
- | |||
- | After mounting the storage in your jail, it may be tempting to grant your files 777 access to give Plex access to them. With that said, don’t do it; there is an easy work around. | ||
- | |||
- | |||
- | |||
- | Once at a shell prompt within the jail, find out what the GroupID is of the group that is assigned permissions on the mount with this command: | ||
- | |||
- | <code bash> | ||
- | ls -l /mnt | ||
- | </ | ||
- | |||
- | |||
- | You’ll then see a list of mount points such as this one: | ||
- | |||
- | <code bash> | ||
- | drwxrwx---+ 7 1002 1001 8 Mar 3 18:35 Media | ||
- | </ | ||
- | |||
- | |||
- | The column with 1002 is the UserID, and 1001 is the GroupID. | ||
- | |||
- | To do this, start by editing /etc/group with this command: | ||
- | |||
- | <code bash> | ||
- | ee /etc/group | ||
- | </ | ||
- | |||
- | Then add this to the bottom of the file: | ||
- | |||
- | <file bash> | ||
- | Media: | ||
- | </ | ||
- | |||
- | After saving the file, you can look at the permissions of the mount again by using: | ||
- | |||
- | <code bash> | ||
- | ls -l /mnt | ||
- | </ | ||
- | |||
- | Now, you should see the following instead: | ||
- | |||
- | <code bash> | ||
- | drwxrwx---+ 7 1002 Media 8 Mar 3 18:35 Media | ||
- | </ | ||
- | |||
- | |||
- | You are now done. Plex will now have access to the Media mount. | ||
- | |||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | <code bash> | ||
- | service plexmediaserver restart | ||
- | </ | ||
- | |||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | |||
- | ===== Upgrading Plex ===== | ||
- | |||
- | |||
- | When new releases of Plex come out, you may update without losing your data and preferences. | ||
- | |||
- | To check if a new release of Plex is available via ports, visit this page: http:// | ||
- | |||
- | |||
- | To upgrade Plex, first install a tool called portupgrade with this command: | ||
- | |||
- | <code bash> | ||
- | cd / | ||
- | </ | ||
- | |||
- | |||
- | When configuration dialog boxes appear, accept the defaults. | ||
- | |||
- | |||
- | Next, you have to update the FreeBSD port tree with this command: | ||
- | |||
- | <code bash> | ||
- | portsnap fetch update | ||
- | </ | ||
- | |||
- | |||
- | Then to upgrade all ports at once, use the following: | ||
- | |||
- | <code bash> | ||
- | portupgrade -a | ||
- | </ | ||
- | |||
- | |||
- | Alternatively, | ||
- | |||
- | <code bash> | ||
- | portupgrade -ai | ||
- | </ | ||
- | |||
- | |||
- | |||
- | Afterwards, your ports, including Plex, should be up to date. | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | ===== References ===== | ||
- | |||
- | [[Information on creating jails in FreeNAS|http:// | ||
- | |||
- | https:// | ||
- | |||
- | |||
- | |||
- | |||
freenas/install_plex_in_a_jail.1592918459.txt.gz · Last modified: 2020/07/15 09:30 (external edit)