Legenda (oznaczenia używane w postach) czyli lets clean this burdel

Oznaczenia używane w postach

Zwykły tekst Czcionka Georgia

apt-get install -Komenda



-ryzyko uszkodzenia systemu


-skrypt w bashu
-Ważna informacja

=====
wycinek z loga konsoli
====

nano /etc/resolv.conf plik do edycji


poniedziałek, 17 lipca 2023

slackware post install

su

pass

usermod -aG wheel username

more /etc/group   szukamy czy w grupie wheel jest nasz username

visudo odkomentowujemy wheel group

vim /etc/inittab ustawiamy runlevel   ustawienie graficznego logowania

default id runlevel ustawiamy na 4

zachowujemy plik

vim /etc/slackpkg/mirrors


odkomentowujemy najbliższy nam mirror   UWAGA TYLKO JEDEN

JEŻELI UZYWAMY SLACKWARE STABLE NIE ODBLOKOWYWAĆ CURRENT

zachowujemy plik

Teraz update gpg

slackpkg update

slackpkg install-new

slackpkg upgrade-all

cd /boot/efi/EFI/Slackware

geninitrd

eliloconfig

/usr/share/mkinitrd/mkinitrd_command_generator.sh

skopiuj co wygenerował i odpal


slackpkg clean-system <--- nie usuwamy paczek instalowanych ręcznie

reboot

piątek, 14 lipca 2023

Slackware zarządzanie pakietami

https://sbopkg.org/


ściągamy i instalujemy

installpkg sbopkg-version-noarch-1_wsr.tgz

konfig pod slacware current (jeżeli masz stable 15.0 zignoruj)

/etc/sbopkg/sbopkg.conf

REPO_BRANCH=${REPO_BRANCH:-current}

REPO_NAME=${REPO_NAME:-SBo-git}

następnie uruchom sbopkg z flagą „-r” (zdalna synchronizacja). Jeśli chcesz go używać tymczasowo, mając inne domyślne repozytorium sbopkg -V SBo-git/current -r sbopkg -V SBo-git/current -i my_package_or_queue

(do tąd)

użycie

sbopkg -r odświerza repozytorjum

sqg -p <filezilla> tworzy quene file z zależnościami


sbopkg -i filezilla Both a queuefile and a package were found with the name "filezilla". Use (Q)ueuefile, (P)ackage, or (A)bort?: q

używamy opcji q i mamy paczke zciągniętą z zależnościami

Przy okazji quene files znajdują się w /var/lib/sbopkg/quene

sbopkg -s filezilla pokaże nam readmy z ogromną ilością informacji, w tym zależnościami

żeby odsiać informacje możemy użyc sbopkg -s filezilla | grep -i requires

proste przeszukiwanie sbopkg -g filezilla , pokaże czy i w jakiej gałęzi repo jest pakiet ==================================================================================

 

https://pink-mist.github.io/sbotools/

Zciągamy instalujemy

installpkg pakiet

sboconfig -r https://slackbuilds.org/repository/15.0/

powinno też działać z 

sboconfig -r ftp://ftp.slackware.pl/pub/slackbuilds.org/slackbuilds/15.0
tworzy to /etc/sbotools/sbotools.conf z zawartością

REPO=ftp://ftp.slackware.pl/pub/slackbuilds.org/slackbuilds/15.0

sbosnap fetch zciąga zawartość repo
sbofind pakiet szuka pakietu
sbofind -i pakiet   wyświetla info pakietu
sbofind -r pakiet   wyświetla całe readmi pakietu
sbocheck odświerza repo, i listuje przestarzałe paczki
sboupgrade pakiet  uaktualnia pakiet 
sboupgrade --all uaktualnia wszystko

https://dslackw.gitlab.io/slpkg/

slpkg install <package_name>


or change the repository:

$ slpkg install <package_name> --repository=<repo_name>

You can install a whole repository with the command:


$ slpkg install '*' --repository=<repository_name>

Remove packages

To remove a package with the dependencies:


$ slpkg remove <package_name>

Search for packages

If you want to search a package from all repositories, run:


$ slpkg search <package_name> --repository='*'

Edit configuration

Edit the configuration /etc/slpkg/slpkg.toml file:


$ slpkg configs

For further information, please read the manpage:


Manpage

$ man slpkg





Slackware polonizacja

 Oczywiście najważniejsze to ustawić POLSKI w samym KDE: Menu - Ustawienia systemowe - Kraj/region i język:

1. Sekcja z lewej nr 1 - Kraj/region i język

    Zakładka "Ustawienia regionalne"

       Na górze klikam "zmień" i wybieram: "Polska"

       Na dole klikam przycisk "Dodaj język" i wybieram "Polski"

2. Sekcja z lewej nr 2 - Układ klawiatury

    Zakładka "Układ"

       Zaznaczam: "Włącz układy klawiatury"

       W polu "Model klawiatury" wybieram: "Generic 105-key (Intl) PC"

       Z tej sporej listy krajów pod "Dostępne układy" wybieram "Poland" tak, żeby znalazł się w tym oknie po prawej "Aktywne układy"

Również pliki mam tak poustawiane:


***   /etc/profile.d/lang.sh   ***

  export LANG=pl_PL.UTF-8

  export LC_ALL=pl_PL.UTF-8

  export LESSCHARSET=latin1


***   /etc/rc.d/rc.font   ***

  setfont -v lat2-16.psfu.gz


***   /etc/rc.d/rc.keymap   ***

  /usr/bin/loadkeys -u pl2.map


***   /etc/lilo.conf   ***

  append=" vt.default_utf8=1"


A jak już jesteśmy przy polskich znakach to dodam i to bo niektórzy się gubią:

==========================================================

***   /etc/fstab   ***

#dla ntfs

  /dev/sdg1     /mnt/S_500_C         ntfs-3g     user,auto,rw,umask=113,fmask=113,dmask=002,noexec,locale=pl_PL.utf8   0   0


#dla fat, np.pendrive, odtwarzacz mp3, karta pamięci

  /dev/sdf1     /mnt/usb             auto        user,noauto,rw,umask=113,fmask=113,dmask=002,shortname=winnt,noexec,utf8   0   0



Oczywiście "user" lub "users" - jak to woli ... 

A dla każdej partycji ustawiam atrybut "noexec" żeby mi się coś samo nie uruchomiło bez mojej wiedzy.

Tylko partycja "/" czyli systemowa ma taką możliwość ale tam nic się bez "roota" nie znajdzie :)


***   /etc/fstab   ***

  /dev/sda6     /home                ext4        defaults,noexec                1   2

===================================================

żródło https://forum.linux.pl/index.php?topic=16758.0

czwartek, 6 lipca 2023

Use virt-manager as a non-root user on Linux

ByJosphat Mutai-December 17, 20211271904

Hello all. I’ve been using KVM for a long time now. Every time I try to use virt-manager as a non-root user, I have to enter the sudo password. This ain’t a problem but if you use virt-manager most of the times, it can be boring and irritating.


For KVM installation, refer to our guides below.

How to install KVM on RHEL/CentOS 8, Fedora, Arch Linux, CentOS, Ubuntu/Debian, SLES

I’ll show you a simple way to use virt-manager as a non-root user, by just creating a libvirt group and adding a standard user account to it. Without wasting much time, let’s dive in.

To use virt-manager as a non-root user, follow steps below:


Step 1 – Create unix group to use

First check if group already exist, if not create it

sudo getent group | grep libvirt

Some distributions may be using libvirtd.


sudo getent group | grep libvirtd

If it doesn’t exist, add it as system group.


sudo groupadd --system libvirt

Step 2 – Add user account to the libvirt group

Now that the group is available, add your user account to the group.


sudo usermod -a -G libvirt $(whoami)

newgrp libvirt

Verify that user is added to libvirt group.


$ id $(whoami)

uid=1000(jmutai) gid=1000(jmutai) groups=1000(jmutai),998(wheel),992(kvm),988(storage),968(libvirt),108(vboxusers)

Step 3 – Edit libvirtd configuration file to add group

Open the file /etc/libvirt/libvirtd.conf for editing.


sudo vim /etc/libvirt/libvirtd.conf

Set the UNIX domain socket group ownership to libvirt, (around line 85)


unix_sock_group = "libvirt"

Set the UNIX socket permissions for the R/W socket (around line 102)

unix_sock_rw_perms = "0770"

Restart libvirt daemon after making the change.


sudo systemctl restart libvirtd.service

Check service status.


$ systemctl status libvirtd.service    

 ● libvirtd.service - Virtualization daemon

    Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)

    Active: active (running) since Fri 2019-04-19 08:48:13 EAT; 1h 16min ago

      Docs: man:libvirtd(8)

            https://libvirt.org

  Main PID: 31709 (libvirtd)

     Tasks: 26 (limit: 32768)

    Memory: 64.7M

    CGroup: /system.slice/libvirtd.service

            ├─  754 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases>

            ├─  755 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases>

            ├─  777 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/docker-machines.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─  778 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/docker-machines.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─25924 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/vagrant-libvirt.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─25925 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/vagrant-libvirt.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─25959 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/fed290.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leasesh>

            ├─25960 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/fed290.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leasesh>

            └─31709 /usr/bin/libvirtd

Step 4 – Launch virt-manager

Start Virtual Machine Manager from the command line or your Start menu.


$ virt-manager

You should be able to create a VM without getting a permission error.


use virt manager non root user

You should be able to use virt-manager as a non-root user. If not, try to read your libvirtd.conf file to see the relevant sections to modify.


Conclusion

We’ve covered how to use virt-manager as a non-root user in easy to follow steps. You may have to install KVM virtualization package group to get tools including virt-manager.