måndag 21 december 2015

How to install screen


screen is a nice tool for those who use the terminal for much of their work. Installation is simple:

How to install htop

Medan den övre verktyget ger oss en grundläggande översikt över processer som körs på din Linux-system, går htop verktyget vidare, genom att ge oss mer information om de processer och låter också flera manipulationer:
  • Sortera listan över processer med hjälp av kriterier såsom: processoranvändning, minne, virtuellt minne och andra
  • Sök efter en process
  • avsluta process

    Automatic installation from repositories (Most distributions )

    The htop package exist for most of the Linux distributions, thus allowing easy installation via the package manager!This is the generic procedure to be used:
    • NB: all commands are entered as root (admin), alternatively you can use the sudo program to execute a command as root (Ubuntu/Kubuntu/Lubuntu/Xubuntu).

    Installation in Debian, Ubuntu, Linux Mint and derivatives (Kubuntu, Lubuntu, Xubuntu, LMDE, etc)

    The first thing to do, is to verify if your repositories are up-to-date
    • apt-get update
    The next step is to install "htop":
    • apt-get install -y htop
      
    The "-y" argument above, automatically accepts the package installation!

    Launch htop

    Normally, if your installation was successful and has returned an error message, you run htop with the following command:
    • htop
      

    Useful links

    Official website: http://hisham.hm/htop/

Noip2 på Raspberry pi2 med OSMC

För att kunna installera NOIP2 på din Rpi2 behöver du först installera lite annat.

Börja med att installera build-essential:
sudo apt-get update
sudo apt-get install build-essential 


Sedan behöver du även installera Make:
sudo apt-get install make


När du har gjort dessa två steg så är det dags att börja med NOIP2!


1)
sudo su
2)
cd /usr/local/src/
3)
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
4)
tar xf noip-duc-linux.tar.gz
5)
cd noip-2.1.9-1/
6)
make install

För att göra DUC start automatiskt och körs i bakgrunden, kommer vi att behöva skriva en liten skript som ska köras vid start

 
sudo nano /etc/init.d/noipscript”  (use nano the word editor to create a file called noipscript)
Skriv in följande rader i nano :
#! /bin/sh

### BEGIN INIT INFO
# Provides:          noip2
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: noip.com client service
### END INIT INFO

# . /lib/lsb/init-functions
case "$1" in
    start)
        echo "Starting noip2."
        /usr/local/bin/noip2
    ;;
    stop)
        echo "Shutting down noip2."
        killall noip2
        #killproc /usr/local/bin/noip2
    ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit 0

För att avsluta nano genom att trycka ctrl + x och Y för att spara ändringar i filen.

Vi måste nu göra skriptet körbart genom att ändra dess rättigheter och uppdatera rc.d skript genom att skriva:
sudo chmod +x /etc/init.d/noipscript
sudo update-rc.d noipscript defaults
Nu kommer Dynamic Update-klienten No-ip starta varje gång din Pi startar och uppdatera din IP-adress.
Du kommer att behöva konfigurera din router till port forward berörda portar till PI. Dvs. om du är värd till en webbplats, kommer du vilja vidarebefordra port 80 och port 443 till IP-adressen för din Pi.

steg 2. Ladda ner och starta OSMC





Ladda ner och starta OSMC (Open Source Media Center)

Den OSMC är efterföljaren till Raspbmc och det är skapat och upprätthålls av Sam Nazarko och du kan ladda ner den senaste OSMC versionen här. Jag kommer att använda installationsprogrammet för Windows i den här guiden.

Nyligen OSMC nådde sin slutliga utgåvan, vilket innebär att det nu är helt stabil och redo för bästa sändningstid.

Innan dessa instruktioner, koppla in micro SD-kortläsare och koppla bort andra USB-lagringsenheter för att se till att du kommer inte att formatera en felaktig enhet av misstag.



OSMC_steps
1

Starta OSMC installationsprogrammet och välja språk och Raspberry Pi 2 enhet i välkomstskärmen. Klicka sedan på knappen "nästa" och välj den senaste
OSMC versionen.
2

Därefter väljer du var du vill installera OSMC. Vanligtvis bör du installera det på SD-kortet. Klicka sedan på knappen "nästa" och konfigurera om din
Systemet ansluter till webben via en fast eller trådlös anslutning.
3
Nu väljer du enheten sökvägen där du vill installera OSMC. Klicka på "nästa" och accepterar licensavtalet.
4
När hämtningen är klar, bekräfta installationen genom att välja "Ja" när du ombeds. Efter installationen är klar, är du redo att sätta i micro SD-kort RPI och starta upp.
 När du kopplar in minneskortet, USB-minne, USB-tangentbord eller fjärrkontroll, Ethernet-kabel och strömadapter, kommer systemet att starta upp och Kodi kommer att lansera för första gången.

För att slutföra installationen, välj språk och bekräfta licensavtalet och du är redo för show time!


OBS: för att få stöd för smb/samba måste du ladda ner detta, My OSMC -> App Store och sedan installera!






torsdag 9 juli 2015

How to turn your D-Link router into an Access Point / Repeater to extend your wireless coverage

This article doesn’t show you how to turn it into a repeater (your router must support network bridging for that), but I figured I’d put both names in the title in-case you’re unfamiliar with the differences in terminology.
Repeater: A device or advanced router that will retransmit the signal from another wireless router.

Access Point: A router (connected to your original network) that broadcasts an entirely new signal, but connecting to it will allow you to access the original network.

Instructions
(The following assumes that you already have your modem and router set up, and would like to extend the wireless coverage)
——————
Step 1: Plug in the new router (the one you will use as the access point) to a electrical outlet, and use a straight-through network cable to hook your computer up to it in one of the LAN slots (1-4).  Note: Do not connect the new router to anything else just yet.  That will come in later steps.
Step 2: Under ‘Network Settings’
Change the IP address of this new router so it is in the same subnet as the main router (I changed mine to 192.168.0.2),  but make sure it does not have the same IP address as the main router.
Note: After doing this, if you type 192.168.0.1 in your browser it will direct you to your main router, and 192.168.0.2 will direct you to this new access point
Ensure it has the same Subnet Mask as the main router (255.255.255.0)
Disable DNS Relay
Disable DHCP Server

Step 3: Under ‘Wireless Settings’->’Manual Wireless Network Setup’

Give your network a name.  This can be the same as your previous wireless network or a new name.  My original router is broadcasting as ‘dlink’ and I called this one ‘Chris’
Set up some sort of security if you would like.

Step 4: Reboot your new router to save all the settings.  Now take a straight-through network cable and connect the two routers.  Plug one end into the LAN of the main router (spots 1-4), then plug the other end into the LAN of the new access point (spots 1-4) Do not plug it into WAN of the new access point!!! Although this seems logical, it does not work.
Step 5: Connect to your new router and bask in the glory.