Archiwa autora: djanicki

SSL – HTTS – Chrome

Mając Synology włączyłem HTTPS no i niestety chrome pokazywał mi żebym uważał bo strona ma niepoprawny certyfikat. Zaimportowałem certyfikat jako zaufany a on nadał to samo. Sprawdziłem wszytsko i certyfikat był poprawny, w IE działało a uparte chrome swoje: err_cert_common_name_invalid.

Czytaj dalej

dane w znaku zachęty

Aby z znaku zachęty były informację dodatkowe musi być odpowiednio ustawiona zmienna PS1 np:

export PS1='\u@\h:\w \$ '

 

Jeżeli chcemy aby taka informacja była zapisana na stałe, czyli po zalogowaniu to dodajemy to do pliku ~/.bashrc jednak dodatkowo albo dodajemy wo pliku ~/.profile  wpis który ładuje pierwszy plik czyli: . „$HOME/.bashrc”  lub wpisać w ~/.profile  export PS1.

Opis zmiennych:

d – the date in „Weekday Month Date” format (e.g., „Tue May 26″)
e – an ASCII escape character (033)
h – the hostname up to the first .
H – the full hostname
j – the number of jobs currently run in background
l – the basename of the shells terminal device name
n – newline
r – carriage return
s – the name of the shell, the basename of $0 (the portion following the final slash)
t – the current time in 24-hour HH:MM:SS format
T – the current time in 12-hour HH:MM:SS format
@ – the current time in 12-hour am/pm format
A – the current time in 24-hour HH:MM format
u – the username of the current user
v – the version of bash (e.g., 4.00)
V – the release of bash, version + patch level (e.g., 4.00.0)
w – Complete path of current working directory
W – the basename of the current working directory
! – the history number of this command
# – the command number of this command
$ – if the effective UID is 0, a #, otherwise a $
nnn – the character corresponding to the octal number nnn
\ – a backslash
[ – begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
] – end a sequence of non-printing characters

Vagrant – provider – vagrant-ovirt.rb:44:in `default_provider': wrong number of arguments (given 1, expected 0) (ArgumentError)

Jeżeli podczas vagrant up dostanie się taki komunikat:

~/.vagrant.d/gems/2.4.4/gems/vagrant-ovirt-0.0.2/lib/vagrant-ovirt.rb:44:in `default_provider': wrong number of arguments (given 1, expected 0) (ArgumentError)
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/plugin/v2/command.rb:177:in `block in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/plugin/v2/command.rb:204:in `block in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/plugin/v2/command.rb:186:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/plugin/v2/command.rb:186:in `with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/plugins/commands/up/command.rb:87:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/cli.rb:58:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/environment.rb:291:in `cli'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/bin/vagrant:182:in `<main>'

Można obejść to na dwa sposoby:

vagrant up –provider virtualbox

lub

zmieniając w pliku ~/.vagrant.d/gems/2.4.4/gems/vagrant-ovirt-0.0.2/lib/vagrant-ovirt.rb w linii 44:

def default_provider

na

def self.default_provider

linux – chmod -x /user/bin/chmod

ostatnio ktoś zapytał co zrobić jak wykonałem „chcący” coś takiego:

>chmod -x /user/bin/chmod

Pierwsze co mi przyszło do głowy to wymusić to w bash, jednak skompilowane aplikacje muszą mieć bit wykonywalności aby się wykonały. Można oczywiście wykorzystać inne języki skryptowe aby nadać ten bity wykonywalności np w perl to by było:
Czytaj dalej

Instalacja usługi gościa na virtualbox

Na podniesionej maszynie centos montujemy w wirtualnym CD obraz instalacji wybierając Urządzenie -> Zamontuj obraz płyty z dodatkami gościa…

1493110789660-275

Przechodzimy do maszyny wirtualnej i jako root wykonujemy:

1.     Instalacja potrzebnych zależności:

yum install bzip2 gcc make kernel kernel-headers kernel-devel

2.     Restart

reboot

3.     Montujemy cdrom:

mount /dev/cdrom /mnt/

4.    Wykonujemy instalacje gościa:

# /mnt/VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 5.1.14 Guest Additions for Linux………..
VirtualBox Guest Additions installer
Removing installed version 5.1.14 of VirtualBox Guest Additions…
Copying additional installer modules …
Installing additional modules …
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.

5.    Restartujemy serwisy:

# service vboxadd-service restart
# service vboxadd restart

Jenkins – instalacja

Od jakiegoś czasu siedzę już w tematyce DevOps CI CD. Postanowiłem sobie ułożyć kilka rzeczy w głowie i zacznę od Jenkins’a. Uważam że jest to podstawowe narzędzie do Continuous Integration / Continuous Delivery i Continuous Deployment. Wpisuje się także bardzo dobrze w DevOps gdyż jest narzędziem który wspomaga zarówno system deweloperski i eksploatacyjny. Z jednego miejsca można zarządzać pobranie wystawionego na github oprogramowania, sprawdzić czy jest poprawne pod względem możliwości skompilowania, skompilować, wdrożyć w system testowy, przeprowadzić testy, wdrożyć w system produkcyjny. Ostatnia cześć jednak jest lepiej jak dzieje się już nie automatycznie a zaplanowana przez administratorów. Opis dotyczy Jenkins 2.89.4.

Czytaj dalej