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


sobota, 30 grudnia 2017

kodeki i ine cuda fedora wszystkie wersje

su -c 'dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$
(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/
rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
 
su -c "dnf -y update"
su -c 'dnf -y install gstreamer-plugins-bad gstreamer-plugins-ugly lame faad2'
su -c 'dnf -y install ffmpeg ffmpeg-libs gstreamer-ffmpeg'
su -c 'dnf -y install libaacs libbdplus'
su -c 'rpm -ivh http://rpm.livna.org/livna-release.rpm'
su -c 'dnf -y update && dnf -y install libdvdcss'
 

jeszcze to

dnf -y install gstreamer-plugins-base gstreamer1-plugins-base gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer1-plugins-ugly gstreamer-plugins-good-extras gstreamer1-plugins-good-extras gstreamer1-plugins-bad-freeworld ffmpeg gstreamer-ffmpeg
 
https://rpmfusion.org/Configuration/  
 
i flash
 
## Adobe Repository 32-bit x86 ##
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

## Adobe Repository 64-bit x86_64 ##
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
 

czwartek, 21 grudnia 2017

Jak znaleźć datę instalacji systemu

WSZĘDZIE
dumpe2fs $(mount | grep 'on \/ ' | awk '{print $1}') | grep 'Filesystem created:'


NA KAPELUSZACH

rpm -qi basesystem       wersja długa

rpm -q basesystem --qf '%{installtime:date}\n'


Ciekawostka dump2fs i rpm - qi podają różne daty :P

sobota, 16 grudnia 2017

Resajz i kompresja zdjęć konsola rekursywnie

RESAJZ

for i in $( ls *.jpg); do convert -resize 50% $i re_$i; done

KOMPRESJA

find -type f -name "*.jpg" -exec jpegoptim --max=90 --strip-all {} \;


https://guides.wp-bullet.com/batch-resize-images-using-linux-command-line-and-imagemagick/

find /your/path/here -name '*.jpg' -size +10M -exec convert -strip -interlace Plane -resize 70% -quality 80% {} {} \;
find: ‘/your/path/here’

środa, 29 listopada 2017

Ubuntu netinstall LXQT pełen opis (SPECJALNIE DLA CZESIA)

Wchodzimy tu

http://cdimage.ubuntu.com/netboot/16.04/?_ga=2.145452148.1726552814.1511799049-1313751592.1511210622

Zaciągamy obraz o nazwie amd 64 z pod nagłówka Ubuntu 16.04 LTS (Xenial Xerus) Netboot with HWE kernel.

Plik który nas interesuje to mini.iso


Co to  jest HWE kernel?

* Jedną z bolączek Ubuntu w wersjach z długim wsparciem (LTS – Long Term Support) jest to, że niektóre elementy systemu nie są aktualizowane wystarczająco często. Oczywiście powód jest prosty – chodzi o stabilność systemu oraz oprogramowania. Jak jednak pogodzić to z galopującym rynkiem IT i pojawianiem się coraz to nowszego sprzętu, który przecież wypadałoby wspierać jak najlepiej? Niedawno pojawiło się rozwiązanie, które wyeliminuje ten problem.
Pozostaje nam wypalić płytę albo stworzyć balotowanego pendrajwa.

Jak wypalić płytę wiadomo a tak robimy pendrajwa link

Odpalamy instalacje

Wybieramy command line install


Wybieramy język polski


Zatwierdzamy ostrzeżenie o niepełnym tłumaczeniu


Wybieramy lokalizacje polska


Auto konfiguracja klawiatury ustawiamy na NIE



Ustawiamy klawiaturę na Polską



Układ klawiatury również Polski


Teraz następuje auto konfiguracja sieci


Wybieramy nazwę hosta albo pozostawiamy domyślną



Wybieramy kraj serwera lustrzanego, oczywiście, Polska


Mamy tylko jeden serwer lustrzany do wyboru, więc zatwierdzamy :)




Jeżeli nie używamy proxy wciskamy ENTER jeśli używamy tu należy je podać



Teraz instalator przez chwile zaciąga dodatkowe biblioteki

Kolejny ekran to tworzenie nowego użytkownika (np. User)


Teraz tworzymy nazwę użytkownika może to być cokolwiek , najczęściej używa się tej samej nazwy co przy tworzeniu użytkownika



Ustawienie hasło



Powtarzamy hasło



Jeśli hasło jest za słabe możemy je zatwierdzić lub wybrać mocniejsze


Teraz  możemy zaszyfrować katalog użytkownika lub nie. Szyfrowania nie polecam.




Ustawianie strefy czasowej, automatycznie ustawia sie Europa/Warszawa. Zatwierdzamy



Partycjonowanie dysku 1



Partycjonowanie dysku 2



Partycjonowanie dysku 3




Partycjonowanie dysku 4




Partycjonowanie dysku 5





Partycjonowanie dysku 6




Powtarzamy czynność do uzyskania czegoś takiego, wybieramy zakończ i zapisz zmiany





Instalator ponownie pyta o potwierdzenie zapisu układu partycji, zatwierdzamy



Zależnie od potrzeb ustawiamy sposób aktualizacji, zwykle ustawiam brak aktualizacji automatycznych.


Teraz instaluje się system bazowy







Instalujemy Grub w głównym rekordzie rozruchowym


Zatwierdzamy ustawienia zegara systemowego jako UTC


Kończenie instalacji (usuwamy nośnik instalacyjny CD / PENDRAJW USB) dajemy dalej



System zainstalowany ... wygląda tak


No nie tyle roboty i mam "dosa"... Gadaj gdzie są moje okienka!!

Okienek jeszcze nie ma, zaraz będą. Musimy się zalogować i wpisać kilka komęd
wpisujemy nasz login wciskamy enter
Podajemy hasło. (wpisywania hasła nie widać)

Jeżeli wszystko jest ok zobaczymy coś takiego

Zaczynamy pisać komendy każdą zatwierdzamy enterem

sudo -s enter
zostajemy poproszeni o podanie hasła, po jego podaniu naciskamy  enter

napis z user@ubuntu:~$ zmienił się na root@ubuntu~#  oznacza to ni mniej ni więcej to, że mamy pełne uprawnienia administracyjne świadczy o tym zarówno słowo root jak i znaczek ~#

Teraz możemy zrobić wszystko łącznie z rozwaleniem systemu.

Pierwsze dwie komendy na wszelki wypadek
apt-get update
apt-get upgrade

Teraz zależnie od posiadanego procesora Intel / AMD
apt-get install amd64-microcode

apt-get install intel-microcode

Teraz dajemy
apt-get install cups mc htop aptitude xorg sddm lxqt 

Instalacja trwa dość długo kiedy się skończy   zobaczymy
root@ubuntu~# 

Dajemy komende reboot

Po odpaleniu komputera logujemy się loginem i hasłem i znowu widzimy

dajemy komendę startx

Powinniśmy zobaczyć to 
Znaczy to że jesteśmy zalogowani do systemu w trybie graficznym.


Jeżeli jakimś cudem zobaczymy to

wtedy wystarczy podać nasze hasło i kliknąć zaloguj pokaże nam się nasz pulpit.

Przy okazji teraz już zawsze przy włączeniu komputera zobaczymy graficzny panel logowania

po zalogow
Teraz instalujemy kodeki programy multimedialne i pakiet libre office


apt-get install libreoffice-writer libreoffice-impress libreoffice-l10n-pl libreoffice-help-pl libreoffice-pdfimport vlc smplayer ubuntu-restricted-extras





źródła
*https://ubuntu.pl/czytelnia/2017/02/26/hwe-hardware-enablement-w-ubuntu-16-04/ 

sobota, 11 listopada 2017

Zciągamy zdalny katalog wgetem

 wget wget -r --level=0 -E --ignore-length -x -k -p -erobots=off -np -N http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/

wtorek, 15 sierpnia 2017

USB 3.1 Linux ubudubu i inne linuhy

https://wiki.ubuntu.com/KernelTeam/GitKernelBuild

https://www.phoronix.com/scan.php?page=news_item&px=USB3.1-More-For-Linux-4.6

wtorek, 13 czerwca 2017

Testujemy zapotrzebowanie na Ram

O ile w przypadku linuxa ciężko jest w 100 % zestandaryzować, to trzymałem się pewnych zasad, założeń.


  1. Testy odbywały się w identycznie skonfigurowanych maszynach wirtualnych
  2. Wszystkie 3 testowane systemy zostały zainstalowane ze środowiskiem xfce.
  3. Po instalacji został wykonany distro upgrade w celu synchronizacji pakietów
  4. Wszędzie ustawiono vm.swappiness = 10
  5. Jeśli był zainstalowany usunąłem compiz i jego składowe oraz daemony raid, irda, blootooth
  6. Jeżeli było to konieczne, zainstalowałem kodeki multimedialne.oraz sześć programów  xtermhtop,nomacs, libreoffice, vlc, smplayer
Specyfikacja platformy  hostującej.


System:    Host: dziadek.centos7 Kernel: 3.10.0-514.21.1.el7.x86_64 x86_64 (64 bit gcc: 4.8.5)
           Desktop: Xfce 4.12.3 (Gtk 2.24.28)
           Distro: CentOS Linux release 7.3.1611 (Core)
Machine:   Device: desktop Mobo: Gigabyte model: GA-970A-D3
           BIOS: Award v: F12 date: 09/03/2013
CPU:       Hexa core AMD FX-6100 Six-Core (-MCP-) cache: 12288 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 39868
           clock speeds: max: 3300 MHz 1: 1400 MHz 2: 1400 MHz 3: 1400 MHz
           4: 1400 MHz 5: 1800 MHz 6: 1400 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Barts LE [Radeon HD 6790]
           bus-ID: 04:00.0
           Display Server: X.org 1.17.2 drivers: ati,radeon (unloaded: modesetting,fbdev,vesa)
           tty size: 80x24 Advanced Data: N/A 
Audio:     Card-1 Advanced Micro Devices [AMD/ATI] Barts HDMI Audio [Radeon HD 6800 Series]
           driver: snd_hda_intel bus
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
           driver: snd_hda_intel bus
           Sound: ALSA v: k3.10.0-514.21.1.el7.x86_64
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Drives:    
           ID-1: /dev/sda model: ST2000DM001 size: 2000.4GB temp: 33C
           
Specyfikacja maszyn wirtualnych

hdd 60GB
Ram 2048 MB
Procesor 2 rdzeie
grafika 128MB




Jałowy pobór ram  (po odpaleniu systemu)

Mint x64 XFCE
282-287 MB

Open Suse x64 XFCE
331-332 MB

Fedora x64 XFCE
235 MB !


.
Przejrzystość instalacji. (jeśli wczoraj przesiadłeś się z Windowsa)

Kolejno

  1. mint - fedora
  2. suse
Suse tworzy  rozszerzoną partycje lvm z z serverowym układem partycji wewnątrz.
Jeżeli chcemy coś prostego
/boot
/
swap
/home 

trzeba trochę poklikać

Z mintem i fedorą tego "problemu" nie ma.
Post install
  1. suse
  2. mint
  3. Fedora
Po instalacji susła instalacja kodeków i sterowników grafiki ogranicza się do wciśnięcia kolorowych przycisków na stronie www.

Mint linijka
apt-get install xubuntu-restrictede-xtras xubuntu-restricted-addons
drivery grafiki dostępne przez graficzny aplet sterowniki.


Fedora no to tu już "litania"

https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/

https://wiki.eclipse.org/Fedora_AMD_Graphics_Drivers


centos minimal install +xfce +setup tools


nmcli d  

The ONBOOT edit may be performed (as root) and assuming the relevant device is eth0:

# cd /etc/sysconfig/network-scripts/
# sed -i -e 's@^ONBOOT="no@ONBOOT="yes@' ifcfg-eth0
As to "breaking expectations": The foregoing example uses a 'traditionally' named network device of: eth0 Other device names are also possible, including for example: em1 or p3p1 and such. Like it or not, this change in approach in interface naming is the future path for Linux. It was previewed in in the upstream's "testing distribution". See also the materials at: Dell's writeup and a blog post from an insider there.

3. But, I just want it to work and to hand-edit the configuration files

Many installations do not require the complexity of the NetworkManager tool, and use hand-edited configuration files instead. Here is a sample non NetworkManager DHCP interface configuration:

[root@example ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=dhcp
NM_CONTROLLED="no"
PERSISTENT_DHCLIENT=1
ONBOOT="yes"
TYPE=Ethernet
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="eth0"
[root@none ~]#
and a sample 'static assignment' configuration file:

[username@hostname]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:21:70:10:7E:CD"
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO=static
# BOOTPROTO=dhcp
IPADDR=10.16.1.106
NETMASK=255.255.255.0
#
#   the GATEWAY is sometimes in: /etc/sysconfig/network
GATEWAY=10.16.1.1
and then common items such as hostname and DNS servers may optionally be placed in:

[username@hostname]$ cat /etc/sysconfig/network
HOSTNAME=acme.example.com
DNS1=10.16.1.112
DNS2=8.8.8.8
## DNS2=76.242.0.28
SEARCH=example.com
The information there is 'optional' because a DHCP server can hand out these values. The initscripts are able to figure out hostname and so forth when a well-populated DNS environment exists, from PTR records and such, but some users need to manage such details manually. For more information, the full initscripts documentation files may be listed thus:

rpm -qd initscripts
even in a environment lacking the man manual reading package and its dependencies.
ping google.com
yum instal epel-release
yum --eneblerepo=epel -y groups install "Xfce"
yum check-update
   10  yum update
yum groupinstall X11
yum install setuptool -y
yum install system-config-network* -y
yum install system-config-firewall* -y
yum install system-config-securitylevel-tui -y
yum install system-config-keyboard -y
yum install ntsysv -y

środa, 7 czerwca 2017

Odchudzamy pamięciożerność minta

Po pierwsze instalujemy mint xfce.

Ustawiamy nie zepsuj mojego systemu
 po drugie

 mint update instalujemy aktualizacje
1  sudo apt-get install htop vlc smplayer xubuntu-restricted-extras qnapi nomacs mousepad
    2  sudo apt-get install htop vlc smplayer xubuntu-restricted-extras qnapi nomacs mousepad
    3  aptitude update
    4  sudo aptitude update
    5  sudo aptitude full-upgrade
    6  htop
    7  sudo apt-get remove compiz-core
    8  sudo apt-get remove mono-runtime-common gnome-orca
   gksudo gedit /etc/sysctl.conf  (in mate you use pluma instead of gedit)

-add at the bottom of that text file, the following lines (copy and paste):

#
# Reduce the swap tendency
vm.swappiness = 10



-save the file and restart the computer.




sobota, 3 czerwca 2017

Brother DCP-145C Centos 7 How To

yum check-update
yum upgrade

For Redhat based distributions and Debian base distributions greater than Ubuntu8.10, Debian5:
"ln -s /etc/init.d/cups /etc/init.d/lpd"

yum install csh or tcsh
yum install glibc.i686
yum install cups
yum install sane
yum install psutils

    Command:yum install glibc.i686
    2. Also you require to install policycoreutils-python to use semanage.
    Command:yum install policycoreutils-python
    (However if you cannot install from the above, please type the following command below on the command prompt to check the package of installation.
    Command: yum provides *bin/semanage)

mkdir  /opt/brother/scanner/brscan-skey
]# mkdir  /etc/sane.d/
]# mkdir /usr/local/Brother/sane/
]# mkdir /usr/share/ppd/

kolejność instacji paczek

1) rpm -ihv --nodeps dcp145clpr-1.1.2-2.i386.rpm
2) rpm -ihv --nodeps dcp145ccupswrapper-1.1.2-2.i386.rpm
3) rpm -ihv brscan3-0.2.11-5.x86_64.rpm
4) rpm -ihv brscan-skey-0.2.4-1.x86_64.rpm


Wyłączyć selinux chyba że komuś chce się bawić z jego ustawieniami na desktopie

restart

drukarka działa

Skaner

/etc/sane.d/dll.conf
jeśli zakomentowane odkomentować brother3

na wszelki wypadek jeśli nie ma
groupadd lp
groupadd scanner

usermod -a -G examplegroup exampleusername
usermod -a -G lp username
usermod -a -G scanner username

cd /lib/udev/rules.d/
sudo vim  nano 60-libsane.rules

#Brother DCP-145C
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="0206", ENV{libsane_matched}="yes"

restart

skaner działa dla normalnego usera

czwartek, 1 czerwca 2017

Przesiadłem się na Centosa kurna jest fajnie (narazie) Yum dla użyszkodników apta

= Some yum usage for people who know "apt" =

If you are familiar with the apt package manager on Debian/Ubuntu this page should help you transfer your knowledge to working with yum on Fedora/RHEL/CentOS/etc.

Note that this page as currently written is by non-apt experts, so there may be some mistakes.

== General points ==

 * Speed:
    * data/CPU: apt on Debian deals with roughly ~37,000 packages[1] and an extra 6,500 "provides"[2]. yum on Fedora deals with roughly 24,000 packages, 143,000 provides and 3,100,000 file provides.
    * data/Download: apt on Debian/Ubuntu tends to have three repos. "main", "updates" and "security". Download size is roughly 2MB, 0.5MB and 0.25MB. yum on Fedora tends to have "main" and "updates". Download size is roughly 15MB+(filelists~=22MB + changelog~=9MB) and 6MB+(filelists~=8MB + changelog~=3MB + updateinfo~=0.5MB). this is then just used uncompressed (). Also the Fedora "updates" repo. tends to change a lot more often. So roughly 2.75MB with 0.75MB changing for apt, and 44MB-52MB with with 6.5MB-14.5MB changing for yum.
    * data/IO: The apt data is combined into a ~18MB single file. The yum data is just uncompressed and used directly, 65MB+(filelists~=113MB + changelog~=40MB) and 25MB+(filelists~=47MB + changelog~=14MB). The dpkg DB is also significantly smaller than the rpm DB (~50MB vs. 221MB). So roughly 68MB of possible IO for apt, and 312MB-472MB of possible IO for yum.

 * Caching: apt uses manual caching and yum uses automatic caching. In the configuration section below we explain how you can convert to manual caching.

 * Packaging: apt is packaged in the "apt-get" package, and extended through a number of "apt-*" packages (like apt-file). yum is packages as "yum" and extended via. "yum-utils" and a number of plugins "yum-plugin-*" and "yum-*-plugin" and also a number of packages that use the yum API (like mock or rhn-check).

== Simple conversion ==

For some of the basic packaging operations, apt and yum are basically identical.

 * apt-get install
   * yum install
 * apt-get upgrade
   * yum upgrade
 * apt-get remove
   * yum remove
 * apt-get --reinstall install
   * yum reinstall
 * apt-get install foo=1.0 (to downgrade to version 1.0)
   * yum downgrade foo-1.0
 * apt-get clean
   * yum clean
 * apt-get build-dep
   * yum-builddep
 * dpkg -l
   * yum list installed
 * apt-cache search
   * yum search
 * apt-cache search --names-only
   * yum list
   * repoquery
 * dpkg -L
   * rpm -ql
 * apt-file list
   * repoquery -l

== Not so simple conversions ==

These are "similar" operations, but there are some differences in how they act.

 * apt-cache show
   * yum info
   * repoquery -i
 * apt-get purge
   * yum remove
 * apt-get dist-upgrade
   * yum upgrade
   * yum distro-sync
 * apt-get source
   * yumdownloader --source
 * dpkg --get-selections
   * yum-debug-dump
 * dpkg --set-selections
   * yum-debug-restore
 * dpkg -S
   * repoquery --installed -f
   * rpm -qf
 * apt-file search
   * repoquery -f
   * yum provides
   * rpm -qf
 * apt-get --simulate upgrade
   * yum check-update
   * yum --assumeno upgrade
 * apt-get --simulate install
   * yum --assumeno install
 * sbuild
   * mock

== Groups of packages ==

In apt there is no concept of "groups", where as yum has this concept via. "yum group".

In both apt and yum you can create/use a "metapackage", which is a package which contains no data but has dependency information (normally requires on other packages). These metapackages are used in both apt and yum managed distributions to make installation simpler (Eg. xorg-x11-drivers and xserver-xorg-video-all).

Due to the lack of groups in apt metapackages are sometimes created/used with apt where a group is used in yum (Eg. @buildsys-build and build-essential). yum has specific commands which can operate on a "group id" or a translated "group name", "yum group install" "yum group remove" etc. Also the main commands can operate on groups via. the @ prefix "yum install @core" etc.

== Apt "pinning" ==

There is a concept in apt calling "pinning" which means to keep a specific package at a specific version. In yum this would generally be done via. one of a number of methods:

  * yum versionlock (from the yum-plugin-versionlock package)
  * yum-plugin-priorities configuration.
  * excluding

== General configuration ==

While there are a lot of differences between apt and yum, this tries to list the options that will make yum behave more like apt.

  * Apt uses manual caching. In yum you can set metadata_expire=never and manually run "yum makecache", note that this is rarely a good idea.

  * Apt asks for confirmation much less than yum. In yum you can set alwaysprompt=false, at which point anything that doesn't require a dependency will happen without a user confrimation.


----
{{{
[1] apt-cache dump | egrep "^Package" | wc -l

[2] apt-cache show ".*" | fgrep "^Provides" | tr , '\n' | wc -l
}}}