Plex Media Server is amazing and fantastic in so many ways! It’s got a better interface, better streaming capabilities, and better library scraping. It’s completely replaced XBMC for my media needs. The biggest drawback is there isn’t quite as much documentation out there for it. I noticed that my Plex Server was out of date, and a quick search didn’t give any exact results for upgrading on Ubuntu.
With enough research, I found how easy an upgrade actually is. For those trying to do the same, I’ll share the exact commands with you.
Grab the latest version
Go to Plex’s site and look for the latest version. You ned the link for the ‘.deb’ file. For me, I was upgrading to 0.9.8.10.215.
So, on your Ubuntu server, run the following:
screen and tmux
A comparison of the features (or more-so just a table of notes for accessing some of those features) for GNU screen and BSD-licensed tmux.
The formatting here is simple enough to understand (I would hope). ^ means ctrl+, so ^x is ctrl+x. M- means meta (generally left-alt or escape)+, so M-x is left-alt+x It should be noted that this is no where near a full feature-set of either group. This – being a cheat-sheet – is just to point out the most very basic features to get you on the road. Trust the developers and manpage writers more than me. This document is originally from 2009 when tmux was still new – since then both of these programs have had many updates and features added (not all of which have been dutifully noted here). |
Action | tmux | screen |
start a new session | tmux OR tmux new OR tmux new-session | screen |
re-attach a detached session | tmux attach OR tmux attach-session | screen -r |
re-attach an attached session (detaching it from elsewhere) | tmux attach -d OR tmux attach-session -d | screen -dr |
re-attach an attached session (keeping it attached elsewhere) | tmux attach OR tmux attach-session | screen -x |
detach from currently attached session | ^b d OR ^b :detach | ^a ^d OR ^a :detach |
rename-window to newname | ^b , <newname> OR ^b :rename-window <newn> | ^a A <newname> |
list windows | ^b w | ^a w |
list windows in chooseable menu | | ^a “ |
go to window # | ^b # | ^a # |
go to last-active window | ^b l | ^a ^a |
go to next window | ^b n | ^a n |
go to previous window | ^b p | ^a p |
see keybindings | ^b ? | ^a ? |
list sessions | ^b s OR tmux ls OR tmux list-sessions | screen -ls |
toggle visual bell | | ^a ^g |
create another window | ^b c | ^a c |
exit current shell/window | ^d | ^d |
split window/pane horizontally | ^b “ | ^a S |
split window/pane vertically | ^b % | ^a | |
switch to other pane | ^b o | ^a <tab> |
kill the current pane | ^b x OR (logout/^D) | |
collapse the current pane/split (but leave processes running) | | ^a X |
close other panes except the current one | ^b ! | |
cycle location of panes | ^b ^o | |
swap current pane with previous | ^b { | |
swap current pane with next | ^b } | |
show time | ^b t | |
show numeric values of panes | ^b q | |
toggle zoom-state of current pane (maximize/return current pane | ^b z | |
break the current pane out of its window (to form new window) | ^b ! | |
Source: dayid.org
Tmux
, à l’instar de Screen, est un multiplexeur de terminaux, outil permettant d’exploiter plusieurs terminaux au sein d’un seul et même affichage.
Installation
Tmux n’est pas installé par défaut. Pour l’installer à l’aide d’un utilitaire graphique il suffit d’Installer le paquets tmux.
Par l’installer avec apt-get depuis un terminal, il suffit de saisir la commande suivante :
sudo apt-get install tmux
Utilisation de tmux
Les principaux raccourcis
Tmux fait appel à l’ensemble de touches <Ctrl> <b> là ou screen
fait appel à <Ctrl> <a>.
Les raccourcis et fonctions étant proches voire identiques à ceux de Screen, pour mieux les comprendre, reportez-vous à la page
Screen.
Raccourcis de base
- <Ctrl> <b> suivi de <c> : Créer un nouveau terminal dans la session tmux active
- <Ctrl> <b> suivi de <n> : Switcher entre les différents terminaux de la session
- <Ctrl> <b> suivi de <X> : Choisir un terminal spécifique (ou X est le numéro du terminal)
- <Ctrl> <b> suivi de <d> : Se détacher de la session tmux (lancer ‘tmux a’ pour s’y rattacher)
- <Ctrl> <b> suivi de <,> : Permet de renommer un terminal
- <Ctrl> <b> suivi de <w> : Affiche la liste des terminaux disponibles
- <Ctrl> <b> suivi de <t> : Afficher l’heure dans un terminal
Commandes dans un Split
- <Ctrl> <b> suivi de <« > : Split vertical du terminal courant en deux ouverture d’un terminal dans le nouveau panel
- <Ctrl> <b> suivi de <%> : Split horizontal du terminal courant en deux ouverture d’un terminal dans le nouveau panel
- <Ctrl> <b> suivi de <o> : Switcher entre les terminaux splittés
- <Ctrl> <b> suivi de <espace> : Changer l’organisation visuelle des terminaux splittés
- <Ctrl> <b> suivi de <Alt> (flèches directionnelles) : Reduire, agrandir fenêtre du split
- <Ctrl> <b> suivi de <!> : Convertir un split en terminal seul
- <Ctrl> <b> suivi de <q> : Afficher les numéros des terminaux splittés
- <Ctrl> <b> puis saisissez :join : permet de joindre un terminal seul dans un split
Par exemple, après avoir tapé le combo <Ctrl> <b> si vous saisissez
:join -v -s 3.0 -p 50
Où :
-h
ou -v
: pour horizontalement ou verticalement-s 3.0
: terminal 3 et volet 0 (volet si écran splitté)-p 50
: occupation à 50% de la fenêtre
Ici donc vous ajouterez verticalement, un terminal numéroté 3 et qui prendra 50% de l’espace total.
Lire la suite…
What is the main objective of this entire topology?
Redundancy and
Load Sharing! Imagine a scenario where your single web server is receiving millions and millions of HTTP requests per second, the CPU load is going insane, as well as the memory usage, when suddenly “crash!”, the server dies without saying good-bye (probably because of some weird hardware out-stage that you certainly won’t have time to debug). Well, this simple scheme might lead you into a brand new world of possibilities
What is this going to solve?
Hardware Failures! We are going to have redundant hardware all over the place, if one goes down, another one will be immediately ready for taking its place. Also, by using load sharing schemes, this is going to solve our High Usage! issue. Balancing the load among every server on our “farm” will reduce the amount of HTTP request per server (but you already figured that out, right?).
Let’s set it up! Firstly, we’re not going to use a domain scheme (let’s keep it simple), make sure your /etc/hosts file looks exactly like the picture below on every machine:
#vi /etc/hosts
192.168.0.241 haproxy
192.168.0.39 Node1
192.168.0.30 Node2
192.168.223.147 Node1
192.168.223.148 Node2
192.168.0.58 Web1
192.168.0.139 Web2
192.168.0.132 Mysql
Lire la suite…
How to set-up a high-availability cluster
Here are a few notes about how to set-up a high-availability web server farm using Ubuntu 12.04 LTS using a whole load of awesome software (HAProxy, HeartBeat, Watchdog and Nginx)
The setup
In my setup I have five virtual machines, these are named and used for the following:-
haproxy1 – Our first proxy (master)/load-balancer (running HAProxy, HeartBeat and Watchdog) [IP address: 172.25.87.190]
haproxy2 – Our second proxy (failover)/load-balancer (running HAProxy, HeartBeat and Watchdog) [IP address: 172.25.87.191]
web1 – Our first web server node (running nginx) [IP address: 172.25.87.192]
web2 – Our second web server node (running nginx) [IP address: 172.25.87.193]
web3 – Our third web server node (running nginx) [IP address: 172.25.87.194]
The servers are connected in the following way:-

In my next post I will also explain how to configure the web servers to point to a backend shared storage cluster (using NFS) and a MySQL cluster server to have a truly highly available web hosting platform.
Lire la suite…