Install Plex Media Server on SmartOS
Table of Contents
In this article, we’ll install Plex Media Server on SmartOS. Plex Media Server is a media server that organizes and makes available audio, video, and more. Smart OS is a “converged container and virtual machine hypervisor” based on illumos, which is a fork of the now-defunct OpenSolaris. SmartOS supports Linux-branded containers (zones), allowing us to install Plex Media Server on SmartOS. These instructions might also work on other illumos distributions with some modifications.
For many years, I ran this on my HPE MicroServer to serve media files. It was solid as a rock. Nowadays, I run Plex Media Server on a cluster of Intel NUCs .
This article assumes you have a working SmartOS host and are logged in as root
.
Create a Linux Branded Zone #
Find the latest CentOS lx-dataset
image, in this case 3dbbdcca-2eab-11e8-b925-23bf77789921
:
# imgadm avail | grep centos
Import the CentOS image:
# imgadm import 3dbbdcca-2eab-11e8-b925-23bf77789921
Next, we’ll create the container based on the imported CentOS image. The following command line will create a new CentOS container with 2048
MB RAM, 32
GB disk, and a statically configured NIC (change the NIC settings to match your network setup). It’ll also pass a ZFS dataset from the host system to the container (/tank/media
). This is useful to give Plex Media Server access to media files stored on the host.
Create the container:
# vmadm create << EOL
{
"alias": "plex-media-server",
"hostname": "plex",
"brand": "lx",
"kernel_version": "3.10.0",
"image_uuid": "3dbbdcca-2eab-11e8-b925-23bf77789921",
"max_physical_memory": 2048,
"max_locked_memory": 2048,
"max_swap": 2048,
"quota": 32,
"filesystems": [
{
"type": "lofs",
"source": "/tank/media",
"target": "/tank/media"
}
],
"nics": [
{
"nic_tag": "admin",
"ip": "10.0.2.2",
"netmask": "255.255.0.0",
"gateway": "10.0.0.1"
}
],
"resolvers": ["8.8.8.8", "8.8.4.4"]
}
EOL
This will generate a message saying: Successfully created VM <UUID>
. Make a note of the container UUID; we’ll need it next.
Install Plex Media Server #
Next, we’ll log in to the newly created container (remember the UUID from earlier):
# zlogin <UUID>
Update the package cache and download the latest system packages:
# yum update -y
Download and install the latest version of Plex Media Server (this article uses version 1.18.0.1944
, find the latest version at
plex.tv):
# cd ~
# wget https://downloads.plex.tv/plex-media-server-new/1.18.0.1944-f2cae8d6b/redhat/plexmediaserver-1.18.0.1944-f2cae8d6b.x86_64.rpm
# yum install plexmediaserver-1.18.0.1944-f2cae8d6b.x86_64.rpm
Finally, enable and start the Plex Media Server service:
# systemctl enable plexmediaserver
# systemctl start plexmediaserver
And that is all! Good luck with your SmartOS-based media server.
Revision #
2023-08-31 Revised language
2019-10-20 Accidentally tried to grep
Ubuntu instead of CentOS, thanks to
AThreeK.