ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Setting Up Samba for Use with Plex (CentOS 7.2 Minimal)

    IT Discussion
    plex centos 7.2 how to samba
    10
    37
    9.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wirestyle22W
      wirestyle22
      last edited by wirestyle22

      There are no guides online that I have found which attempt to teach anyone how to properly install Plex on a CentOS 7.2 server while also explaining what you are actually doing. I'm attempting to do that here but this is also my first guide so I will be editing over time to make it as good as It can be. I'm not a Linux master by any stretch of the imagination. I hope this helps someone in a similar position.

      First we will update CentOS (wiki)
      yum update -y

      You can use vi as your text editor but I prefer nano. This is just personal preference.
      yum install nano -y

      Now we need to install Samba (wiki)
      yum install samba samba-client samba-common -y

      Change the directory to root and then create the samba directory
      cd /
      mkdir -p /samba

      We need to set permissions and ownership of the samba folder
      chmod -r 0777 /samba <---permissions
      chown -r nobody:nobody /samba <---ownership

      Now we will set SELinux (wiki) permissions
      chcon -t samba_share_t /samba

      At this point it's a good idea to create a backup of your samba configuration file just in case something goes wrong with your configuration.
      cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

      Now we need to edit the samba configuration file. vi would be in place of nano if you are using that text editor.
      nano /etc/samba/smb.conf

      Scroll down to Network-Related Options.

      workgroup = WORKGROUP
      netbios name = Plex
      max protocol = SMB3

      Remove semicolons before the existing lines so they aren't commented out. Directly below max protocol add the following:

      security = user
      map to guest = bad user
      dns proxy = no

      0_1474904615868_plex1.jpg

      Now you need to create a share definition so we can access Plex from any PC. PgDN or scroll to the bottom of the document and enter the following.

      [Plex]
      path = /samba
      browsable = yes
      writable = yes
      guest ok = yes
      read only = no

      Now exit and save your changes

      Enable the smb and nmb services
      systemctl enable smb.service
      systemctl enable nmb.service

      I always restart the services just in case. This may be unncessary.
      systemctl restart smb.service
      systemctl restart nmb.service

      Firewall permissions need to be created and then the firewall needs to be reloaded
      firewall-cmd --permanent --zone=public --add-service=samba
      firewall-cmd --reload

      Map \<ip address\Plex to your windows PC. Once that succeeds I always create a text file to verify I have write access.

      Now, on your Windows PC download: Plex https://www.plex.tv/downloads/ I chose 64bit CentOS

      Drag the .rpm file over into the drive you just mapped in Windows.

      Back in CentOS we need to run a local install of Plex
      cd /samba
      ls <--- To verify that the file is there
      yum localinstall plexmediaserver-0.9.16.4.1911-ee6e505.x86_64 [Note: Once you start typing plex you can hit TAB and it will attempt to autofill the file name. Since there is only one file there is no chance of it autofilling the wrong file name.]

      Let's start the Plex service and stop the firewall service for testing purposes
      systemctl start plexmediaserver.service
      systemctl stop firewalld.service

      On your windows PC open up your browser and test connectivity to your Plex server: http://<ip address>:32400

      Reboot the server.

      Stop the Plex service
      systemctl stop plexmediaserver.service

      Now we need to allow Plex through the firewall (this will be a new document).
      nano /etc/firewalld/services/plexmediaserver.xml

      Enter the following
      <?xml version="1.0" encoding="utf-8"?>
      <service>
      <short>Plex Media Server</short>
      <description>This opens up PlexMediaServer for http (32400), upnp, and autodiscovery.</description>
      <port protocol="tcp" port="32469"/>
      <port protocol="udp" port="32413"/>
      <port protocol="udp" port="1900"/>
      <port protocol="tcp" port="32400"/>
      <port protocol="udp" port="32412"/>
      <port protocol="udp" port="32410"/>
      <port protocol="udp" port="32414"/>
      </service>

      Now add the Plex service to the firewall
      firewall-cmd --permanent --add-service=plexmediaserver
      firewall-cmd --permanent --zone=public --add-service=plexmediaserver

      Reboot the server.

      On your windows PC open up your browser and test connectivity to your Plex server: http://<ip address>:32400 Note: In order to use your Plex Media Server remotely you will need to configure port forwarding on your router. The default port as listed above is 32400.

      Now you can browse your Plex files on your Windows PC and add/remove what you want.

      Follow Plex's media preparation guidelines: https://support.plex.tv/hc/en-us/categories/200028098-Media-Preparation

      1 Reply Last reply Reply Quote 7
      • wirestyle22W
        wirestyle22
        last edited by

        I did run into an issue. I allocated 2 TB to the CentOS server but when I attempt to put media into the shared folder it only holds like 50 GB or something. How do I increase the folder size to account for all of that?

        travisdh1T JaredBuschJ 2 Replies Last reply Reply Quote 0
        • dafyreD
          dafyre
          last edited by

          Check and see what the partition size is for the /

          You may need to fix fstab to mount the extra space in /samba

          wirestyle22W 1 Reply Last reply Reply Quote 0
          • wirestyle22W
            wirestyle22 @dafyre
            last edited by

            @dafyre fsck?

            scottalanmillerS 1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @wirestyle22
              last edited by

              @wirestyle22 said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

              @dafyre fsck?

              No, look in /etc/fstab

              dafyreD 1 Reply Last reply Reply Quote 1
              • dafyreD
                dafyre @scottalanmiller
                last edited by

                @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                @wirestyle22 said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                @dafyre fsck?

                No, look in /etc/fstab

                Yeah, /etc/fstab.

                If you want to see what is mounted, you can

                df -h

                And it will show you all the mounted partitions.

                1 Reply Last reply Reply Quote 1
                • travisdh1T
                  travisdh1 @wirestyle22
                  last edited by

                  @wirestyle22 said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                  I did run into an issue. I allocated 2 TB to the CentOS server but when I attempt to put media into the shared folder it only holds like 50 GB or something. How do I increase the folder size to account for all of that?

                  What does

                  parted -l
                  

                  show? I'm thinking the only space that is available is the root partition, which should be small. The other space will need to be mounted in /samba, and probably permissions re-applied.

                  1 Reply Last reply Reply Quote 1
                  • M
                    marcinozga
                    last edited by

                    I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum. That and opening firewall ports should be entire guide. Samba is really irrelevant here. Besides, why would anyone want to add anything to Plex manually? That's the job for Couchpotato, Sonarr + Jackett, Headphones and similar apps.

                    scottalanmillerS 1 Reply Last reply Reply Quote 1
                    • JaredBuschJ
                      JaredBusch @wirestyle22
                      last edited by JaredBusch

                      @wirestyle22 said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                      I did run into an issue. I allocated 2 TB to the CentOS server but when I attempt to put media into the shared folder it only holds like 50 GB or something. How do I increase the folder size to account for all of that?

                      When giving a CentOS 7 install more than 50GB of drive space it partitions everything over the initial 50GB into its own partition and points /home at it.

                      0_1474917051297_IMG_0067.PNG

                      wirestyle22W 1 Reply Last reply Reply Quote 2
                      • scottalanmillerS
                        scottalanmiller @marcinozga
                        last edited by

                        @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                        I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                        You probably don't need wget, you might be able to install it directly. Often that is the case.

                        I agree, this is really a guide to installing nano and Samba, not Plex.

                        JaredBuschJ 1 Reply Last reply Reply Quote 1
                        • JaredBuschJ
                          JaredBusch @scottalanmiller
                          last edited by

                          @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                          @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                          I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                          You probably don't need wget, you might be able to install it directly. Often that is the case.

                          I agree, this is really a guide to installing nano and Samba, not Plex.

                          They bit about transferring the Plex install just comes down to his admitted inexperience with Linux.

                          The document as it stands is decent. @wirestyle22 missed a little formatting and needs to retitle it setting up samba for use with Plex.

                          M scottalanmillerS 2 Replies Last reply Reply Quote 1
                          • M
                            marcinozga @JaredBusch
                            last edited by

                            @JaredBusch said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                            @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                            @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                            I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                            You probably don't need wget, you might be able to install it directly. Often that is the case.

                            I agree, this is really a guide to installing nano and Samba, not Plex.

                            They bit about transferring the Plex install just comes down to his admitted inexperience with Linux.

                            The document as it stands is decent. @wirestyle22 missed a little formatting and needs to retitle it setting up samba for use with Plex.

                            But that's the wrong way of working with Plex. Here's a guide of doing it the right way:

                            https://www.cuttingcords.com/home/ultimate-server/getting-started

                            It's a guide for Windows, but installation on Linux is very similar. Just ignore the author's statement that Plex is optimized to run on Windows, it's not. Plex server will run on anything, Plex client was build for Mac first, Windows came later.

                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @JaredBusch
                              last edited by

                              @JaredBusch said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                              @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                              @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                              I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                              You probably don't need wget, you might be able to install it directly. Often that is the case.

                              I agree, this is really a guide to installing nano and Samba, not Plex.

                              They bit about transferring the Plex install just comes down to his admitted inexperience with Linux.

                              The document as it stands is decent. @wirestyle22 missed a little formatting and needs to retitle it setting up samba for use with Plex.

                              Yes, retitling would do the trick.

                              dafyreD 1 Reply Last reply Reply Quote 0
                              • dafyreD
                                dafyre @scottalanmiller
                                last edited by dafyre

                                @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                @JaredBusch said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                                You probably don't need wget, you might be able to install it directly. Often that is the case.

                                I agree, this is really a guide to installing nano and Samba, not Plex.

                                They bit about transferring the Plex install just comes down to his admitted inexperience with Linux.

                                The document as it stands is decent. @wirestyle22 missed a little formatting and needs to retitle it setting up samba for use with Plex.

                                Yes, retitling would do the trick.

                                I don't get it... He covers configuring the firewall and the Plex services in the OP.

                                Edit: Granted, there could be more info on configuring your Movie libraries and such after the reboot, etc.

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  marcinozga @dafyre
                                  last edited by

                                  @dafyre said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                  @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                  @JaredBusch said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                  @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                  @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                  I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                                  You probably don't need wget, you might be able to install it directly. Often that is the case.

                                  I agree, this is really a guide to installing nano and Samba, not Plex.

                                  They bit about transferring the Plex install just comes down to his admitted inexperience with Linux.

                                  The document as it stands is decent. @wirestyle22 missed a little formatting and needs to retitle it setting up samba for use with Plex.

                                  Yes, retitling would do the trick.

                                  I don't get it... He covers configuring the firewall and the Plex services in the OP.

                                  80% of the guide is about setting up samba share.

                                  1 Reply Last reply Reply Quote 0
                                  • JaredBuschJ
                                    JaredBusch @marcinozga
                                    last edited by JaredBusch

                                    @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                    @JaredBusch said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                    @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                    @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                    I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                                    You probably don't need wget, you might be able to install it directly. Often that is the case.

                                    I agree, this is really a guide to installing nano and Samba, not Plex.

                                    They bit about transferring the Plex install just comes down to his admitted inexperience with Linux.

                                    The document as it stands is decent. @wirestyle22 missed a little formatting and needs to retitle it setting up samba for use with Plex.

                                    But that's the wrong way of working with Plex. Here's a guide of doing it the right way:

                                    https://www.cuttingcords.com/home/ultimate-server/getting-started

                                    It's a guide for Windows, but installation on Linux is very similar. Just ignore the author's statement that Plex is optimized to run on Windows, it's not. Plex server will run on anything, Plex client was build for Mac first, Windows came later.

                                    This guide is no different it has little to do with setting up Plex.

                                    how is this the wrong way of working with Plex? There is nothing here about working with Plex beyond installing it.

                                    M 1 Reply Last reply Reply Quote 0
                                    • DashrenderD
                                      Dashrender
                                      last edited by Dashrender

                                      LOL, what's with the next page pointing to the left instead of the typical right?

                                      https://i.imgur.com/1pIaT6Z.png

                                      scottalanmillerS 1 Reply Last reply Reply Quote 1
                                      • scottalanmillerS
                                        scottalanmiller @Dashrender
                                        last edited by

                                        @Dashrender weird

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          marcinozga @JaredBusch
                                          last edited by

                                          @JaredBusch said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                          @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                          @JaredBusch said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                          @scottalanmiller said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                          @marcinozga said in Plex Media Server Install Guide (CentOS 7.2 Minimal):

                                          I find this guide really confusing. Plex installation should boil down to downloading package with wget and installing it with yum.

                                          You probably don't need wget, you might be able to install it directly. Often that is the case.

                                          I agree, this is really a guide to installing nano and Samba, not Plex.

                                          They bit about transferring the Plex install just comes down to his admitted inexperience with Linux.

                                          The document as it stands is decent. @wirestyle22 missed a little formatting and needs to retitle it setting up samba for use with Plex.

                                          But that's the wrong way of working with Plex. Here's a guide of doing it the right way:

                                          https://www.cuttingcords.com/home/ultimate-server/getting-started

                                          It's a guide for Windows, but installation on Linux is very similar. Just ignore the author's statement that Plex is optimized to run on Windows, it's not. Plex server will run on anything, Plex client was build for Mac first, Windows came later.

                                          This guide is no different it has little to do with setting up Plex.

                                          how is this the wrong way of working with Plex? There is nothing here about working with Plex beyond installing it.

                                          You said it, title should be setting up samba for use with Plex. Beyond initial media upload to Plex server, which is much more efficient with ftp anyway, there is no need to use samba at all. Adding media to Plex should be automated, and this is where Couchpotato and the likes comes into play.

                                          1 Reply Last reply Reply Quote 0
                                          • StrongBadS
                                            StrongBad
                                            last edited by

                                            Now that this has derailed, as the issue been looking into any further? What is the next step there?

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post