Tag Archives: ubuntu

How to Manually Update Plex Media Server on Ubuntu

Since the repositories are not updated often, it is best to manually download and install the updated versions of Plex Media Server manually. You may be forced to do this if you’ve seen the “An update is available. Please install the update manually.” error:

An Update Is available. Please install the update manually.

This is fairly simple (performed on Ubuntu 14.04):

  1. Backup: Consider backing up your metadata and preferences.  Updating this package should not affect either, but better safe than sorry.  Plex wiki on what to back up.
  2. Grab the file and get it to the server: Now you need to get the new package onto the server. You can do one of two things:
    Transfer using WinScp: Go to the Plex Media Server download site, log in, and download the latest version (be sure to check under “PlexPass”), then manually move it onto the server using a program like WinSCP.
    OR…
    Directly download the file to the server: Figure out the URL for the file to be downloaded, and then just use wget on the Linux server (this is just an example URL – find the current version!):

    plexuser@plexserver:~$ wget https://downloads.plex.tv/plex-media-server/0.9.11.7.803-87d0708/plexmediaserver_0.9.11.7.803-87d0708_amd64.deb

  3. Install: Pretty easy! Just install the .deb file:

    plexuser@plexserver:~$ sudo dpkg -i plexmediaserver_0.9.11.7.803-87d0708_amd64.deb

    You’ll get something that looks like this:

    plexuser@plexserver:~$ sudo dpkg -i plexmediaserver_0.9.11.7.803-87d0708_amd64.deb
    [sudo] password for plexuser:
    (Reading database ... 198842 files and directories currently installed.)
    Preparing to unpack plexmediaserver_0.9.11.7.803-87d0708_amd64.deb ...
    plexmediaserver stop/waiting
    Unpacking plexmediaserver (0.9.11.7.803-87d0708) over (0.9.11.5.774-760cb52) ...
    Setting up plexmediaserver (0.9.11.7.803-87d0708) ...
    plexmediaserver start/running, process 8686
    Processing triggers for bamfdaemon (0.5.1+14.10.20140925-0ubuntu1) ...
    Rebuilding /usr/share/applications/bamf-2.index...
    Processing triggers for desktop-file-utils (0.22-1ubuntu2) ...
    Processing triggers for mime-support (3.55ubuntu1) ...
    Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
    Processing triggers for ureadahead (0.100.0-16) ...
    plexuser@plexserver:~$

  4. Verify: That’s really all there is to it. The command above should have restarted your server automatically for you. On your Plex server web panel, navigate to: Settings->Server to verify that you’re on the latest version!
    Plex Version 0.9.11.7 Up to date

How to Install SiriProxy on Ubuntu 12.10

Just got done installing SiriProxy on Linux Ubuntu 12.10.  I had to make a few minor tweaks along the way, so perhaps this updated guide will be helpful to someone.

  1. Do this first: Open a terminal server (command line from here on out). Update apt-get:
    user@ubtunu:~$ sudo apt-get update
    user@ubuntu:~$ sudo apt-get install libxslt1.1 libxslt-dev build-essential xvfb git-core curl libyaml-dev libssl-dev
  2. Turn off dnsmasq: The latest version of SiriProxy comes with its own DNS server, so there is no need to install dnsmasq like some older instructional tutorials might recommend. In fact, it will really muck things up if it is installed. Ubuntu has dnsmasq on in a default installation (used by the “simple” network config tool: NetworkManager), so we will need to stop it and shut it off for good. First see if its running, and stop (kill) it if it is:
    user@ubtunu:~$ pkill dnsmasq

    Now we need to stop it from starting again, by turning it off in this file: /etc/NetworkManager/NetworkManager.conf – comment out the dns line like so:

    #dns=dnsmasq

    Now just restart networking:

    user@ubuntu:~$ sudo restart network-manager
  3. Install RVM:
    user@ubuntu:~$ curl -L https://get.rvm.io | bash -s stable --ruby

    Update your environment variables:

    user@ubuntu:~$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
    user@ubuntu:~$ echo 'export PATH=$HOME/.rvm/bin:$PATH' >> ~/.bashrc
    user@ubuntu:~$ . ~/.bashrc
  4. Install Ruby:
    user@ubuntu:~$ rvm autolibs enable
    user@ubuntu:~$ rvm install 2.0.0
    user@ubuntu:~$ rvm use 2.0.0 --default
  5. Install SiriProxy: This is where I had to take a different path from the installation instructions provided in the github read-me. The version that was installed using gem install had a bug preventing the DNS server from working, so I needed to get the latest source and install from that. Be sure to replace the version number with the version downloaded in some of the steps below:
    user@ubuntu:~$ mkdir SiriProxyLocal
    user@ubuntu:~$ cd SiriProxyLocal
    user@ubuntu:~/SiriProxyLocal$ git clone https://github.com/plamoni/SiriProxy.git
    ...bunch of stuff...
     
    user@ubtunu:~/SiriProxyLocal$ gem build siriproxy.gemspec
    ...bunch of stuff...
     
    user@ubtunu:~/SiriProxyLocal$ gem install siriproxy-0.5.3.gem
    ...bunch of stuff...

    You should see a message telling you that your gem has been installed. Nice!

  6. Configure and a few last things:
    user@ubuntu:~/SiriProxyLocal$ cd ~
    user@ubuntu:~$ mkdir .siriproxy
    user@ubuntu:~$ cp SiriProxyLocal/config.example.yml .siriproxy/config.yml
    user@ubtunu:~$ vi .siriproxy/config.yml

    Edit this config file, replacing the “listen” IP address with your own. The upstream dns servers are important too.. if they aren’t set like below, set them. These are Google’s DNS servers that everything will pass through to (except the Siri address):

    listen: 192.168.0.17
    port: 443
    log_level: 1
     
    #Create an array of DNS servers for use by internal DNS server and resolving guzzoni.apple.com
    upstream_dns: [8.8.8.8, 8.8.4.4]
     
    #Set your computer's IP for use by the internal DNS server
    # server_ip: 192.168.1.100
     
    #Set effective user when running as root. Supply a non-privileged user (such as 'nobody')
    # user: nobody
  7. Generate the certs
    We need to generate a certificate to install to your phone (don’t worry, this is easy):

    user@ubuntu:~$ siriproxy gencerts

    This puts a file here: ~/.siriproxy/ca.pem
    We need to install this to the phone. To do this, I installed WinSCP, copied onto my windows machine, and emailed it to my phone as an attachment. There is probably a way to do this from command line, but I didn’t want to mess with setting up mail on this Ubuntu machine. Once you have it in your email, open the file from your phone and “Accept” the security warning as a trusted cert.  Having this extra cert won’t harm anything on your phone.

  8. Start the server!
    Replace the XX.XX.XX.XX with the ip address of the machine (hint: use ifconfig to see the IP)

    user@ubuntu:~$ rvmsudo siriproxy server -d XX.XX.XX.XX

    Which should produce something like this:

    WARN: Unresolved specs during Gem::Specification.reset:
          rake (>= 0)
    WARN: Clearing out unresolved specs.
    Please report a bug if this causes problems.
    [Info - Configuration] Loading plugins -- If any fail to load, run `siriproxy bundle` (not `bundle install`) to resolve.
    [Notice - Server] ======================= WARNING: Running as root =============================
    [Info - Server] DNS Server started, tainting 'guzzoni.apple.com' with 192.168.0.17[Notice - Server] You should use -l or the config.yml to specify and non-root user to run under
    [Notice - Server] Running the server as root is dangerous.
    [Notice - Server] ==============================================================================
    [Info - Server] Starting SiriProxy on 192.168.0.17:443...
    [Info - Server] DNS server is not running yet, waiting 1 second...
     
    [Info - Server] SiriProxy up and running.
  9. Configure and test your phone:
    This one is easy, just set your “DNS” entry on your wifi connection to your Ubuntu machine’s IP.  Now you should be able to watch the screen, and test SiriProxy by saying “Test Siri Proxy” to Siri!

If you want to start messing around with plugins, the guide here is a good start.  If anyone has any hiccups on a fresh Ubuntu install, let me know and I’ll make corrections/updates. Have fun!