setting up your image for a cloud using cloud-init

Currently, some links on how to create a cloud image.

https://cloudinit.readthedocs.io/en/latest/topics/examples.html

https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v1.html#more-examples

https://www.lisenet.com/2017/centos-7-server-hardening-guide/

https://rharmonson.github.io/cos7inst.html

https://access.redhat.com/discussions/664843

https://ask.openstack.org/en/question/63589/centos-7-password-issue-for-guest-image-kindly-suggest/

https://ask.openstack.org/en/question/60803/any-openstack-centos-image-with-a-set-password-i-can-use/

Customised keyboard layout

It took me a long time to get a correct keyboard layout for myself. First, it was Physical keyboard layout which was bad (I had ANSI one)! So my friend spotted me to different standards: can be seen here. Later when I got correct Physical layout (with BIG ENTER key) (Drevo BladeMaster Pro). Still something was bad… I started to search for correct SW layout, I want to have EN letters by default and my language special chars and Russian(Phonetic) layout at the same time, so I do not need to switch between!

Windows came with a solution named: Microsoft Keyboard Layout Creator 1.4! Yes, this was a great thing! I have set up my own keyboard layout! I was so amazed! So there is my creation 🙂 LT-RU(phonetic) still need some work to improve 🙂 You can get it here 🙂

WAIT! What about Linux?! how to do it?! Em simple, something like this:
https://michal.kosmulski.org/computing/articles/custom-keyboard-layouts-xkb.html and https://wiki.debian.org/Keyboard . Still haven’t done, will share once done 🙂

iptables taisykles part2

iptables –A OUTPUT -p tcp -m multiport --dport http,https -i eth0 -o eth1 -m time --timestart 12:00 –-timestop 13:00 –d
31.13.64.0/18 -j ACCEPT
iptables -A INPUT -p udp -m time --timestart 02:00 --timestop 03:00 -j DROP
iptables –A INPUT –p tcp –syn -m multiport -–dport http,https –m connlimit -–connlimit-above 20 –j REJECT -–reject-with-tcp-reset

iptables -L -nv --line-numbers

Keliu monitoriu reguliavimas su xrandr

Sveiki,

Dvieju monitoriu konfiguravimas per cmd be admin teisių.

Pradžiai pažiūrėkim kokius monikus mes matom:


xrandr


Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192
VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 443mm x 249mm
1600x900 60.0 +
1280x1024 75.0 60.0*
1152x864 75.0
1024x768 75.1 60.0
800x600 75.0 60.3
640x480 75.0 60.0
720x400 70.1
HDMI1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
1280x1024 60.0*+ 75.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 72.8 75.0 66.7 60.0
720x400 70.1
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)


Ir pasitvarkom kaip mums reikia:


xrandr –output VGA1 –left-of HDMI1


Kopija iš: Dual Monitors not working since upgrading to KDE 4.10

Grub2 boot debian and debian-kfreebsd

menuentry ‘Debian GNU/kFreeBSD, with kFreeBSD 9.0-2-amd64′ –class debian –class gnu-kfreebsd –class gnu –class os {
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
echo ‘Loading kernel of FreeBSD 9.0-2-amd64 …’
kfreebsd /r/@/boot/kfreebsd-9.0-2-amd64.gz
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
kfreebsd_module_elf /r/@/lib/modules/9.0-2-amd64/opensolaris.ko
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
kfreebsd_module /r/@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
kfreebsd_module_elf /r/@/lib/modules/9.0-2-amd64/zfs.ko
set kFreeBSD.vfs.root.mountfrom=zfs:p/r
set kFreeBSD.vfs.root.mountfrom.options=rw
}
menuentry ‘Debian GNU/kFreeBSD, with kFreeBSD 9.0-2-amd64 (recovery mode)’ –class debian –class gnu-kfreebsd –class gnu –class os {
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
echo ‘Loading kernel of FreeBSD 9.0-2-amd64 …’
kfreebsd /r/@/boot/kfreebsd-9.0-2-amd64.gz -s
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
kfreebsd_module_elf /r/@/lib/modules/9.0-2-amd64/opensolaris.ko
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
kfreebsd_module /r/@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
insmod part_msdos
insmod zfs
set root='(/dev/ada0,msdos3)’
search –no-floppy –fs-uuid –set=root ffdedb2e77090087
kfreebsd_module_elf /r/@/lib/modules/9.0-2-amd64/zfs.ko
set kFreeBSD.vfs.root.mountfrom=zfs:p/r
set kFreeBSD.vfs.root.mountfrom.options=rw
}
menuentry ‘Debian GNU/Linux, with Linux 3.2.0-4-686-pae’ –class debian –class gnu-linux –class gnu –class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)’
search –no-floppy –fs-uuid –set=root eb7202f2-a3a2-4d6f-81de-c5f0d72fa607
echo ‘Loading Linux 3.2.0-4-686-pae …’
linux /vmlinuz-3.2.0-4-686-pae root=UUID=c50de1a8-dc6b-4414-8f6f-d90ecd5e5209 ro quiet
echo ‘Loading initial ramdisk …’
initrd /initrd.img-3.2.0-4-686-pae
}
menuentry ‘Debian GNU/Linux, with Linux 3.2.0-4-686-pae (recovery mode)’ –class debian –class gnu-linux –class gnu –class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)’
search –no-floppy –fs-uuid –set=root eb7202f2-a3a2-4d6f-81de-c5f0d72fa607
echo ‘Loading Linux 3.2.0-4-686-pae …’
linux /vmlinuz-3.2.0-4-686-pae root=UUID=c50de1a8-dc6b-4414-8f6f-d90ecd5e5209 ro single
echo ‘Loading initial ramdisk …’
initrd /initrd.img-3.2.0-4-686-pae

supermama.lt error kodas

Šian supermama.lt forumas išmetė tokią kliadą: mySQL query error: UPDATE ibf_cache_store SET cs_array=1,cs_value='a:239:{i:74;a:40:{s:2: "id";s:2:"74";s:6: "topics";s:1:"0";s:5: "posts";s:1:"0";s:9: "last_post";s:1:"0";s:14: "last_poster_id";s:1:"0";s:4: "name";s:7: "Bendras";s:8: "position";s:1:"1";s:7: "use_ibc";s:1:"0";s:8: "use_html";s:1:"0";s:6: "status";s:1:"1";s:7: "last_id";s:1:"0";s:8: "sort_key";s:9: "last_post";s:10: "sort_order";s:3: "Z-A";s:5: "prune";s:1:"1";s:13: "preview_posts";s:1:"0";s:10: "allow_poll";s:1:"1";s:14: "allow_pollbump";s:1:"0";s:13: "inc_postcount";s:1:"1";s:9: "parent_id";s:2:"-1";s:12: "sub_can_post";s:1:"0";s:11: "quick_reply";s:1:"0";s:11: "redirect_on";s:1:"0";s:13: "redirect_hits";s:1:"0";s:20: "permission_showtopic";s:1:"0";s:13: "queued_topics";s:1:"0";s:12: "queued_posts";s:1:"0";s:12: "can_curators";s:1:"0";s:12: "can_cur_edit";s:1:"0";s:14: "can_cur_delete";s:1:"0";s:12: "can_cur_open";s:1:"0";s:13: "can_cur_close";s:1:"0";s:20: "can_cur_delete_topic";s:1:"0";s:13: "gemius_script";s:361: "<!-- (C)2008 Gemius SA - gemiusAudience / pp.supermama.lt / Bendras -->
Gal kam bus smalsu.

Šalinam gzip?! TAIP! Diegiamės pigzee?!

Sveiki,

norėdami pagreitinti archyvavimą ir išarchyvavimą pamėginkim naudoti pigz paketuką, pastarasis naudoja kelis jūsų kompo korus. Taigi kaip priversti sistemą naudoti pigz… tiesiog pašalinti gzip negalima.
dpkg-divert --package pigz --divert /bin/gzip.fufel --rename /bin/gzip
dpkg-divert --package pigz --divert /bin/gunzip.fufel --rename /bin/gunzip

tada patikrinkime ar jie perkelti?
ls -a /bin | grep -i zip ; dpkg-divert --list | grep -i zip
Jei matome sąraše:
gunzip.fufel
gzip.fufel

Dabar kurkime symlinkus:
ln -s /usr/bin/pigz /bin/gzip
ln -s /usr/bin/unpigz /bin/gunzip

taigi kaip ir viskas 🙂