Archive

Archives pour la catégorie ‘Logiciel’

How to upgrade Plex Media Server on Ubuntu Server

28/09/2023 Aucun commentaire

upgrade plex media serverPlex 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:

Categories: Logiciel Tags:

tmux & screen cheat-sheet

26/09/2023 Aucun commentaire

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).

Actiontmuxscreen
start a new sessiontmux OR
tmux new OR
tmux new-session
screen
re-attach a detached sessiontmux 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 (terminal multiplexer)

26/09/2023 Aucun commentaire

TmuxTmux, à 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

Depuis le tableau de bord (dash), un terminal ou encore une console saisissez la commande suivante :

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…

Detect and Block WordPress Brute Force Login Attacks

25/09/2023 Aucun commentaire

detect and block wordpress brute forceIf you run a wordpress blog these days, you are likely to experience brute force attacks where nefarious individuals attempt to break in to your website by quickly a list of userids and passwords against your wp-login.php.  Here’s how I automated detection and blocking of WordPress brute force login attacks.

Detecting a WordPress Brute Force Attack

One can typically detect a wordpress brute force attack by parsing through your webserver’s access_log file.  The access_log file records all of the access requests that a web server handles.  A brute force attack typically will have frequent and numerous attempts to the wp-login.php file as shown below:

Example:  In the access_log file below, we detect a brute force login attack on our WordPress blog.  We detected it by noticing frequent and constant requests to the wp-login.php file.

31.192.210.159 - - [11/Sep/2014:02:01:43 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:44 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:45 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:47 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:49 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:50 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:51 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:52 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:54 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
31.192.210.159 - - [11/Sep/2014:02:01:55 +0000] "POST http://www.uptimemadeeasy.com/wp-login.php HTTP/1.1" 200 3389 "http://www.uptimemadeeasy.com/wp-login.php" "Mozilla/5.0 (Linux; U; Android 2.2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"

Typically in an event like this, I lookup the IP address in the ARIN database as I showed in a previous article:  What Personal Information Can You Get From Your Web Server?  Frequently, I find that the address is from APAC or RIPE addresses.

Lire la suite…

WordPress Performance Tuning

16/09/2023 Comments off

wordpress performance tuning
WordPress is one of the most popular content publishing platform used by some of the very high traffic website. Beauty of the wordpress is in its simplicity. If you will setup your WordPress correctly then your website performance will be fantastic. In this article we will explore various aspect of the WordPress Performance Tuning. Before going further let me clear that why you need to optimize your WordPress website performance.

Why you should spend time on WordPress Performance Tuning ?

Performance tuning or Optimization is required due to following reason:

  1. If you will correctly optimize or tune your WordPress performance then your visitor experience will be better.
  2. Search engines are giving high preference to high speed website.  So your SEO will be improved.
  3. Sometime while doing your WordPress performance tuning you will analyzed and remove unwanted thing from your WordPress which reduce your server work. So your server will have less load.

Tool / Plugin / Stuff you need while WordPress Performance tuning

WordPress performance tuning does not mean to only changing some configuration of your WordPress. There are several area where you need to fine tune like apache(your webserver), Mysql etc. So before going further you need following tool/plugin

  1. Installation of plugin w3 total plugin.
  2. Firefox web browser with firebug tool.
  3. Google Page Speed Test  or GT Metrix.
  4. SSH connection to your server (only required if you want to tune Apache and MySQL performance).
  5. A good Internet speed.

Before going further for your WordPress Performance Tuning please arrange above written tool.

Analyze your WordPress Performance

Before going to optimize your WordPress Performance you need to analyze that whether your website performance is good or bad. Or in other word we can say that you need to check whether your website is served quickly or not. Following are the factor which mainly affect your website performance and you need to check.

  1. Time taken to load your web page
  2. Number of CSS, js and Images are getting downloaded on every request
  3. CSS and JS are placed correctly or not.

You can check your website performance in either Google Page Speed or Gtmetrix. I prefer to use Gtmetrix. Both tool will gives rating to your website Speed and suggestion to improve your website performance further. Gtmetrix will also provide you the timeline waterfall(what is repose time of your website and how many images, css , js or other resources are getting downloaded) of your website. I prefer Gtmetrix because of TimeLine waterfall feature.
You will get following type snapshot for your website in Gtmetrix
WordPress Performance Tuning

In above snapshot you can see the following 4 tab

  1. Page Speed : In this tab you can find your website performance analysis with GooglePageSpeed.
  2. YSlow : In this tab you can find your website performance analysis with YSlow.
  3. TimeLine : In this tab you can find your website page load water fall.
  4. History: In this tab you can find previous history of your website page speed test if you did the test in in future.

Lire la suite…

Categories: Logiciel Tags: ,