Pages

Showing posts with label Fedora 30. Show all posts
Showing posts with label Fedora 30. Show all posts

Monday, November 4, 2019

Fedora 30 : How to remove packages without dependency.

In this tutorial, I will show you how to remove packages without dependency.
I have this software named freecad.x86_64 and I want to remove it.
If I use the dnf tool then I got this output:
[root@desk mythcat]# dnf remove freecad.x86_64 
Dependencies resolved.
==============================================================================
 Package                       Arch   Version                  Repo      Size
==============================================================================
Removing:
 freecad                       x86_64 1:0.18.3-5.fc30.1        @updates 141 M
Removing unused dependencies:
 Coin3                         x86_64 3.1.3-24.fc30            @fedora   11 M
 OCE-foundation                x86_64 0.18.3-4.fc30            @fedora   11 M
 OCE-modeling                  x86_64 0.18.3-4.fc30            @fedora   58 M
 OCE-ocaf                      x86_64 0.18.3-4.fc30            @fedora   11 M
 OCE-visualization             x86_64 0.18.3-4.fc30            @fedora  6.7 M
 SoQt                          x86_64 1.5.0-26.fc30            @fedora  1.0 M
 assimp                        x86_64 3.3.1-19.fc30            @fedora  9.7 M
 boost-python3                 x86_64 1.69.0-8.fc30            @updates 473 k
 dotconf                       x86_64 1.3-20.fc30              @fedora   61 k
 espeak-ng                     x86_64 1.49.2-6.fc30            @fedora  6.6 M
...
The package is from Nightly FreeCAD, you can enable it if you want to install later:
[root@desk mythcat]# sudo dnf copr enable @freecad/nightly
To solve this issue you need to change this file:
[root@desk mythcat]# vim /etc/dnf/dnf.conf
From clean_requirements_on_remove=True to clean_requirements_on_remove=False.
The next commands will fix and remove the package:
[root@desk mythcat]# dnf clean all
86 files removed
[root@desk mythcat]# dnf remove freecad.x86_64 
Dependencies resolved.
==============================================================================
 Package            Architecture Version                 Repository      Size
==============================================================================
Removing:
 freecad            x86_64       1:0.18.3-5.fc30.1       @updates       141 M
Removing dependent packages:
 freecad-data       noarch       1:0.18.3-5.fc30.1       @updates       194 M

Transaction Summary
==============================================================================
Remove  2 Packages

Freed space: 335 M
Is this ok [y/N]: 
...

Sunday, November 3, 2019

Fedora 30 : Introduction to Qt Designer.

Qt Designer is the Qt tool for designing and building graphical user interfaces (GUIs) with Qt Widgets... see the Qt Designer manual webpage.
[root@desk mythcat]# dnf install qt5-designer.x86_64
...
Installed:
  qt5-designer-5.12.5-1.fc30.x86_64                                             
  qt5-qttools-libs-designercomponents-5.12.5-1.fc30.x86_64                      

Complete!
Let's start this tool with this command:
[mythcat@desk ~]$ designer-qt5 
Follow this video tutorial from my youtube channel:

You can preview your work with Ctrl+R keys.
After you finish with the project then save the file with this name: mytest.ui.
The next command to create your working python file named mytest.py.
Use this command with the -x option creates the main section to the my.py file that will allow us to test quickly whether the GUI looks as we intended.
[mythcat@desk ~]$ pyuic5 -x  mytest.ui -o mytest.py
Now you can run it to see the output:
[mythcat@desk ~]$ python3  mytest.py

Fedora 30 : About Simple Screen Recorder tool.

The Simple Screen Recorder tool can be easily installed on Fedora 30 and provide a GUI interface for recording screen with audio input. Use the dnf tool to install it:
[root@desk mythcat]# dnf install simplescreenrecorder.x86_64
...
Installed:
  simplescreenrecorder-0.3.11-7.fc30.x86_64                                   

Complete!
I used the LXDE Desktop Environment, see the command to identify the running desktop environment:
[mythcat@desk ~]$ echo $XDG_CURRENT_DESKTOP
LXDE
The tool can be found on Fedora main menu: Sound & Video, see the screenshot:

The tool start with this windows screen, you need to press the Continue button:

The next steps comes with configuration area for your video recorder.
I set and save my new Input profile to record an screen area.
You can use a rectangle, change the size from left to right or select the window to define the area for record video.
I change the Audio input to use my microphone.

The next step let you to set the file , video and audio settings for output. I let all with default settings.
The last step let you to see informations , preview and set the hotkeys.
I can use keyboard to start and stop recorder.

Saturday, November 2, 2019

Fedora 30 : GIMP 2.10.14 with flatpak.

Flatpak is a software utility for software deployment and package management for Linux. It is advertised as offering a sandbox environment in which users can run application software in isolation from the rest of the system. see Wikipedia .
Flatpak builds available in i386, x86-64, ARM and AArch64.
[root@desk mythcat]# dnf install flatpak.x86_64 
Last metadata expiration check: 0:27:27 ago on Fri 01 Nov 2019 11:27:47 PM EET.
Dependencies resolved.
...
Installed:
  flatpak-1.4.3-1.fc30.x86_64                                                   
  p11-kit-server-0.23.16.1-1.fc30.x86_64                                        
  xdg-desktop-portal-1.4.2-1.fc30.x86_64                                        
  xdg-desktop-portal-gtk-1.4.0-1.fc30.x86_64                                    
  flatpak-selinux-1.4.3-1.fc30.x86_64                                           
  flatpak-session-helper-1.4.3-1.fc30.x86_64                                    
  ostree-libs-2019.4-3.fc30.x86_64                                              

Complete!
The install and run of last GIMP software is easy, see commands:
[mythcat@desk ~]$ flatpak install https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so applications installed by 
Flatpak may not appear on your desktop until the session is restarted.

Required runtime for org.gimp.GIMP/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.32) found in remote
 flathub
Do you want to install it? [Y/n]: Y       

org.gimp.GIMP permissions:
    ipc                   network        x11       file access [1]
    dbus access [2]       tags [3]

    [1] /tmp, host, xdg-config/GIMP, xdg-config/gtk-3.0
    [2] org.freedesktop.FileManager1, org.gtk.vfs, org.gtk.vfs.*
    [3] stable
        ID                                    Arch   Branch Remote  Download
        ID                                    Arch   Branch Remote  Download
 1. [✓] org.gnome.Platform                    x86_64 3.32   flathub 360.0 MB / 374.0 MB
 2. [✓] org.gnome.Platform.Locale             x86_64 3.32   flathub  17.4 kB / 320.0 MB
 3. [✓] org.freedesktop.Platform.VAAPI.Intel  x86_64 18.08  flathub   1.8 MB / 1.8 MB
 4. [✓] org.freedesktop.Platform.html5-codecs x86_64 18.08  flathub   3.2 MB / 3.3 MB
 5. [✓] org.gimp.GIMP                         x86_64 stable flathub 106.5 MB / 108.9 MB

Installation complete.
[mythcat@desk ~]$ flatpak update

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the session is restarted.

Looking for updates…
Nothing to do.
[mythcat@desk ~]$ flatpak run org.gimp.GIMP//stable

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the session is restarted.

GIMP-Error: Skipping '/home/mythcat/.var/app/org.gimp.GIMP/config/GIMP/2.10/pluginrc
wrong GIMP protocol version.
...

Tuesday, October 29, 2019

Fedora 30 : 8 Gb RAM to my old hardware.

I add another DDR3 memory RAM to my hardware for Fedora distro Linux version 30.
I will try to find a CPU gen2 for 1155 socket because is an old CPU.
This is a part of fpaste command output:
[mythcat@desk ~]$ sudo fpaste --sysinfo --printonly 
=== fpaste 0.4.0.1 System Information (fpaste --sysinfo) ===
* OS Release (cat /etc/*-release | uniq):
     Fedora release 30 (Thirty)
     NAME=Fedora
     VERSION="30 (Server Edition)"
     ID=fedora
     VERSION_ID=30
     VERSION_CODENAME=""
... 
* Kernel (uname -r ; cat /proc/cmdline):
     5.3.7-200.fc30.x86_64
* Desktop(s) Installed (ls -m /usr/share/xsessions/ | sed 's/\.desktop//g' ):
     LXDE, openbox
     
* SELinux Status (sestatus):
     SELinux status:                 enabled
     SELinuxfs mount:                /sys/fs/selinux
     SELinux root directory:         /etc/selinux
     Loaded policy name:             targeted
     Current mode:                   enforcing
     Mode from config file:          enforcing
     Policy MLS status:              enabled
     Policy deny_unknown status:     allowed
     Memory protection checking:     actual (secure)
     Max kernel policy version:      31
     
* SELinux Errors (without results: "selinuxenabled && journalctl --since yesterday |grep avc: | grep 
-Eo comm="[^ ]+" | sort |uniq -c |sort -rn"):
     N/A

* CPU Model (grep 'model name' /proc/cpuinfo | awk -F: '{print $2}' | uniq -c |
         sed -re 's/^ +//' ):
     2  Intel(R) Celeron(R) CPU G1620 @ 2.70GHz
     
* 64-bit Support (grep -q ' lm ' /proc/cpuinfo && echo Yes || echo No):
     Yes
     
* Hardware Virtualization Support (grep -Eq '(vmx|svm)' /proc/cpuinfo && echo Yes || echo No):
     Yes
     
* Load average (uptime):
      21:42:37 up  2:46,  1 user,  load average: 0.42, 0.60, 0.90
     
* Memory usage (free -m):
                   total        used        free      shared  buff/cache   available
     Mem:           9694        2641        5422         189        1631        6605
     Swap:          3563           0        3563
     
* Top 5 CPU hogs (ps axuScnh | awk '$2!=3629' | sort -rnk3 | head -5):
         1000  2306 20.8  4.4 3620080 444832 ?      Sl   21:05   7:39 firefox
         1000  3497 17.2  0.0  16304  5284 pts/0    Ss   21:41   0:11 bash
         1000  2590 10.2  3.9 2825496 392932 ?      Sl   21:07   3:34 Web Content
         1000  2362  9.5  4.8 3206080 480436 ?      Sl   21:05   3:30 Web Content
         1000  2801  5.4  4.4 2989744 437088 ?      Sl   21:12   1:38 Web Content
     
* Top 5 Memory hogs (ps axuScnh | sort -rnk4 | head -5):
         1000  2362  9.5  4.8 3206080 480436 ?      Sl   21:05   3:30 Web Content
         1000  2468  3.1  4.6 2986868 466524 ?      Sl   21:05   1:09 Web Content
         1000  2801  5.4  4.4 2989744 437088 ?      Sl   21:12   1:38 Web Content
         1000  2306 20.8  4.4 3620080 444832 ?      Sl   21:05   7:39 firefox
         1000  2590 10.2  3.9 2825496 392932 ?      Sl   21:07   3:34 Web Content
...
* GL Support (glxinfo | grep -E "OpenGL version|OpenGL renderer"):
     OpenGL renderer string: NVA8
     OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.1.7
     
* Xorg errors (without results: "grep '^\[.*(EE)' /var/log/Xorg.0.log ~/.local/share/xorg/Xorg.0.log
 | cut -d ':' -f 2- "):
     N/A
   
* DNF Repositories (dnf repolist):
     repo id                     repo name                                     status
     *fedora                     Fedora 30 - x86_64                            56,582
     *fedora-modular             Fedora Modular 30 - x86_64                       135
     *rpmfusion-free             RPM Fusion for Fedora 30 - Free                  616
     *rpmfusion-free-updates     RPM Fusion for Fedora 30 - Free - Updates        290
     *rpmfusion-nonfree          RPM Fusion for Fedora 30 - Nonfree               227
     *rpmfusion-nonfree-updates  RPM Fusion for Fedora 30 - Nonfree - Updates      68
     *updates                    Fedora 30 - x86_64 - Updates                  13,734
     *updates-modular            Fedora Modular 30 - x86_64 - Updates             144
     
...
* EFI boot manager output (without results: "efibootmgr -v"):
     N/A
My test performance with octane.

Wednesday, October 16, 2019

Fedora 30 : News about python 3.8.0 and install on Linux.

The new release of python development comes today.
You can see on the official webpage the new versions of Python 3.7.5 Oct. 15, 2019 and Python 3.8.0 Oct. 14, 2019.
I wrote about how to install version 3.8.0 on Fedora 30.
See the full tutorial here.

Sunday, October 6, 2019

Fedora 30 : The paris-traceroute tool.

Today I tested two Linux tools named:paris-traceroute. This tool can be install with dnf tool. This tool named paris-traceroute was implemented by Xavier Cuvellier. Debugged and enhanced by Brice Augustin. The techniques invented by the authors of Paris-traceroute to enumerate the paths of ECMP flow-based load balancing. I used the 8.8.8.8 address to test this tool.
[root@desk mythcat]# paris-traceroute 8.8.8.8 -p icmp
...
[root@desk mythcat]# paris-traceroute 8.8.8.8 -i
...
[root@desk mythcat]# paris-traceroute 8.8.8.8 -l
...
Using the verbose mode the tool will print debug messages:
[root@desk mythcat]# paris-traceroute 8.8.8.8 -v
[DEBUG](Options.cc, 222)dst_addr = 8.8.8.8
[DEBUG](Options.cc, 340)protocol     = udp
[DEBUG](Options.cc, 341)src_add      = 
[DEBUG](Options.cc, 342)dst_addr     = 8.8.8.8
[DEBUG](Options.cc, 343)ttl_initial  = 1
[DEBUG](Options.cc, 344)ttl_max      = 30
[DEBUG](Options.cc, 345)tos          = 0
[DEBUG](Options.cc, 346)probe_length = 0
[DEBUG](Options.cc, 347)algo         = hopbyhop
[DEBUG](Options.cc, 348)timeout      = 5000
[DEBUG](Options.cc, 349)delay        = 50
[DEBUG](Options.cc, 350)max_try      = 3
[DEBUG](Options.cc, 351)max_missing  = 3
[DEBUG](Options.cc, 352)id_initial   = 1
[DEBUG](Options.cc, 353)resolve      = true
[DEBUG](Options.cc, 354)ipid         = false
[DEBUG](Util.cc, 246)p_proto = 1
[INFO](Server.cc, 216)waiting for the first packet..

[INFO](TracertImpl.cc, 48)HopByHop algo
[INFO](TracertImpl.cc, 183)Send probe, ttl=1, id=1
[DEBUG](UDPProbe.cc, 247)==> UDP Probe :
[DEBUG](IP4Header.cc, 346)IP4 header :
[DEBUG](IP4Header.cc, 347)tos                = 0
[DEBUG](IP4Header.cc, 348)total_length       = 30
[DEBUG](IP4Header.cc, 349)ttl                = 1
[DEBUG](IP4Header.cc, 350)protocol           = 17
[DEBUG](IP4Header.cc, 353)source_address     = 
[DEBUG](IP4Header.cc, 355)dest_address       = 8.8.8.8
[DEBUG](UDPHeader.cc, 143)UDP header :
[DEBUG](UDPHeader.cc, 144)source_port        = 
[DEBUG](UDPHeader.cc, 145)dest_port          = 
[DEBUG](UDPHeader.cc, 146)datagram_length    = 10
[DEBUG](UDPHeader.cc, 147)checksum           = 12584
[DEBUG](UDPProbe.cc, 250)Data :
[DEBUG]0x01 0x00 
[DEBUG]0x45 0x00 0x00 0x1e 0x00 0x01 0x00 0x00 
[DEBUG]0x01 0x11 0x00 0x00 0xc0 0xa8 0x00 0x8f 
[DEBUG]0x08 0x08 0x08 0x08 0x82 0xb0 0x82 0xb1 
[DEBUG]0x00 0x0a 0x28 0x31 0x01 0x00 
[INFO](Server.cc, 276)Captured first packet!

[DEBUG](Server.cc, 280)Incoming message :
[DEBUG](Server.cc, 281)parsing.. ef72baa0 58
[DEBUG]0x45 0xc0 0x00 0x3a 0x5c 0xcd 0x00 0x00 
[DEBUG]0x40 0x01 0x9b 0x55 0xc0 0xa8 0x00 0x01 
[DEBUG]0xc0 0xa8 0x00 0x8f 0x0b 0x00 0xc6 0x62 
[DEBUG]0x00 0x00 0x00 0x00 0x45 0x00 0x00 0x1e 
[DEBUG]0x00 0x01 0x00 0x00 0x01 0x11 0xe8 0x87 
[DEBUG]0xc0 0xa8 0x00 0x8f 0x08 0x08 0x08 0x08 
[DEBUG]0x82 0xb0 0x82 0xb1 0x00 0x0a 0x28 0x31 
[DEBUG]0x01 0x00 
[DEBUG](Server.cc, 285)Incoming message parsed :
[DEBUG](IP4Header.cc, 346)IP4 header :
[DEBUG](IP4Header.cc, 347)tos                = 192
[DEBUG](IP4Header.cc, 348)total_length       = 58
[DEBUG](IP4Header.cc, 349)ttl                = 64
[DEBUG](IP4Header.cc, 350)protocol           = 1
[DEBUG](IP4Header.cc, 353)source_address     = 
...
You can see more about this tool here. Another tool is dublin-traceroute works like paris-traceroute but introduces a new technique for NAT detection ( this is not in the Fedora repo).

Sunday, September 22, 2019

Fedora 30 : Detect hardware issues.

You can detect your hardware and read the health of your system using many commands and tools.
Today I show you these tools: lm_sensors-sensord.x86_64 and lshw.
[root@desk mythcat]# dnf install lm_sensors-sensord.x86_64 
...
Installed:
  lm_sensors-sensord-3.5.0-6.fc30.x86_64       rrdtool-1.7.2-1.fc30.x86_64      
  libdbi-0.9.0-13.fc30.x86_64                 

Complete!
...
[root@desk mythcat]# dnf install lshw
Last metadata expiration check: 0:50:16 ago on Sun 22 Sep 2019 10:27:55 PM EEST.
Dependencies resolved.
================================================================================
 Package       Architecture    Version                   Repository        Size
================================================================================
Installing:
 lshw          x86_64          B.02.18-21.fc30           updates          315 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 315 k
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
lshw-B.02.18-21.fc30.x86_64.rpm                 598 kB/s | 315 kB     00:00    
--------------------------------------------------------------------------------
Total                                            56 kB/s | 315 kB     00:05     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : lshw-B.02.18-21.fc30.x86_64                            1/1 
  Running scriptlet: lshw-B.02.18-21.fc30.x86_64                            1/1 
  Verifying        : lshw-B.02.18-21.fc30.x86_64                            1/1 

Installed:
  lshw-B.02.18-21.fc30.x86_64                                                   

Complete!
First, use this command to select and setup the sensors:
[root@desk mythcat]# sensors-detect
# sensors-detect revision $Revision$
# System: Gigabyte Technology Co., Ltd. Z68P-DS3
# Kernel: 5.2.13-200.fc30.x86_64 x86_64
# Processor: Intel(R) Celeron(R) CPU G1620 @ 2.70GHz (6/58/9)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
...

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

Driver `it87':
  * ISA bus, address 0x290
    Chip `ITE IT8728F Super IO Sensors' (confidence: 9)

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): YES
Unloading i2c-dev... OK
The output of sensors can be show like this:
[root@desk mythcat]# sensors
it8728-isa-0290
Adapter: ISA adapter
in0:          +1.04 V  (min =  +0.00 V, max =  +3.06 V)
in1:          +2.00 V  (min =  +0.00 V, max =  +3.06 V)
in2:          +2.98 V  (min =  +0.00 V, max =  +3.06 V)
in3:          +2.96 V  (min =  +0.00 V, max =  +3.06 V)
in4:          +0.00 V  (min =  +0.00 V, max =  +3.06 V)  ALARM
in5:          +0.70 V  (min =  +0.00 V, max =  +3.06 V)
in6:          +1.52 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:         +3.38 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:         +3.00 V  
fan1:        1180 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:           0 RPM  (min =    0 RPM)
temp1:        +37.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        +25.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:        +25.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = Intel PECI
intrusion0:  ALARM

nouveau-pci-0500
Adapter: PCI adapter
GPU core:     +0.90 V  (min =  +0.85 V, max =  +1.00 V)
temp1:        +42.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +37.0°C  (high = +85.0°C, crit = +105.0°C)
Core 0:        +36.0°C  (high = +85.0°C, crit = +105.0°C)
Core 1:        +37.0°C  (high = +85.0°C, crit = +105.0°C)
Using the lshw tool:
[root@desk mythcat]# lshw
desk                        
    description: Desktop Computer
...
The tool extracts detailed information on the hardware configuration of the machine and output is shown like HTML, JSON or SQLite database, see the help:
       lshw [ -version ]

       lshw [ -help ]

       lshw [ -X ]

       lshw [  [ -html ]  [ -short ]  [ -xml ]  [ -json ]  [ -businfo ]  ]  [ -dump filename ]  [
       -class class... ]  [ -disable test... ]  [ -enable test... ]  [ -sanitize ]  [ -numeric  ]
       [ -quiet ]

Monday, September 16, 2019

Fedora 30 : Interactive learning and reinventing the wheel in programming.

Today I returned from an activity that prompted me to find a solution to display logos.
I found this GitHub repo that I read and then turned it into a single script.
It took about an hour.

Thursday, September 5, 2019

Fedora 30 : Huion graphics tablet installation.

This is an old tutorial I wrote a few days ago. You need to install the last kernel driver development and dkms according to this website.
[root@desk mythcat]# dnf install -y "kernel-devel-uname-r == $(uname -r)"
Fedora Modular 30 - x86_64                                                          14 kB/s |  25 kB     00:01    
Fedora Modular 30 - x86_64 - Updates                                                28 kB/s |  23 kB     00:00    
google-chrome                                                                      8.8 kB/s | 1.3 kB     00:00    
RPM Fusion for Fedora 30 - Free - Updates                                           12 kB/s | 6.8 kB     00:00    
RPM Fusion for Fedora 30 - Free - Updates                                          338 kB/s | 341 kB     00:01    
RPM Fusion for Fedora 30 - Free                                                     34 kB/s |  11 kB     00:00    
RPM Fusion for Fedora 30 - Nonfree - Updates                                       8.7 kB/s | 6.6 kB     00:00    
RPM Fusion for Fedora 30 - Nonfree - Updates                                        50 kB/s |  45 kB     00:00    
RPM Fusion for Fedora 30 - Nonfree                                                  15 kB/s |  11 kB     00:00    
Fedora 30 - x86_64 - VirtualBox                                                    356  B/s | 181  B     00:00    
Package kernel-devel-5.2.9-200.fc30.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@desk mythcat]# dnf install -y dkms
Last metadata expiration check: 0:01:10 ago on Sat 31 Aug 2019 12:29:01 PM EEST.
Package dkms-2.6.1-3.fc30.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Let's see if this works:
[root@desk mythcat]# xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PixArt USB Optical Mouse                  id=8    [slave  pointer  (2)]
⎜   ↳ PenTablet  Pen (0)                        id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]                                                
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]                                                
    ↳ Power Button                              id=6    [slave  keyboard (3)]                                                
    ↳ Power Button                              id=7    [slave  keyboard (3)]                                                
    ↳ AT Translated Set 2 keyboard              id=9    [slave  keyboard (3)]  
If not work test the modules:
[root@desk mythcat]# modprobe -r hid-kye hid-uclogic hid-polostar hid-viewsonic
modprobe: FATAL: Module hid-polostar not found.
[root@desk mythcat]# modprobe -r hid-kye hid-uclogic  hid-viewsonic
You can use the official GitHub project:
wget https://github.com/DIGImend/digimend-kernel-drivers/releases/download/v10/digimend-kernel-drivers-10.tar.gz
tar xf digimend-kernel-drivers-10.tar.gz
cd digimend-kernel-drivers-10
sudo dnf install -y "kernel-devel-uname-r == $(uname -r)" dkms
sudo make dkms_install

Wednesday, September 4, 2019

Fedora 30 : About the Jupyter lab tool.

The tutorial for today is about Jupiter Lab and Fedora 30. You can see an old tutorial with Fedora 29 here.
The JupyterLab is the next-generation web-based user interface for Project Jupyter.
This can be installed using conda, pip or pipenv.
I used pip3 tool for instalation process on Fedora 30 distro:
[mythcat@desk ~]$ pip3 install jupyterlab --user
...
Successfully installed Send2Trash-1.5.0 attrs-19.1.0 backcall-0.1.0 bleach-3.1.0 defusedxml-0.6.0 
ipykernel-5.1.2 ipython-7.8.0 ipython-genutils-0.2.0 jedi-0.15.1 json5-0.8.5 jsonschema-3.0.2 
jupyter-client-5.3.1 jupyter-core-4.5.0 jupyterlab-1.1.1 jupyterlab-server-1.0.6 mistune-0.8.4 
nbconvert-5.6.0 nbformat-4.4.0 notebook-6.0.1 pandocfilters-1.4.2 parso-0.5.1 pexpect-4.7.0 
pickleshare-0.7.5 prometheus-client-0.7.1 prompt-toolkit-2.0.9 ptyprocess-0.6.0 pyrsistent-0.15.4 
pyzmq-18.1.0 terminado-0.8.2 testpath-0.4.2 tornado-6.0.3 traitlets-4.3.2 wcwidth-0.1.7 
webencodings-0.5.1
[mythcat@desk ~]$ jupyter notebook --version
6.0.1
This tool browsers can be used with :Firefox, Chrome and Safari.
The tool can be start with this command:
[mythcat@desk ~]$ jupyter lab
[I 19:53:05.527 LabApp] Writing notebook server cookie secret to ...
The default browser will open a new tab and show the interface for this tool, see screenshot:
If you install a new python module then you need to close and reopen the tool.
You can run every row command with Shift+Enter keys.
When you want to close it just close the browser tab and press Ctrl+C keys.
Shutdown this notebook server (y/[n])? y
[C 20:09:00.058 LabApp] Shutdown confirmed
[I 20:09:00.304 LabApp] Shutting down 0 kernels
 To see additional kernels follow this link. The Fedora 30 comes with this kernels for Jupyter using the dnf tool:
[root@desk mythcat]# dnf search jupyter | grep kernel
Last metadata expiration check: 0:57:13 ago on Mi 04 sep 2019 19:46:15 +0300.
polymake-jupyter.noarch : Jupyter kernel for polymake
gap-pkg-jupyterkernel.noarch : Jupyter kernel written in GAP
python3-jupyter-c-kernel.noarch : Minimalistic C kernel for Jupyter
gap-pkg-jupyterkernel-doc.noarch : Jupyter kernel for GAP documentation
python3-jupyter-kernel-test.noarch : Machinery for testing Jupyter kernels via
python3-jupyroot.x86_64 : ROOT Jupyter kernel
python3-metakernel.noarch : Metakernel for Jupyter
python3-ipykernel.noarch : IPython Kernel for Jupyter
python3-octave-kernel.noarch : A Jupyter kernel for Octave
python3-metakernel-bash.noarch : A Bash kernel for Jupyter/IPython
python3-metakernel-python.noarch : A Python kernel for Jupyter/IPython
python3-spyder-kernels.noarch : Jupyter kernels for the Spyder console
python3-metakernel-echo.noarch : A simple echo kernel for Jupyter/IPython
R-IRkernel.noarch : Native R Kernel for the 'Jupyter Notebook'
Another feature of Jupyter is the ability to run it as a presentation server:
[mythcat@desk ~]$ jupyter nbconvert --generate-config
Writing default config to: /home/mythcat/.jupyter/jupyter_nbconvert_config.py
[mythcat@desk ~]$ cat /home/mythcat/.jupyter/jupyter_nbconvert_config.py
# Configuration file for jupyter-nbconvert.

#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------

## This is an application.
Change jupyter_nbconvert_config.py file by adding your settings. For example:
## Accept connections from all IPs
c.ServePostProcessor.ip = '*'

## Do not open the browser automatically
c.ServePostProcessor.open_in_browser = False
After you work with jupyter you can save it with a name like Test001 and run this command:
[mythcat@desk ~]$ jupyter nbconvert "Test001.ipynb" --to slides --post serve[NbConvertApp] 
Converting notebook Test001.ipynb to slides
[NbConvertApp] Writing 278626 bytes to Test001.slides.html
[NbConvertApp] Redirecting reveal.js requests to https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.5.0
Serving your slides at http://*:8000/Test001.slides.html
Use Control-C to stop this server
The result of the HTML presentation can be see at http://localhost:8000/Test001.slides.html#.

Fedora 30 : The last Krita version.

Today I will show you how to use the last version of Krita with Fedora 30 distro. First, download the app image application Krita from the official website. The AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application. In the folder where is the download you need to set it executable:
[mythcat@desk ~]$ chmod +x krita-4.2.5-x86_64.appimage 
[mythcat@desk ~]$ ./krita-4.2.5-x86_64.appimage 
This version 4.2.5 work very well with Fedora 30 distro.

Tuesday, September 3, 2019

Fedora 30 : Few commands for Fedora distro.

In this tutorial, I will show these commands for Fedora distro and what information can provide to users. First is lspci:
[root@desk mythcat]# lspci 
...
05:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
[root@desk mythcat]# echo 1 > /sys/bus/pci/devices/0000\:0
0000:00:00.0/ 0000:00:1b.0/ 0000:00:1c.4/ 0000:00:1f.2/ 0000:05:00.0/
0000:00:02.0/ 0000:00:1c.0/ 0000:00:1d.0/ 0000:00:1f.3/ 0000:05:00.1/
0000:00:16.0/ 0000:00:1c.2/ 0000:00:1e.0/ 0000:02:00.0/ 
0000:00:1a.0/ 0000:00:1c.3/ 0000:00:1f.0/ 0000:03:00.0/ 
[root@desk mythcat]# echo 1 > /sys/bus/pci/devices/0000\:05\:00.1/remove
[root@desk mythcat]# lspci 
...
05:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
[root@desk mythcat]# echo 1 > /sys/bus/pci/rescan
[root@desk mythcat]# lspci -x -s 05:00.0
05:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
00: de 10 65 0a 07 04 10 00 a2 00 00 03 01 00 80 00
10: 00 00 00 f9 0c 00 00 d0 00 00 00 00 0c 00 00 ee
20: 00 00 00 00 01 df 00 00 00 00 00 00 42 38 11 13
30: 00 00 00 00 60 00 00 00 00 00 00 00 0c 01 00 00

[root@desk mythcat]# lspci -x -s 05:00.1
05:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
00: de 10 e3 0b 06 00 10 00 a1 00 03 04 01 00 80 00
10: 00 00 00 fa 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 42 38 11 13
30: 00 00 00 00 60 00 00 00 00 00 00 00 05 02 00 00
The next is dmesg: This NVIDIA Audio Controller detection has this output on dmesg:
[root@desk mythcat]# dmesg | grep 05:00.1
[    0.375902] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[    0.375929] pci 0000:05:00.1: reg 0x10: [mem 0xfaffc000-0xfaffffff]
[    0.376002] pci 0000:05:00.1: enabling Extended Tags
[ 2077.961694] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[ 2077.961730] pci 0000:05:00.1: reg 0x10: [mem 0xfaffc000-0xfaffffff]
[ 2077.962138] pci 0000:05:00.1: BAR 0: assigned [mem 0xfa000000-0xfa003fff]
[ 2423.644523] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[ 2423.644559] pci 0000:05:00.1: reg 0x10: [mem 0xfa000000-0xfa003fff]
[ 2423.644968] pci 0000:05:00.1: BAR 0: assigned [mem 0xfa000000-0xfa003fff]
[ 2517.259902] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[ 2517.259939] pci 0000:05:00.1: reg 0x10: [mem 0xfa000000-0xfa003fff]
[ 2517.260342] pci 0000:05:00.1: BAR 0: assigned [mem 0xfa000000-0xfa003fff]
The echo command can show information or set some issues :
[root@desk mythcat]# echo 1 > /sys/bus/pci/devices/0000:05:00.1/remove
[root@desk mythcat]# lspci -x -s 05:00.1
[root@desk mythcat]# 
Let's see
[root@desk mythcat]# lspci -v | grep -A7 -i "audio"
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio 
Controller (rev 05)
        Subsystem: Gigabyte Technology Co., Ltd Device a002
        Flags: bus master, fast devsel, latency 0, IRQ 3
        Memory at fbff4000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
        Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
--
05:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
        Subsystem: eVga.com. Corp. Device 1311
        Flags: bus master, fast devsel, latency 0, IRQ 5
        Memory at faffc000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
The systemctl can help with Fedora settings:
[root@desk mythcat]# systemctl status alsa-state.service
● alsa-state.service - Manage Sound Card State (restore and store)
   Loaded: loaded (/usr/lib/systemd/system/alsa-state.service; static; vendor preset: disabled)
   Active: inactive (dead)
[root@desk mythcat]# systemctl start alsa-state.service
[root@desk mythcat]# systemctl status alsa-state.service
● alsa-state.service - Manage Sound Card State (restore and store)
   Loaded: loaded (/usr/lib/systemd/system/alsa-state.service; static; vendor preset: disabled)
   Active: active (running) since Thu 2019-08-29 13:53:58 EEST; 1s ago
 Main PID: 2951 (alsactl)
    Tasks: 1 (limit: 1942)
   Memory: 1.3M
   CGroup: /system.slice/alsa-state.service
           └─2951 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf 
--initfile=/lib/alsa/init/00main >

Aug 29 13:53:58 desk systemd[1]: Started Manage Sound Card State (restore and store).
Aug 29 13:53:58 desk alsactl[2951]: alsactl 1.1.9 daemon started
Aug 29 13:53:58 desk alsactl[2951]: /usr/sbin/alsactl: load_state:1735No soundcards found...
[root@desk mythcat]# systemctl status alsa-restore.service
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: inactive (dead)
[root@desk mythcat]# systemctl start alsa-restore.service
[root@desk mythcat]# systemctl status alsa-restore.service
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: inactive (dead)

Aug 29 13:58:53 desk systemd[1]: Condition check resulted in Save/Restore Sound Card State being skipped.
The hostnamectl command for Fedora workstations:
[root@desk mythcat]# hostnamectl set-hostname  new_hostname
The last is the common dnf command:
[root@desk mythcat]# dnf

Saturday, August 31, 2019

Fedora 30 : Rollback to Fedora 30.

In this tutorial, I will show you how to rollback from a bad distro update of Fedora 31 to the old one Fedora 30.
If you follow this tutorial and you got errors then your dnf tool will have problems with update process.
After I follow the tutorial I got many packages and errors.
I try to fix with this but not work:
[root@desk mythcat]# dnf system-upgrade download --refresh --releasever=31
--setopt=module_platform_id=platform:f31 --skip-broken
Before you continue to ensure that your system is fully upgraded by running "dnf
--refresh upgrade". Do you want to continue [y/N]: y
...
Because the Fedora 31 is not available I need to roll back to my old Fedora 30. This are steps I used to fix this issue:
[root@desk mythcat]# pkcon refresh force -c -1
[root@desk mythcat]# dnf --releasever=30 --allowerasing downgrade fedora
[root@desk mythcat]# dnf clean all --releasever=32
[root@desk mythcat]# dnf clean all --releasever=31
[root@desk mythcat]# dnf clean all --releasever=30
The pkcon tool refresh the cached information about available updates and set the maximum acceptable age for cached metadata, in seconds.
The option of dnf tool clean all --releasever=32 will clean all packages from fc32.
I used this command to see what packages with errors and the repo with problems:
[root@desk mythcat]# dnf --releasever=30 --allowerasing downgrade fedora
...
The result was rawhide repo and I remove it:
[root@desk mythcat]# ls -l /etc/yum.repos.d/
[root@desk mythcat]# rm /etc/yum.repos.d/fedora-rawhide.repo 
[root@desk mythcat]# rm /etc/yum.repos.d/fedora-rawhide-modular.repo 
After that I reboot my distro and I used dnfdragora with my repos to test it.

Friday, August 30, 2019

Fedora 30 : DNF history.

This option of the tool DNF can help you to see and rollback by transaction history. NOTE: This option not work if you use the system-upgrade to another version of the distro.
[root@desk mythcat]# dnf
usage: dnf [options] COMMAND

List of Main Commands:

...
history                   display, or use, the transaction history
... 
This command displays DNF transaction history starting from the latest transaction on top of the listing.
[root@desk mythcat]# dnf history 
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    64 | groupupdate Minimal Inst | 2019-08-29 21:59 | Install        |    2   
    63 | groupupdate Minimal Inst | 2019-08-29 21:59 | Install        |    2   
To display information about this transaction use this command:
[root@desk mythcat]# dnf history info 64
Transaction ID : 64
Begin time     : Thu 29 Aug 2019 09:59:52 PM EEST
Begin rpmdb    : 1643:6a997d9fa53488ec0003727cb0394b18b6b4deaf
End time       : Thu 29 Aug 2019 09:59:53 PM EEST (1 seconds)
End rpmdb      : 1643:6a997d9fa53488ec0003727cb0394b18b6b4deaf
User           : Catalin George Festila 
Return-Code    : Success
Releasever     : 30
Command Line   : groupupdate Minimal Install
Packages Altered:
    Install @core                
    Install @minimal-environment 
To rollback the latest transaction use this:
[root@desk mythcat]# dnf history undo 64

Thursday, August 22, 2019

Fedora 30 : Set up the Linux Malware Detect.

If you have an SELinux warning detection then the details you can see how can be fixed:
[mythcat@desk ~]$ su
Password: 
[root@desk mythcat]# ausearch -c 'systemd' --raw | audit2allow -M my-systemd
******************** IMPORTANT ***********************
To make this policy package active, execute:

semodule -i my-systemd.pp

[root@desk mythcat]# semodule -X 300 -i my-systemd.pp
This tool comes with three modes that the monitor can be executed with and they relate to what will be monitored.
These modes are USERS|PATHS|FILES.
The options break down as follows:
  • USERS: The users option will take the homedirs of all system users that are above inotify_minuid and monitor them.If inotify_webdir is set then the users webdir, if it exists, will only be monitored;
  • PATHS: A comma spaced list of paths to monitor;
  • FILE: A line spaced file list of paths to monitor
$ maldet --monitor users
$ maldet --monitor /root/initial-setup-ks.cfg
$ maldet --monitor /home/mythcat
Let's test the USERS option:
[mythcat@desk maldetect-1.6.4]$ maldet --monitor users
Linux Malware Detect v1.6.4
            (C) 2002-2019, R-fx Networks 
            (C) 2019, Ryan MacDonald 
This program may be freely redistributed under the terms of the GNU GPL v2

maldet(7958): {mon} could not find inotifywait command, install yum package inotify-tools or 
download from https://github.com/rvoicilas/inotify-tools/wiki/


[root@desk maldetect-1.6.4]# dnf search inotify-tools
Last metadata expiration check: 0:01:39 ago on Wed 21 Aug 2019 11:09:22 PM EEST.
============================================ Name Exactly Matched: inotify-tools ======
inotify-tools.i686 : Command line utilities for inotify
inotify-tools.x86_64 : Command line utilities for inotify
================================================ Name Matched: inotify-tools ======
inotify-tools-devel.i686 : Headers and libraries for building apps that use libinotifytools
inotify-tools-devel.x86_64 : Headers and libraries for building apps that use libinotifytools
[root@desk maldetect-1.6.4]# dnf install inotify-tools.x86_64
...
Installed:
  inotify-tools-3.14-16.fc30.x86_64                                                                                          

Complete!
[root@desk maldetect-1.6.4]# maldet --monitor users
Linux Malware Detect v1.6.4
            (C) 2002-2019, R-fx Networks 
            (C) 2019, Ryan MacDonald 
This program may be freely redistributed under the terms of the GNU GPL v2

maldet(973): {mon} set inotify max_user_watches to 16384
maldet(973): {mon} added /dev/shm to inotify monitoring array
maldet(973): {mon} added /var/tmp to inotify monitoring array
maldet(973): {mon} added /tmp to inotify monitoring array
maldet(973): {mon} starting inotify process on 3 paths, this might take awhile...
maldet(973): {mon} inotify startup successful (pid: 1800)
maldet(973): {mon} inotify monitoring log: /usr/local/maldetect/logs/inotify_log

Wednesday, August 21, 2019

Fedora 30 : Testing the Linux Malware Detect.

Linux Malware Detect (LMD) is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in shared hosted environments.
This tool is provided by R-fx Networks.
Let's install and test it:
[mythcat@desk ~]$ wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
[mythcat@desk ~]$ tar -xf maldetect-current.tar.gz 
[mythcat@desk ~]$ cd maldetect-1.6.4/
[mythcat@desk maldetect-1.6.4]$ su
Password: 
[root@desk maldetect-1.6.4]# ./install.sh
Failed to enable unit: Unit file maldet.service does not exist.
Linux Malware Detect v1.6.4
            (C) 2002-2019, R-fx Networks <proj@r-fx.org>
            (C) 2019, Ryan MacDonald <ryan@r-fx.org>
This program may be freely redistributed under the terms of the GNU GPL

installation completed to /usr/local/maldetect
config file: /usr/local/maldetect/conf.maldet
exec file: /usr/local/maldetect/maldet
exec link: /usr/local/sbin/maldet
exec link: /usr/local/sbin/lmd
cron.daily: /etc/cron.daily/maldet
maldet(31046): {sigup} performing signature update check...
maldet(31046): {sigup} local signature set is version 201907043616
maldet(31046): {sigup} new signature set 2019081912001 available
maldet(31046): {sigup} downloading https://cdn.rfxn.com/downloads/maldet-sigpack.tgz
maldet(31046): {sigup} downloading https://cdn.rfxn.com/downloads/maldet-cleanv2.tgz
maldet(31046): {sigup} verified md5sum of maldet-sigpack.tgz
maldet(31046): {sigup} unpacked and installed maldet-sigpack.tgz
maldet(31046): {sigup} verified md5sum of maldet-clean.tgz
maldet(31046): {sigup} unpacked and installed maldet-clean.tgz
maldet(31046): {sigup} signature set update completed
maldet(31046): {sigup} 15552 signatures (12740 MD5 | 2035 HEX | 777 YARA | 0 USER)
[root@desk maldetect-1.6.4]# vim /usr/local/maldetect/conf.maldet
Change this row to scan_user_access=1
Now you can run it:
[mythcat@desk ~]$ /usr/local/sbin/maldet -a 
Linux Malware Detect v1.6.4
            (C) 2002-2019, R-fx Networks 
            (C) 2019, Ryan MacDonald 
This program may be freely redistributed under the terms of the GNU GPL v2

maldet(32628): {scan} signatures loaded: 15552 (12740 MD5 | 2035 HEX | 777 YARA | 0 USER)
maldet(32628): {scan} building file list for , this might take awhile...
maldet(32628): {scan} setting nice scheduler priorities for all operations: cpunice 19 , ionice 6
maldet(32628): {scan} file list completed in 13s, found 44109 files...
maldet(32628): {scan} scan of  (44109 files) in progress...

Tuesday, August 20, 2019

Fedora 30 : Install the last version of PHP.

I try to install the last version of PHP version 7.4.0beta2 with Fedora 30 distro the LXQt environment.
I have not used this programming language for a few years and it is a good issue to remember it.
I download teh archive from the official website and I run these commands:
[mythcat@desk ~]$ cd php/
[mythcat@desk php]$ tar -xf php-7.4.0beta2.tar.xz 
[mythcat@desk php]$ cd php-7.4.0beta2/
[mythcat@desk php-7.4.0beta2]$ ./configure --prefix=$HOME/local
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... no
checking for gcc... no
configure: error: in `/home/mythcat/php/php-7.4.0beta2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[mythcat@desk php-7.4.0beta2]$ vi config
[mythcat@desk php-7.4.0beta2]$ vi config
config.log    config.nice   configure     configure.ac  
[mythcat@desk php-7.4.0beta2]$ vi config.log 
Let's try to install all requests for compiler:
[root@desk home]# dnf groupinstall "Development Tools"
Let's see if these settings working well:
[root@desk home]# dnf groupinstall "Development Tools"
Waiting for process with pid 4373 to finish.
[root@desk home]# kill  -9 4373
[root@desk home]# dnf groupinstall "Development Tools"
...
Complete!
[root@desk home]# dnf install libxml2-devel.x86_64
...
Installed:
  libxml2-devel-2.9.9-2.fc30.x86_64                          xz-devel-5.2.4-5.fc30.x86_64
The last dnf command come with this output:
checking for sqlite3 > 3.7.4... no
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:

Package 'sqlite3', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix. 
Let's test it with an old version of sqlite:
[root@desk home]# dnf install sqlite-devel.x86_64 
...
Installed:
  sqlite-devel-3.26.0-6.fc30.x86_64 
And is working well:
[mythcat@desk php-7.4.0beta2]$ ./configure --prefix=$HOME/local
...
config.status: executing default commands

+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE. By continuing this installation  |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

[mythcat@desk php-7.4.0beta2]$ make 
... 

Build complete.
Don't forget to run 'make test'.
[mythcat@desk php-7.4.0beta2]$ make install
...
[mythcat@desk php-7.4.0beta2]$ make test
...
FAILED TEST SUMMARY
---------------------------------------------------------------------
php://fd wrapper: invalid file descriptor [ext/standard/tests/file/php_fd_wrapper_04.phpt]
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.  You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: s
sh: autoconf: command not found
Please send /home/mythcat/php/php-7.4.0beta2/php_test_results_20190819_2038.txt to qa-reports@lists.php.net 
manually, thank you.
make: *** [Makefile:201: test] Error 1
[mythcat@desk php-7.4.0beta2]$ export PATH=$HOME/local/bin:$PATH
[mythcat@desk php-7.4.0beta2]$ . ~/.bash_profile
[mythcat@desk php-7.4.0beta2]$ which php
~/local/bin/php
[mythcat@desk php-7.4.0beta2]$ php -v
PHP 7.4.0beta2 (cli) (built: Aug 19 2019 23:31:07) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies
Let's test it:
[mythcat@desk php-7.4.0beta2]$ php -i | grep 'API'
Server API => Command Line Interface
PHP API => 20190529
Zend Extension Build => API320190529,NTS
PHP Extension Build => API20190529,NTS
DOM/XML API Version => 20031129
Phar API version => 1.1.1
[mythcat@desk php-7.4.0beta2]$ echo '' > infophp.php
[mythcat@desk php-7.4.0beta2]$ php -f infophp.php 
phpinfo()
PHP Version => 7.4.0beta2

System => Linux desk 5.2.8-200.fc30.x86_64 #1 SMP Sat Aug 10 13:21:39 UTC 2019 x86_64
Build Date => Aug 19 2019 23:26:58
Configure Command =>  './configure'  '--prefix=/home/mythcat/local'
Server API => Command Line Interface
Virtual Directory Support => disabled
...
Use interactive mode and hit Ctr+D keys to run it:
[mythcat@desk php-7.4.0beta2]$ php -a
Interactive mode enabled


hello, world1636562552
I can see the compiled modules:
[mythcat@desk php-7.4.0beta2]$ php -m 
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]

Friday, August 16, 2019

Fedora 30 : First steps with Fedora and GitHub.

In this tutorial I will show you how you can use Fedora and your GitHub account for your projects.
Let's solve this issue in a simple way.
First, you need to install the git tool with dnf tool:
[root@desk mythcat]# dnf -y install git
Let's see the version of this tool with a regular user:
[mythcat@desk ~]$ git --version
git version 2.21.0
Let's set up the user for my GitHub account:
[mythcat@desk ~]$ git config --global user.name "catafest"
[mythcat@desk ~]$ git config --global user.email "catafest@yahoo.com"
You can see it later with this command:
[mythcat@desk ~]$ git config --list
[mythcat@desk ~]$ git config --global --list
I used this commands to create a folder for my git projects:
[mythcat@desk ~]$ mkdir project_github
[mythcat@desk ~]$ cd project_github/ 
Now I can download my GitHub project named flask_yt from here:
[mythcat@desk project_github]$ git clone https://github.com/catafest/flask_yt.git
Cloning into 'flask_yt'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 23 (delta 1), reused 14 (delta 0), pack-reused 0
Unpacking objects: 100% (23/23), done.
If you don't have one then you can create your new project on your GitHub account. Let's make some changes into README.md file:
[mythcat@desk project_github]$ cd flask_yt/
[mythcat@desk flask_yt]$ vim README.md 
...
Now I can use git tool:
[mythcat@desk flask_yt]$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")
[mythcat@desk flask_yt]$ git add *
[mythcat@desk flask_yt]$ git commit -m "first commit"
[master 56f1e53] first commit
 1 file changed, 1 insertion(+)
Now I can use my username and password from GitHub when I run this command:
[mythcat@desk flask_yt]$ git push origin master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 2 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 352 bytes | 352.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/catafest/flask_yt.git
   5ecffdd..56f1e53  master -> master 
The changes from README.md will be send to my GitHub website.

Wednesday, August 14, 2019

Fedora 30 : First steps with Fedora firewall.

In computing, a firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules.[1] A firewall typically establishes a barrier between a trusted internal network and untrusted external network, such as the Internet.[2], see the wikipedia. In this short tutorial about the Fedora firewall subject, I will show you how you can use firewall commands to set it. The install is simple with dnf tool:
[root@desk mythcat]# dnf install firewalld firewall-config 
Let's start with the status of your firewall:
[root@desk mythcat]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
...
You can use start , restart or stop it.

[root@desk mythcat]# systemctl start firewalld
[root@desk mythcat]# systemctl restart firewalld
[root@desk mythcat]# systemctl stop firewalld
Let's see active zones:
[root@desk mythcat]# firewall-cmd --get-active-zones
We can see all active for public zone with:
[root@desk mythcat]# firewall-cmd --zone=public --list-all
We can see all ports for public zone:
[root@desk mythcat]# firewall-cmd --zone=public --list-ports 
These commands are used for add and remove ports:
[root@desk mythcat]# firewall-cmd --permanent --zone=public --add-port=80/tcp
[root@desk mythcat]# firewall-cmd --permanent --zone=public --remove-port=80/tcp
Let's see services:
[root@desk mythcat]# firewall-cmd --get-services 
RH-Satellite-6 amanda-client amanda-k5-client amqp amqps apcupsd audit bacula bacula-client 
bgp bitcoin bitcoin-rpc bitcoin-testnet bitcoin-testnet-rpc ceph ceph-mon cfengine cockpit 
condor-collector ctdb dhcp dhcpv6 dhcpv6-client distcc dns docker-registry docker-swarm 
dropbox-lansync elasticsearch etcd-client etcd-server finger freeipa-ldap freeipa-ldaps 
freeipa-replication freeipa-trust ftp ganglia-client ganglia-master git gre high-availability 
http https imap imaps ipp ipp-client ipsec irc ircs iscsi-target isns jenkins kadmin kerberos 
kibana klogin kpasswd kprop kshell ldap ldaps libvirt libvirt-tls lightning-network llmnr 
managesieve matrix mdns minidlna mongodb mosh mountd mqtt mqtt-tls ms-wbt mssql murmur mysql 
nfs nfs3 nmea-0183 nrpe ntp nut openvpn ovirt-imageio ovirt-storageconsole ovirt-vmconsole 
plex pmcd pmproxy pmwebapi pmwebapis pop3 pop3s postgresql privoxy proxy-dhcp ptp pulseaudio
 puppetmaster quassel radius redis rpc-bind rsh rsyncd rtsp salt-master samba samba-client 
samba-dc sane sip sips slp smtp smtp-submission smtps snmp snmptrap spideroak-lansync squid 
ssh steam-streaming svdrp svn syncthing syncthing-gui synergy syslog syslog-tls telnet tftp 
tftp-client tinc tor-socks transmission-client upnp-client vdsm vnc-server wbem-http 
wbem-https wsman wsmans xdmcp xmpp-bosh xmpp-client xmpp-local xmpp-server zabbix-agent 
zabbix-server
Let's add and remove one service named ftp:
[root@desk mythcat]# firewall-cmd --zone=public --add-service=ftp
[root@desk mythcat]# firewall-cmd --zone=public --remove-service=ftp
Let's see all running services:
[root@desk mythcat]# firewall-cmd --zone=public --list-services
If you want to block/unblock any incoming or outgoing connections then use this:
[root@desk mythcat]# firewall-cmd --panic-on
[root@desk mythcat]# firewall-cmd --panic-off 
For example, after you use panic-on then you can check with this:
[root@desk mythcat]# ping google.com -c 1
[root@desk mythcat]# firewall-cmd --query-panic
[root@desk mythcat]# firewall-cmd --panic-off
You can masquerade your IP address with:
[root@desk mythcat]# firewall-cmd --zone=external --query-masquerade
Another example: we can forward all tcp port 80 connections to IP 6.6.6.6 :
[root@desk mythcat]# firewall-cmd --zone=public --add-forward-port=port=80:proto=tcp:toaddr=6.6.6.6
Let's see ICMP:
[root@desk mythcat]# firewall-cmd --get-icmptypes
address-unreachable bad-header beyond-scope communication-prohibited destination-unreachable 
echo-reply echo-request failed-policy fragmentation-needed host-precedence-violation 
host-prohibited host-redirect host-unknown host-unreachable ip-header-bad 
neighbour-advertisement neighbour-solicitation network-prohibited network-redirect 
network-unknown network-unreachable no-route packet-too-big parameter-problem 
port-unreachable precedence-cutoff protocol-unreachable redirect reject-route 
required-option-missing router-advertisement router-solicitation source-quench 
source-route-failed time-exceeded timestamp-reply timestamp-request tos-host-redirect 
tos-host-unreachable tos-network-redirect tos-network-unreachable 
ttl-zero-during-reassembly ttl-zero-during-transit unknown-header-type 
unknown-option
We can use it for block or not the echo:
[root@desk mythcat]# firewall-cmd --zone=external --query-icmp-block=echo-reply
[root@desk mythcat]# firewall-cmd --zone=external --add-icmp-block=echo-reply
[root@desk mythcat]# firewall-cmd --direct --get-rules ipv4 filter IN_public
[root@desk mythcat]# firewall-cmd --direct --add-rule ipv4 filter IN_public_allow 
...
I cannot show you a magic rule because this depends by your network and your software. You can use this command to see all into a graphic interface.
[root@desk mythcat]# firewall-config
This will give a good image of your firewall settings.