Installare Pgadmin 4 versione 2.0 in debian 9 – Python Wheel

pgAdmin è la più popolare e completa applicazione open source per l’amminstrazione di postgresql….

La versione 4.0 di Pgadmin è stata completamente riscritta usando Python,  Jquery e Bootstrap e il framework Flask. E’ disponibile in forma di applicazione desktop in  C++ con Qt e come applicazione web.
La precedente versione Pgadmin III non è al momento più supportata.
In ottobre 2017 è stata rilasciata la versione 2.0 di pgAdmin  4.0 .

Installare pgadmin 4 v 2.0 in debian 9.xx come web application modalità desktop

Per installare  pgadmin 4 in debian come applicazione web è necessario installare una serie di pacchetti per avere a disposizione Python e in particolare un Python Virtual Environment.

# su
# apt-get install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev

Si può controllare la versione di python disponibile con

# python -V
  Python 2.7.13

Creare l’ambiente virtuale python 

Si può creare l’ambiente virtuale nella directory /opt utilizzando ad esempio  la directory py-env

# cd /opt
# mkdir py-env

creiamo l’ambiente virtuale python

# virtualenv pgadmin4.2
# cd pgadmin4.2
# source bin/activare

Download e installazione pgadmin4 python wheel

Effettuare il download di pgadmin 4 v.2  python Wheel con

# wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pgadmin4-2.0-py2.py3-none-any.whl

e installare con

# pip install pgadmin4-2.0-py2.py3-none-any.whl

Creare il file di configurazione locale di pgadmin4

per utilizzare pgadmin4 in modalità single user

# touch lib/python2.7/site-packages/pgadmin4/config_local.py
# echo "SERVER_MODE = False" >> lib/python2.7/site-packages/pgadmin4/config_local.py

Avviare pgadmin4 v 2.0 come web application

per avviare usare il comando python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py

(pgadmin4.2) root@deb9:/opt/py-env/pgadmin4.2# python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
 Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser.

Come indicato nel messaggio che appare a terminale puntare il browser all’indirizzo locale 127.0.0.1 porta 5050 è si avrà a disposizione la web application

Risorse posts/pagine utili :

Postgresql :

 

Annunci

Installare VirtualBox in Debian 9 “Stretch”

Il software di virtualizzazione multipiattaforma di Oracle Virtualbox 5.1.xx non è presente  nel repository ufficale di Debian 9.  Può essere installato però ricorrendo al repository  backports sezione contrib. Per abilitare backport :

su

echo "# backports" >> /etc/apt/sources.list
echo "deb http://ftp.debian.org/debian stretch-backports contrib" >> /etc/apt/sources.list

quindi procedere con l’update dei pacchetti con il solito

apt update

installare virtualbox con il seguente comando:

apt install -t stretch-backports virtualbox 

o anche più semplicemente

apt install virtualbox
VirtualBox 5.1

 

Per installare VirtualBox si può utilizzare anche il repository specifico di Oracle

Per aggiungere il repository:

echo "# Oracle Virtualbox repository " >> /etc/apt/sources.list
echo "deb http://download.virtualbox.org/virtualbox/debian stretch contrib" >> /etc/apt/sources.list

Aggiungere Oracle Virtualbox public key con

wget https://www.virtualbox.org/download/oracle_vbox_2016.asc
apt-key add oracle_vbox_2016.asc

per installare

apt-get update
apt-get install virtualbox-5.1

 

Risorse:

 

 

AverTV Volar Green HD in Debian 9.1

Per poter utilizzare il dongle DVB-T AverTV Volar Green HD in Debian 9.xx è sufficiente installare il firmware per la perifierica usb dvb-usb-af9035-02.fw.

Un elenco dei firmware per le AVerMedia è disponibile sul sito linuxtv.org  e precisamente alla pagina AVerMedia 

AverMedia Linuxtv.org

AverMedia Linuxtv.org firmware

Per controllare che la periferica sia stata riconosciuta in Debian 9.xx utilizziamo il comando  lsusb.

:~$ lsusb
...
Bus 006 Device 003: ID 07ca:a835 AVerMedia Technologies, Inc. 
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...

La periferica è riconosciuta.

Il dispositivo risulta pure impostato possiamo controllare con ls /dev/dvb e dmesg | grep dvb.

[maurizio@manjaro Desktop]$ ls -l /dev/dvb/*
total 0
crw-rw----+ 1 root video 212, 4 18.04.2015 23:46 demux0
crw-rw----+ 1 root video 212, 5 18.04.2015 23:46 dvr0
crw-rw----+ 1 root video 212, 3 18.04.2015 23:46 frontend0
crw-rw----+ 1 root video 212, 7 18.04.2015 23:46 net0

Controlliamo cosa avviene più in dettaglio con dmesg | grep dvb

root@debian91ms:/lib/firmware# dmesg | grep dvb 
[ 7.999190] dvb_usb_af9035 6-3:1.0: prechip_version=00 chip_version=03 chip_type=3802
[ 8.000070] usb 6-3: dvb_usb_v2: found a 'AVerMedia AVerTV Volar HD/PRO (A835)' in cold state
[ 8.000110] usb 6-3: firmware: failed to load dvb-usb-af9035-02.fw (-2)
[ 8.000147] usb 6-3: Direct firmware load for dvb-usb-af9035-02.fw failed with error -2
[ 8.000151] usb 6-3: dvb_usb_v2: Did not find the firmware file 'dvb-usb-af9035-02.fw'. Please see linux/Documentation/dvb/ for more details on firmware-problems. Status -2
[ 8.000199] dvb_usb_af9035: probe of 6-3:1.0 failed with error -2
[ 8.000235] usbcore: registered new interface driver dvb_usb_af9035

Come si può notare manca il firmware specifico  non resta che installarlo

Installare il firmware  dvb-usb-af9035-02.fw

Posiziarsi nella cartella /lib/firmware e installare il firmware con

 cd /lib/firmware
 sudo wget http://xgazza.altervista.org/Linux/DVB/dvb-usb-af9035-02.fw

per utilizzare la periferica senza riavviare carichiamo il firmware con modprobe

rmmod dvb-usb-af9035
modprobe dvb-usb-af9035

in alternativa riavviare

Se ricontrolliamo cosa avviene in dettaglio con dmesg | grep dvb

root@debian91ms:/lib/firmware# dmesg | grep dvb 
[ 7.999190] dvb_usb_af9035 6-3:1.0: prechip_version=00 chip_version=03 chip_type=3802
[ 8.000070] usb 6-3: dvb_usb_v2: found a 'AVerMedia AVerTV Volar HD/PRO (A835)' in warm state
[ 8.000120] usb 6-3: will pass the complete MPEG2 transport stream to the software demuxer
[ 8.000141] usb 6-3: schedule remote query interval to 500 msecs
[ 8.000170] usb 6-3: 'AVerMedia AVerTV Volar HD/PRO (A835)' successfully initialized and connected
[ 8.000232] usbcore: registered new interface driver dvb_usb_af9035

 

 

downloads alternativi

    sudo wget https://drive.google.com/file/d/0B7HrOE_9xZobVEZTaFFRTmZ0aEU
     
    sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/af9035/12.13.15.0_6.20.15.0/dvb-usb-af9035-02.fw

 

altri comandi utili

lsmod | grep af
lsmod | grep af
af9033 45056 1
dvb_usb_af9035 40960 7
dvb_usb_v2 40960 1 dvb_usb_af9035
rc_core 28672 3 dvb_usb_af9035,dvb_usb_v2
usbcore 249856 7 dvb_usb_af9035,usbhid,ehci_hcd,xhci_pci,dvb_usb_v2,xhci_hcd,ehci_pci

 

journalctl -b --no-pager

 

Altri post per l’utilizzo delle AverTv Media Volar Green in Ubuntu

Altri post relativi alla DVB_TV su ubuntu linux

inxi tools per accedere alle informazioni di sistema da terminale

Aggiornamento 03/07/2017

inxi è un utile e comodo tools da terminale per accedere in modo completo alle informazioni di sistema.

installare inxi con

su
apt install inxi

Per visualizzare le informazioni di sistema ( alcune informazioni risulteranno filtrate).
si può utilizzare
inxi -F
o
inxi -Fxz
Di seguito le informazioni relative a una Virtual Machine

$ inxi -Fxz
System:    Host: debian8SdaDMZ Kernel: 3.16.0-4-amd64 x86_64 (64 bit) Desktop: N/A Distro: Debian GNU/Linux 8 
Machine:   System: QEMU product: Standard PC (i440FX + PIIX 1996) v: pc-i440fx-2.1
           Mobo: N/A model: N/A Bios: Sea v: 1.7.5-20140531_083030-gandalf date: 04/01/2014
CPU:       Single core AMD Opteron 63xx class CPU (-UP-) cache: 512 KB clocked at 3892 MHz
Graphics:  Card: Red Hat QXL paravirtual graphic card
           Display Server: X.Org 1.19.2 driver: N/A Resolution: 3840x2160@30.00hz
           GLX Renderer: Gallium 0.4 on llvmpipe (LLVM 3.5, 128 bits) GLX Version: 3.0 Mesa 10.3.2
Audio:     Card Intel 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller driver: snd_hda_intel 
           Sound: Advanced Linux Sound Architecture v: k3.16.0-4-amd64
Network:   Card: Red Hat Virtio network device driver: virtio-pci
           IF: eth0 state: up speed: N/A duplex: N/A mac: 52:54:00:22:d3:2b
Drives:    HDD Total Size: 21.5GB (43.6% used) ID-1: /dev/vda model: N/A size: 21.5GB
Partition: ID-1: / size: 19G used: 7.9G (45%) fs: ext4 dev: /dev/vda1 
           ID-2: swap-1 size: 0.92GB used: 0.07GB (7%) fs: swap dev: /dev/vda5 
Sensors:   None detected - is lm-sensors installed and configured?
Info:      Processes: 100 Uptime: 28 days Memory: 140.9/1000.3MB Client: Shell (bash) inxi: 2.1.28 

Visualizzare le informazioni di base del sistema:

$ inxi -S
CPU~Quad core AMD A8-6600K APU with Radeon HD Graphics (-MCP-) speed/max~2500/3900 MHz Kernel~4.9.0-3-amd64 x86_64 Up~13:09 Mem~8410.4/15311.6MB HDD~5001.0GB(27.9% used) Procs~251 Client~Shell inxi~2.3.5  

Per verificare la presenza nel sistema dei tools utilizzati da inxi digitare:

inxi --recommends
~$ inxi --recommends
inxi will now begin checking for the programs it needs to operate. First a check of the main languages and tools
inxi uses. Python is only for debugging data collection.
---------------------------------------------------------------------------
Bash version: 4.3.30(1)-release
Gawk version: 4.1.1,
Sed version: 
Sudo version: 1.8.10p3
Python version: 2.7.9
---------------------------------------------------------------------------
Test One: Required System Directories (Linux Only).
If one of these system directories is missing, inxi cannot operate:

/proc....................................................................... Present
/sys........................................................................ Present

All the  directories are present.
---------------------------------------------------------------------------
Test Two: Required Core Applications.
If one of these applications is missing, inxi cannot operate:

df (info: partition data)................................................... /bin/df
gawk (info: core tool)...................................................... /usr/bin/gawk
grep (info: string search).................................................. /bin/grep
lspci (info: hardware data)................................................. /usr/bin/lspci
ps (info: process data)..................................................... /bin/ps
readlink.................................................................... /bin/readlink
sed (info: string replace).................................................. /bin/sed
tr (info: character replace)................................................ /usr/bin/tr
uname (info: kernel data)................................................... /bin/uname
uptime...................................................................... /usr/bin/uptime
wc (info: word character count)............................................. /usr/bin/wc

All the  applications are present.
---------------------------------------------------------------------------
Test Three: Script Recommends for Graphics Features.
NOTE: If you do not use X these do not matter (like a headless server). Otherwise, if one of these applications
is missing, inxi will have incomplete output:

glxinfo (info: -G glx info)................................................. /usr/bin/glxinfo
xdpyinfo (info: -G multi screen resolution)................................. /usr/bin/xdpyinfo
xprop (info: -S desktop data)............................................... /usr/bin/xprop
xrandr (info: -G single screen resolution).................................. /usr/bin/xrandr

All the  applications are present.
---------------------------------------------------------------------------
Test Four: Script Recommends for Remaining Features.
If one of these applications is missing, inxi will have incomplete output:

dmidecode (info: -M if no sys machine data; -m memory)...................... /usr/sbin/dmidecode
file (info: -o unmounted file system)....................................... /usr/bin/file
hddtemp (info: -Dx show hdd temp)........................................... /usr/sbin/hddtemp
ifconfig (info: -i ip lan-deprecated)....................................... /sbin/ifconfig
ip (info: -i ip lan)........................................................ /bin/ip
sensors (info: -s sensors output)........................................... /usr/bin/sensors
strings (info: -I sysvinit version)......................................... /usr/bin/strings
lsusb (info: -A usb audio;-N usb networking)................................ /usr/bin/lsusb
modinfo (info: -Ax,-Nx module version)...................................... /sbin/modinfo
runlevel (info: -I runlevel)................................................ /sbin/runlevel
sudo (info: -Dx hddtemp-user;-o file-user).................................. /usr/bin/sudo

All the  applications are present.
---------------------------------------------------------------------------
Test Five: System Directories for Various Information.
If one of these directories is missing, inxi will have incomplete output:

/sys/class/dmi/id (info: -M system, motherboard, bios)...................... Present
/dev (info: -l,-u,-o,-p,-P,-D disk partition data).......................... Present
/dev/disk/by-label (info: -l,-o,-p,-P partition labels)..................... Missing
/dev/disk/by-uuid (info: -u,-o,-p,-P partition uuid)........................ Present
/var/run/dmesg.boot (info: -C,-f (BSD only))................................ Missing

The following directories are missing from your system:
Directory: /dev/disk/by-label
Directory: /var/run/dmesg.boot
---------------------------------------------------------------------------
All tests completed.

Visualizzare le informazioni relative alla Cpu:

$ inxi -G
CPU:       Quad core AMD A8-6600K APU with Radeon HD Graphics (-MCP-) cache: 8192 KB 
           clock speeds: max: 3900 MHz 1: 2500 MHz 2: 3900 MHz 3: 3000 MHz 4: 3000 MHz

Visualizzare le informazioni relative al PC Model o Laptop:

$ inxi -M
Machine:   System: QEMU product: Standard PC (i440FX + PIIX 1996) v: pc-i440fx-2.1
           Mobo: N/A model: N/A Bios: Sea v: 1.7.5-20140531_083030-gandalf date: 04/01/2014

Visualizzare le informazioni relative alla Scheda Grafca:

$ inxi -G
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Richland [Radeon HD 8570D]
           Display Server: X.Org 1.19.2 drivers: ati,radeon (unloaded: modesetting,fbdev,vesa)
           Resolution: 3840x2160@30.00hz
           GLX Renderer: Gallium 0.4 on AMD ARUBA (DRM 2.48.0 / 4.9.0-3-amd64, LLVM 3.9.1)
           GLX Version: 3.0 Mesa 13.0.6

Visualizzare le informazioni relative alla Scheda Grafica con extra data (-xx) :

$ inxi -Gxx
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Richland [Radeon HD 8570D] bus-ID: 00:01.0 chip-ID: 1002:990e
           Display Server: X.Org 1.19.2 drivers: ati,radeon (unloaded: modesetting,fbdev,vesa)
           Resolution: 3840x2160@30.00hz
           GLX Renderer: Gallium 0.4 on AMD ARUBA (DRM 2.48.0 / 4.9.0-3-amd64, LLVM 3.9.1)
           GLX Version: 3.0 Mesa 13.0.6 Direct Rendering: Yes

Visualizzare le informazioni relative alla Scheda Audio :

$ inxi -A
Audio:     Card-1 Advanced Micro Devices [AMD] FCH Azalia Controller driver: snd_hda_intel
           Card-2 Advanced Micro Devices [AMD/ATI] Trinity HDMI Audio Controller driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.9.0-3-amd64

Visualizzare le informazioni relative alle interfacce di rete :

$ inxi -N
Network:   Card-1: Intel 82571EB Gigabit Ethernet Controller driver: e1000e
           Card-2: Intel 82571EB Gigabit Ethernet Controller driver: e1000e
           Card-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169

Visualizzare le informazioni relative alle interfacce di rete :

$ inxi -Nni
Network:   Card-1: Intel 82571EB Gigabit Ethernet Controller driver: e1000e
           IF: enp1s0f0 state: up speed: 1000 Mbps duplex: full mac: 00:1f:39:62:a3:a8
           Card-2: Intel 82571EB Gigabit Ethernet Controller driver: e1000e
           IF: enp1s0f1 state: up speed: 1000 Mbps duplex: full mac: 00:1f:39:622:a4:a9
           Card-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           IF: enp2s0 state: down mac: 4d:d3:7e:51:f9:0f
           WAN IP: 93.14.22.82 IF: enp2s0 ip-v4: N/A
           IF: enp1s0f0 ip-v4: 192.168.10.98 IF: enp1s0f1 ip-v4: 192.168.75.82

Visualizzare le informazioni relative alle partizioni:

$ inxi -plu
Partition  ID-1: / size: 45G used: 37G (87%) fs: ext4 dev: /dev/sda4
           label: N/A uuid: d175902a-5676-4d26-849a-1c708af8175e
           ID-2: /media/Home_Dati size: 498G used: 311G (66%) fs: ext4 dev: /dev/sda10
           label: Home_Dati uuid: 18fb5ac8-7b21-4338-9f22-684101996fae
           ID-3: /media/ArchivioR size: 998G used: 917G (97%) fs: ext4 dev: /dev/sda14
           label: ArchivioR uuid: 53a08c42-b4a5-4bc1-ac13-6d18c708c881
           ID-4: swap-1 size: 35.65GB used: 0.00GB (0%) fs: swap dev: /dev/sda15
           label: N/A uuid: 34d36ac2-eab9-48c7-8797-5fbc19e97610

Visualizzare le informazioni relative ai dischi :

$ inxi -D
Drives:    HDD Total Size: 5001.0GB (27.8% used)
           ID-1: /dev/sdc model: WDC_WD20EARX size: 2000.4GB
           ID-2: /dev/sda model: WDC_WD20EFRX size: 2000.4GB
           ID-3: /dev/sdb model: WDC_WD1003FBYX size: 1000.2GB

Visualizzare le informazioni relative alle partizioni di sistema:

$ inxi -P
Partition: ID-1: / size: 45G used: 37G (88%) fs: ext4 dev: /dev/sda4
           ID-2: swap-1 size: 35.65GB used: 0.00GB (0%) fs: swap dev: /dev/sda15

Visualizzare le informazioni relative alle partizioni per le quali è stato effettuato il mount :

$ inxi -p
Partition: ID-1: / size: 45G used: 37G (88%) fs: ext4 dev: /dev/sda4
           ID-2: /media/ArchivioR size: 998G used: 917G (97%) fs: ext4 dev: /dev/sda14
           ID-3: /media/Home_Dati size: 498G used: 311G (66%) fs: ext4 dev: /dev/sda10
           ID-4: /media/maurizio/Backup size: 95G used: 1.8G (2%) fs: ext4 dev: /dev/sdb14
           ID-5: swap-1 size: 35.65GB used: 0.00GB (0%) fs: swap dev: /dev/sda15

Visualizzare le informazioni relative al Kernel e alla distribuzione:

$ inxi -I
System:    Host: debian8SdaDMZ Kernel: 3.16.0-4-amd64 x86_64 (64 bit) Desktop: N/A Distro: Debian GNU/Linux 8 

Visualizzare ad esempio gli 8 processi che utilizzano più cpu e memoria

$ inxi -t cm8
Processes: CPU: % used - top 8 active
           1: cpu: 97.2% command: kaffeine pid: 8195
           2: cpu: 10.2% command: chromium pid: 19923
           3: cpu: 9.0% command: vivaldi-bin pid: 7980
           4: cpu: 8.3% command: Xorg pid: 658
           5: cpu: 7.9% command: WebKitWebProcess pid: 1661
           6: cpu: 7.6% command: chromium pid: 14797
           7: cpu: 6.4% command: WebKitWebProcess pid: 1754
           8: cpu: 5.4% command: WebKitWebProcess pid: 1655
           Memory: MB / % used - Used/Total: 8478.9/15311.6MB - top 8 active
           1: mem: 486.73MB (3.1%) command: WebKitWebProcess pid: 1671
           2: mem: 478.17MB (3.1%) command: WebKitWebProcess pid: 1655
           3: mem: 463.81MB (3.0%) command: WebKitWebProcess pid: 1664
           4: mem: 409.91MB (2.6%) command: WebKitWebProcess pid: 1720
           5: mem: 389.95MB (2.5%) command: thunderbird pid: 23880
           6: mem: 381.14MB (2.4%) command: WebKitWebProcess pid: 1754
           7: mem: 380.36MB (2.4%) command: WebKitWebProcess pid: 1758
           8: mem: 358.09MB (2.3%) command: chromium pid: 24143

Visualizzare i 5 processi che utilizzano più cpu:

$ inxi -t c
           1: cpu: 96.6% command: kaffeine pid: 8195
           2: cpu: 9.7% command: chromium pid: 19923
           3: cpu: 9.0% command: vivaldi-bin pid: 7980
           4: cpu: 8.1% command: Xorg pid: 658
           5: cpu: 7.9% command: WebKitWebProcess pid: 1661

Visualizzare i 5 processi che utilizzano più memoria:

$ inxi -t m
Processes: Memory: MB / % used - Used/Total: 8397.6/15311.6MB - top 5 active
           1: mem: 488.50MB (3.1%) command: WebKitWebProcess pid: 1671
           2: mem: 484.13MB (3.1%) command: WebKitWebProcess pid: 1655
           3: mem: 455.39MB (2.9%) command: WebKitWebProcess pid: 1664
           4: mem: 409.91MB (2.6%) command: WebKitWebProcess pid: 1720
           5: mem: 389.22MB (2.5%) command: thunderbird pid: 23880

Visualizzare la temperatura e la velocità delle ventole:

$ inxi s
Sensors:   System Temperatures: cpu: 60.1C mobo: N/A gpu: 35.0
           Fan Speeds (in rpm): cpu: N/A

Volendo è possibile visualizzare informazioni meterelogiche anche se l’ API non è molto affidabile

$ inxi -w
Weather:   Conditions: 34 F (1 C) - Clear Time: January 2, 11:01 PM CET

Visualizzare i repository

$ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://ftp.it.debian.org/debian/ jessie main
           deb-src http://ftp.it.debian.org/debian/ jessie main
           deb http://security.debian.org/ jessie/updates main
           deb-src http://security.debian.org/ jessie/updates main
           deb http://ftp.it.debian.org/debian/ jessie-updates main
           deb-src http://ftp.it.debian.org/debian/ jessie-updates main
           Active apt sources in file: /etc/apt/sources.list.d/docker.list
           deb https://apt.dockerproject.org/repo debian-jessie main

Inxi le opzioni disponibili

inxi -H 
inxi supports the following options. You can combine them, or list them one by one. Examples: inxi -v4 -c6 OR
inxi -bDc 6. If you start inxi with no arguments, it will show the short form.
 
The following options if used without -F, -b, or -v will show just option line(s): A, C, D, G, I, M, N, P, R, S,
f, i, n, o, p, l, u, r, s, t - you can use these alone or together to show just the line(s) you want to see. If
you use them with -v [level], -b or -F, it will show the full output for that line along with the output for the
chosen verbosity level.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Output Control Options:
-A     Audio/sound card information.
-b     Basic output, short form. Like inxi -v 2, only minus hard disk names.
-c     Color schemes. Scheme number is required. Color selectors run a color selector option prior to inxi
       starting which lets you set the config file value for the selection.
       Supported color schemes: 0-32 Example: inxi -c 11
       Color selectors for each type display (NOTE: irc and global only show safe color set):
         94  Console, out of X
         95  Terminal, running in X - like xTerm
         96  Gui IRC, running in X - like Xchat, Quassel, Konversation etc.
         97  Console IRC running in X - like irssi in xTerm
         98  Console IRC not in  X
         99  Global - Overrides/removes all settings. Setting specific removes global.
-C     CPU output, including per CPU clockspeed (if available).
-d     Optical drive data. Same as -Dd. See also -x and -xx.
-D     Full hard Disk info, not only model, ie: /dev/sda ST380817AS 80.0GB. See also -x and -xx. Disk total used
       percentage includes swap partition size(s).
-f     All cpu flags, triggers -C. Not shown with -F to avoid spamming. ARM cpus show 'features'.
-F     Full output for inxi. Includes all Upper Case line letters, plus -s and -n. Does not show extra verbose
       options like -x -d -f -u -l -o -p -t -r
-G     Graphic card information (card, display server type/version, resolution, glx renderer, version).
-i     Wan IP address, and shows local interfaces (requires ifconfig network tool). Same as -Nni. Not shown with
       -F for user security reasons, you shouldn't paste your local/wan IP.
-I     Information: processes, uptime, memory, irc client (or shell type), inxi version.
-l     Partition labels. Default: short partition -P. For full -p output, use: -pl (or -plu).
-M     Machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo). Older systems/kernels
       without the required /sys data can use dmidecode instead, run as root. Dmidecode can be forced with -! 33
-n     Advanced Network card information. Same as -Nn. Shows interface, speed, mac id, state, etc.
-N     Network card information. With -x, shows PCI BusID, Port number.
-o     Unmounted partition information (includes UUID and LABEL if available). Shows file system type if you have
       file installed, if you are root OR if you have added to /etc/sudoers (sudo v. 1.7 or newer)
       Example:  ALL = NOPASSWD: /usr/bin/file  
-p     Full partition information (-P plus all other detected partitions).
-P     Basic partition information (shows what -v 4 would show, but without extra data). Shows, if detected: /
       /boot /home /tmp /usr /var. Use -p to see all mounted partitions.
-r     Distro repository data. Supported repo types: APT; PACMAN; PISI; YUM; URPMQ; Ports.
-R     RAID data. Shows RAID devices, states, levels, and components, and extra data with -x/-xx. md-raid: If
       device is resyncing, shows resync progress line as well.
-s     Sensors output (if sensors installed/configured): mobo/cpu/gpu temp; detected fan speeds. Gpu temp only
       for Fglrx/Nvidia drivers. Nvidia shows screen number for > 1 screens.
-S     System information: host name, kernel, desktop environment (if in X), distro
-t     Processes. Requires extra options: c (cpu) m (memory) cm (cpu+memory). If followed by numbers 1-20, shows
       that number of processes for each type (default: 5; if in irc, max: 5): -t cm10
       Make sure to have no space between letters and numbers (-t cm10 - right, -t cm 10 - wrong).
-u     Partition UUIDs. Default: short partition -P. For full -p output, use: -pu (or -plu).
-v     Script verbosity levels. Verbosity level number is required. Should not be used with -b or -F
       Supported levels: 0-7 Example: inxi -v 4
         0   Short output, same as: inxi
         1   Basic verbose, -S + basic CPU + -G + basic Disk + -I.
         2   Networking card (-N), Machine (-M) data, shows basic hard disk data (names only), and, if present,
             basic raid (devices only, and if inactive, notes that). similar to: inxi -b
         3   Advanced CPU (-C), network (-n) data, and switches on -x advanced data option.
         4   Partition size/filled data (-P) for (if present): /, /home, /var/, /boot. Shows full disk data (-D).
         5   Audio card (-A); sensors (-s), partition label (-l) and UUID (-u), short form of optical drives,
             standard raid data (-R).
         6   Full partition (-p), unmounted partition (-o), optical drive (-d), full raid; triggers -xx.
         7   Network IP data (-i); triggers -xxx.
-w     Local weather data/time. To check an alternate location, see: -W . For extra weather data
       options see -x, -xx, and -xxx.
-W      Supported options for : postal code; city, state/country; latitude/longitude. Only
       use if you want the weather somewhere other than the machine running inxi. Use only ascii characters,
       replace spaces in city/state/country names with '+'. Example: inxi -W new+york,ny
-x     Adds the following extra data (only works with verbose or line output, not short form):
         -C  CPU Flags, Bogomips on Cpu;
         -d  Extra optical drive data; adds rev version to optical drive.
         -D  Hdd temp with disk data if you have hddtemp installed, if you are root OR if you have added to
             /etc/sudoers (sudo v. 1.7 or newer) Example:  ALL = NOPASSWD: /usr/sbin/hddtemp
         -G  Direct rendering status for Graphics (in X).
         -G  (for single gpu, nvidia driver) screen number gpu is running on.
         -i  IPv6 as well for LAN interface (IF) devices.
         -I  System GCC, default. With -xx, also show other installed GCC versions. If running in console, not in
             IRC client, shows shell version number, if detected. Init/RC Type and runlevel (if available).
      -N -A  Version/port(s)/driver version (if available) for Network/Audio;
   -N -A -G  Network, audio, graphics, shows PCI Bus ID/Usb ID number of card.
         -R  md-raid: Shows component raid id. Adds second RAID Info line: raid level; report on drives (like
             5/5); blocks; chunk size; bitmap (if present). Resync line, shows blocks synced/total blocks.
             zfs-raid: Shows raid array full size; available size; portion allocated to RAID
         -S  Desktop toolkit if avaliable (GNOME/XFCE/KDE only); Kernel gcc version
         -t  Memory use output to cpu (-xt c), and cpu use to memory (-xt m).
      -w -W  Wind speed and time zone (-w only).
-xx    Show extra, extra data (only works with verbose or line output, not short form):
         -A  Chip vendor:product ID for each audio device.
         -D  Disk serial number.
         -G  Chip vendor:product ID for each video card.
         -I  Other detected installed gcc versions (if present). System default runlevel. Adds parent program (or
             tty) for shell info if not in IRC (like Konsole or Gterm). Adds Init/RC (if found) version number.
         -M  Chassis information, bios rom size (dmidecode only), if data for either is available.
         -N  Chip vendor:product ID for each nic.
         -R  md-raid: Superblock (if present); algorythm, U data. Adds system info line (kernel support,read
             ahead, raid events). If present, adds unused device line. Resync line, shows progress bar.
         -S  Display manager (dm) in desktop output, if in X (like kdm, gdm3, lightdm).
      -w -W  Humidity, barometric pressure.
   -@ 11-14  Automatically uploads debugger data tar.gz file to ftp.techpatterns.com. EG: inxi -xx@14
-xxx   Show extra, extra, extra data (only works with verbose or line output, not short form):
         -S  Panel/shell information in desktop output, if in X (like gnome-shell, cinnamon, mate-panel).
      -w -W  Location (uses -z/irc filter), weather observation time, wind chill, heat index, dew point (shows
             extra lines for data where relevant).
-y     Required extra option: integer, 80 or greater. Set the output line width max. Overrides IRC/Terminal
       settings or actual widths. If used with -h, put -y option first. Example: inxi -y 130
-z     Security filters for IP/Mac addresses, location, user home directory name. Default on for irc clients.
-Z     Absolute override for output filters. Useful for debugging networking issues in irc for example.
 
Additional Options:
-h --help      This help menu.
-H             This help menu, plus developer options. Do not use dev options in normal operation!
--recommends   Checks inxi application dependencies + recommends, and directories, then shows what package(s) you
               need to install to add support for that feature.
-V --version   inxi version information. Prints information then exits.
 
Debugging Options:
-%     Overrides defective or corrupted data.
-@     Triggers debugger output. Requires debugging level 1-14 (8-10 - logging of data). Less than 8 just
       triggers inxi debugger output on screen.
         1-7 On screen debugger output
         8   Basic logging
         9   Full file/sys info logging
         10  Color logging.
       The following create a tar.gz file of system data, plus collecting the inxi output to file. To
       automatically upload debugger data tar.gz file to ftp.techpatterns.com: inxi -xx@ <11-14>
       For alternate ftp upload locations: Example: inxi -! ftp.yourserver.com/incoming -xx@ 14
         11  With data file of xiin read of /sys.
         12  With xorg conf and log data, xrandr, xprop, xdpyinfo, glxinfo etc.
         13  With data from dev, disks, partitions, etc., plus xiin data file.
         14  Everything, full data collection.
 
Advanced Options:
-! 31  Turns off hostname in output. Useful if showing output from servers etc.
-! 32  Turns on hostname in output. Overrides global B_SHOW_HOST='false'
-! 33  Forces use of dmidecode data instead of /sys where relevant (-M).


Risorse

Oracle Java Runtime 8 installazione manuale – versione 8.121 – Debian 8.xx 64 bit

java-logoInstallare manualmente la versione di Oracle Java 8u121 (data di rilascio 17/01/2017) in Debian 8.xx JessieLa procedura indicata  segue la linea di precedenti posts quali Oracle Java Runtime 8 installazione manuale – versione 8.25 – Ubuntu 14.10 64 bit Utopic Unicorn e Java JRE 7 aggiornare manualmente alla versione 7.13 – Ubuntu 12.10 64 bit in fondo alla pagina un elenco completo dei post dedicati all’installazione di oracle java. Per controllare la versione di java installata si può usare il comando:

java -version

Se java è assente avremo un messaggio del tipo

maurizio@debians8vm:~$ java -version
-bash: java: command not found

Se fosse installato openjdk 8 avremo un messaggio del tipo

maurizio@debian8vm:~$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Un comando che consente di controllare tutte le versioni presenti è sudo update-alternatives –config java. Questo comando consente di visualizzare anche il percorso in cui è presente la specifica versione di java.

maurizio@debian8vm:~$ update-alternatives --config java

Installare Oracle Java Runtime Environment 8.121

Per installare java jre 8 scaricare Oracle Java  JRE 8u121 a 64 bit sono due le pagine disponibili:

  1. Java SE Runtime Environment 8 Downloads

oracle-java-jre-8121

2. oppure  Oracle Java Downloads for all Operating System (  http://java.com/en/download/manual.jsp?locale=en#lin ).

oracle-java-jre-8121-os-all

A proposito per controllare se la versione di linux in uso è a 64 o 32 bit si può usare il comando

uname -a

mentre per i dettagli sulla versione linux, tipo di kernel, etc fare riferimento al post Linux Versione.

Il file scaricato sarà:  jre-8u121-linux-x64.tar.gz portarsi nella cartella in cui è stato scaricato il file, in genere Downloads, con

cd  ~/Downloads/

quindi estrarre con

tar -xvf jre-8u121-linux-x64.tar.gz

Scegliamo come cartella di riferimento per java la /usr/lib/java/
dove è presente la versione 8.0.45

su
mkdir -p /usr/lib/java/jre1.8.0_121

Spostare i files estratti nella cartella creata per jre

mv jre1.8.0_121/* /usr/lib/java/jre1.8.0_121/

modificare la variabile di sistema PATH  a questo scopo è possibile creare il file script jre180xxx.sh in /etc/profile.d al posto delle xxx inserire il numero di versione in questo caso 121  /etc/profile.d/jre180121.sh

JRE_HOME=/usr/lib/java/jre1.8.0_121
PATH=$PATH:$JRE_HOME/bin
export JRE_HOME
export PATH

quindi rendere il file .sh creato eseguibile con

chmod a+x /etc/profile.d/jre180121.sh

Ricaricare la varibile di sistema PATH  con

. /etc/profile

Controllare PATH con

echo $PATH

Se è stato fatto tutto OK dovremmo verificare l’aggiunta di :/usr/lib/java/usr/lib/java/jre1.8.0_51/bin

ALTERNATIVA volendo e possibile generare lo script utilizzando il comando echo

sudo su 
cd /etc/profile.d
echo 'JRE_HOME=/usr/lib/java/jre1.8.0_121' > jre180121.sh
echo 'PATH=$PATH:$JRE_HOME/bin' >> jre180121.sh
echo 'export JRE_HOME' >> jre180121.sh
echo 'export PATH' >> jre180121.sh
exit

controllare con con cat /etc/profile.d/jre180121.sh rendere eseguibile sempre con chmod a+x /etc/profile.d/jre180121.sh Ricaricare la varibile di sistema PATH sempre con . /etc/profile Controllare PATH con echo $PATH

Si continua indicando al sistema la posizione di java e di java webstart con

update-alternatives --install /usr/bin/java java /usr/lib/java/jre1.8.0_121/bin/java 1

update-alternatives --install /usr/bin/javaws javaws /usr/lib/java/jre1.8.0_121/bin/javaws 1

Per informare il sistema che questa sarà la versione di default di java si utilizza per il java runtine environment :

update-alternatives --set java /usr/lib/java/jre1.8.0_121/bin/java

Per il java webstart:

update-alternatives --set javaws /usr/lib/java/jre1.8.0_121/bin/javaws

Per controllare versione di java attiva si può utilizzare update-alternatives –config java.  In questo caso con installato anche openjdk il risultato sarà:

root@debian8:/etc/profile.d# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

 Selection Path Priority Status
------------------------------------------------------------
 0 /usr/lib/java/jre1.8.0_121/bin/java 1 auto mode
* 1 /usr/lib/java/jre1.8.0_121/bin/java 1 manual mode
 2 /usr/lib/java/jre1.8.0_45/bin/java 1 manual mode

Abilitare Java in Firefox

Trattandosi di prima installazione il plugin libnpjp2.so e la directory ~/.mozilla/plugins/ non dovrebbero essere presenti. Per abilitare java in Firefox  conviene creare un file script (jre180xxplug.sh) generico che consente di gestire oltre alla prima installazione anche gli eventuali aggiornamenti. Lo script è preferebile posizionarlo nella cartella in cui abbiamo installato java jre /usr/lib/java/jre1.8.0_25/jre180xxplug.sh Apriamo ad esempio con l’editor nano (il più semplice il file

su 
nano /usr/lib/java/jre1.8.0_121/jre180xxplug.sh

e incolliamo

#! /bin/bash
  if test -f  ~/.mozilla/plugins/libnpjp2.so ; then
     rm  ~/.mozilla/plugins/libnpjp2.so
     ln -s /usr/lib/java/jre1.8.0_$1/lib/amd64/libnpjp2.so ~/.mozilla/plugins/libnpjp2.so
  else
     JAVA_HOME=/usr/lib/java/jre1.8.0_$1
     MOZILLA_HOME=~/.mozilla
     mkdir $MOZILLA_HOME/plugins
     ln -s $JAVA_HOME/lib/amd64/libnpjp2.so $MOZILLA_HOME/plugins
  fi

# end
quindi rendere il file .sh eseguibile con
cd /usr/lib/java/jre1.8.0_121/
chmod a+x jre180xxplug.sh

eseguire lo script per effettuare l’abilitazione del plugin java indicando il numero di versione

 

exit 
./jre180xxplug.sh 121

Controllare e modificare la versione java in uso

Controllare la versione java con:

java -version

Verificare il funzionamento del plugin firefox e la versione utilizzano la seguente pagina Oracle

Verify Java Version

Attenzione perchè il plugin funzioni il browser deve essere riavviato e abilitato il plugin
 
Java8u25verify-activateplugin

java jre 7u51 running

 

oracle-java-version-80121

Controllare ed eventualmente cambiare versione di java utilizzare il comando

sudo update-alternatives --config java

Posts:

Rassegna Corale Don Antonio Cinto 2016

don-antonio-cinto-2016_g1_rassenga-corale-presentazione-libro
Domenica 7 Dicembre 2016 

alle ore 20.30

presso la

Chiesa Parrocchiale S. Antonio Abate
Pravisdomini

Si svolgerà la

21° Rassegna Corale
Don Antonio Cinto”

cori partecipanti

Gruppo Vocale “Citta di San Vito
San Vito al Tagliamento

organista: Luigino Favot
direttore: Gioachino Perisan

Corale “La Betulla”  – Aviano

organista: Gino del Col
direttore: Stefano Toffolo

https://i0.wp.com/web.tiscali.it/lausnova/LausNova.jpg

Corale “Laus Nova” – Pravisdomini

direttore: Maurizio Siagri

———

————————————————————————————————————

installare Postgresql 9.6 su Centos 7.4 64 bit

postgresql  go to:  PostgreSQL nel blog 

Default postgresql server in Centos 7 x86 64 is version 9.2.x

to install postgresql 9.6.x use   Postgresl yum repository.

https://www.postgresql.org/download/linux/redhat/

su -

Download and install the yum rpm PostgreSQL Repository

yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm

We can use yum list to check the package now available.

yum list postgresql*

you have to see many postgresql96 packages

Install, inizialize and start postgresql 9.6.

install the client

yum install postgresql96

Install th server postgresql 9.6 with contrib package.

yum install postgresql96-server postgresql94-contrib

Than we initialize and start postgresql-9.6

#/usr/pgsql-9.6/bin/postgresql96-setup initdb
Initializing database ... OK
# systemctl enable postgresql-9.6
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-9.6.service to /usr/lib/systemd/system/postgresql-9.6.service.

# systemctl start postgresql-9.6

postgresql-9.6 /bin /lib /doc /share are in directory

/usr/pgsql-9.6

postgresql-9.6 data are in directory

/var/lib/pgsql/9.6

check that everything is OK

su - postgres  
pslq -l

we have to see a list of 3 databases

Firewall

Open postgresql port 5432 in Iptables Firewall

with editord vi, cmedit nano edit file /etc/sysconfig/iptables  :
vi -w /etc/sysconfig/iptables

# add next commit row

-A INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT

restart iptables firewall

Configure postgres set superuser postgres password

# switch to postgres user

  su - postgres

# open postgresql cli as postgres and connect to the postgres database

  psql postgres

# set the password of user postgres using alter

 ALTER USER postgres WITH PASSWORD 'your-postgres-password';

Setting pg_hba.conf
pg_hba.conf say postgresql which users can access which databases and how they can do. ( centos/redhat location /var/lib/pgsql/9.4/data/pg_hab.conf)

so we change METHOD to md5 for IPv4 and IPv5 local connections
then we can add other ipv4 connection as

host    all         all         192.168.1.0/24        md5

at the end we can have something like this

# TYPE  DATABASE    USER        CIDR-ADDRESS               METHOD                    
                                                                                
# "local" is for Unix domain socket connections only                            
local   all         all                                      peer    
# IPv4 local connections:                                                       
host    all         all           127.0.0.1/32               ident
host    all         all           192.168.1.0/24             md5      
# IPv6 local connections:                                                       
host    all         all           ::1/128                    ident                     
# Allow replication connections from localhost, by a user with the              
# replication privilege.                                                        
#local   replication     postgres                            peer           
#host    replication     postgres        127.0.0.1/32        ident          
#host    replication     postgres        ::1/128             ident  

In order for the change to take effect we have to

reload pg_hba.conf
from the postgresql cli

 postgres=# select pg_reload_conf();

from the shell as postgres user ( su – postgres ) pg_ctl reload

Setting postgresq.conf
In this file we can configure remote access to postgresql
(centos/redhat location: /var/lib/pgsql/9.4/data/postgresql.conf  )

look for listen_address in connections and authentication section.
to enable remote connections uncomment and change listen_address that by default is ‘localhost’ so access is limited to local machine.
So at the and listen_addresses look like*

listen_addresses = '*'

It is possible to set the listen_address to specific IPs using a comma separate list.

Restart postgresql con

servicectl  postgresql restart

Now if you want you can change post value

port=  5432
Change port value 
Default port value for postgresql is 5432
Usually to change port value (ex:5433 ) we have to uncomment and to modify
# port= 5432
to
port= 5433
in Centos 7 we have to do another step we have to create the file /etc/sysconfig/pgsql/postgresql-9.4 with
PGPORT=5433
export PGPORT
touch /etc/sysconfig/pgsql/postgresql-9.6
echo ‘PGPORT=5433’ >> /etc/sysconfig/pgsql/postgresql-9.6
echo ‘export PGPORT’ >> /etc/sysconfig/pgsql/postgresql-9.6

If port change you have to change iptables firewall setting and restart postgresql.

we can check changes in postgesql cli :

# show listen_addresses;
# show port;

we can also do another check as root with

# netstat -nxl | grep PGSQL
netstat -nlp | grep PGSQL
unix 2 [ ACC ] STREAM LISTENING 263035 /var/run/postgresql/.s.PGSQL.5432
unix 2 [ ACC ] STREAM LISTENING 263037 /tmp/.s.PGSQL.5432

and

# netstat -nlp | grep 5432
netstat -nlp | grep 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 28083/postmaster 
tcp6 0 0 :::5432 :::* LISTEN 28083/postmaster 
unix 2 [ ACC ] STREAM LISTENING 263035 28083/postmaster /var/run/postgresql/.s.PGSQL.5432
unix 2 [ ACC ] STREAM LISTENING 263037 28083/postmaster /tmp/.s.PGSQL.5432

Postgres blog’s post: