====== openSUSE TODO ====== * Install RPM * Enable Plex repo and set 98 priority TODO WITH A COMMAND https://support.plex.tv/articles/235974187-enable-repository-updating-for-supported-linux-server-distributions/ sudo firewall-cmd --add-service='plex' --permanent sudo usermod --append --groups 'plex' 'espionage724' sudo chown --recursive 'espionage724':'plex' '/srv/ftp/nas2' && sync ====== Information ====== * Plex ((https://www.plex.tv/)) * Media Server ((https://www.plex.tv/media-server-downloads/)) ===== Prerequisites ===== * [[distros:ubuntu_server|Ubuntu Server]] ====== Dependencies ====== ===== New ===== * https://support.plex.tv/articles/235974187-enable-repository-updating-for-supported-linux-server-distributions/ wget -O '/tmp/plex-gpg.key' 'https://downloads.plex.tv/plex-keys/PlexSign.key' && sudo apt-key add '/tmp/plex-gpg.key' && echo 'deb https://downloads.plex.tv/repo/deb public main' | sudo tee '/etc/apt/sources.list.d/plexmediaserver.list' > '/dev/null' && cat '/etc/apt/sources.list.d/plexmediaserver.list' && rm -f '/tmp/plex-gpg.key' && sync sudo apt install 'plexmediaserver' ===== Old ===== wget -O '/tmp/plexmediaserver.deb' 'https://downloads.plex.tv/plex-media-server-new/1.17.0.1841-d42cfa161/debian/plexmediaserver_1.17.0.1841-d42cfa161_amd64.deb' sudo dpkg --install '/tmp/plexmediaserver.deb' ====== Firewall ====== * 21/tcp is FTP /usr/lib/firewalld/services/ftp.xml sudo firewall-cmd --permanent --add-service='ftp' && sudo firewall-cmd --reload ====== Service ====== **** sudo systemctl enable 'plexmediaserver' --now ====== Settings ====== * http://192.168.1.156:32400/web ===== General ===== * :!: Change ''local_root'' depending on how the drive gets mounted ((somehow ended up as ''nas2'' in one install)) sudo -e '/etc/vsftpd/vsftpd.conf' && sudo systemctl restart 'vsftpd' # Custom local_root=/var/ftp/nas1/espionage724 ===== Encryption Support ===== ==== Generate Certs ==== * Country: US * State: PA * Locality: Charleroi * Org Name: Realm of Espionage * Org Unit: NAS * YOUR Name: x * Email: x sudo openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout '/etc/ssl/certs/vsftpd.pem' -out '/etc/ssl/certs/vsftpd.pem' && sudo chmod '600' '/etc/ssl/certs/vsftpd.pem' ==== Enable Encryption ==== * :!: ''ssl_ciphers'' can be set to ''HIGH'' or any supported OpenSSL cipher, but the higher the cipher, the higher the performance hit ((specifically on Oak with a Phenom II X4, ''HIGH'' caps around 60-70MB/s, whereas ''AES128-SHA'' is 70-80MB/s, and no encryption is 100-110MB/s)) sudo -e '/etc/vsftpd.conf' ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=YES force_local_logins_ssl=YES require_ssl_reuse=YES ssl_ciphers=AES128-SHA ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO rsa_cert_file=/etc/ssl/certs/vsftpd.pem rsa_private_key_file=/etc/ssl/certs/vsftpd.pem ====== fstab ====== ===== PARTUUID ===== * Expects the NAS drive to be GPT sudo blkid ===== fstab ===== * :!: Change the ''x'' in ''PARTLABEL='' * :!: This expects 1 drive each with a XFS partition sudo mkdir -p '/var/ftp/nas1' && sudo -e '/etc/fstab' # NAS PARTUUID=x /var/ftp/nas1 xfs rw,relatime,attr2,inode64,noquota 0 2 sudo mount --all ====== Permissions ====== ===== Files ===== * :!: Verify the group name with the ''groups'' command ((in openSUSE it's ''users'' and Ubuntu is the username typically)) sudo chown -R 'espionage724':'espionage724' '/var/ftp/nas'* && sync ===== SELinux ===== sudo semanage fcontext --deleteall "/var/ftp/nas1(/.*)?" sudo semanage fcontext --add --type 'public_content_rw_t' "/var/ftp/nas1(/.*)?" sudo restorecon -R -v '/var/ftp/nas1' && sync