Skip to main content

Posts

Cheat Sheet

Bash: echo $? - exit status of last command (0 no error) ' - Single quote removes meaning special meaning of special character. find /qwe -type f -iname *.js -exec cp --parents -t /tmp/ {} + -- find all js files and copy with parent directory ystemctl set-default graphical.target (ls -l /lib/systemd/system/runlevel*) -- set runlevel echo <password> | sudo -S for i in t@01 st@02 ba@sta03;do ssh -o RequestTTY=true $i "sudo -l";done -- allow tty present VIM: :r! sed -n '16,812 p' < input_file.txt -- copy line range from input_file :1,10d -- delete line from 1 to 10 :se nu -- show line numbers Apache: Redirection in Apache (By default, the Redirect directive establishes a 302, or temporary, redirect.): URL:https://www.digitalocean.com/community/tutorials/how-to-create-temporary-and-permanent-redirects-with-apache-and-nginx <VirtualHost *:80> ServerName www.domain1.com Redirect 301 /oldlocation http://www.domain2.com/newlocation </VirtualHo...

GIT

  To share this code with your teammates, you’ll want to create a shared Git repository that you can all access. One way to do this is to use GitHub. Head over to github.com, create an account if you don’t have one already, and create a new repository. Configure your local Git repository to use the new GitHub repository as a remote endpoint named origin as follows: git remote add origin git@github.com:<YOUR_USERNAME>/<YOUR_REPO_NAME>.git git push origin main git pull origin main # Create local repo server #git init --bare  change remote repo url: git remote -v # View existing remotes # origin https://github.com/user/repo.git (fetch) # origin https://github.com/user/repo.git (push) git remote set-url origin https://github.com/user/repo2.git # Change the 'origin' remote's URL git remote -v # Verify new remote URL # origin https://github.com/user/repo2.git (fetch) # origin https://github.com/user/repo2.git (push) Git reset & revert: # restore and re...

Euro trip. Chapter1: Bucovice-Prague-Nuremberg-Leipzig-Dresden

    Begin to write something every time is complicated for me. Any way i should start. So this trip was somehow unplanned. Where to go, stay ... everything planned on way.    Trip started 2nd of July from Bucovice to Prague. Made reservation on "Hotel Globus" for one night. After check-inn we went to centre walk, see landmarks  of Prague. Additional we have a lunch at asian cafe.     3rd July. Next our plan was drove from Prague to Munich stay one night in camp hostel, visit Munich Zoo. But plans changed on way and we decided drove first Nuremberg to see my friend. Made reservation at "Azimut Hotel". As we arrived earlier check-inn was after 3PM, parked car and we decided not to waste time go and see Nuremberg. We have a lunch some soup and german sausage. And also for 30 euros we took city tour by bus about 2 hour. We saw almost whole city with information (recommended). Evening we meet my friend have a lunch thanks special thanks Fagani. Be...

Salt -- cheat sheet

      The Salt system is a Python-based open-source remote execution framework for configuration management, automation, provisioning and orchestration.  A basic Salt implementation consists of a Salt master managing one or more Salt minions.

AWS info

Virtual Servers ● EC2- the classic, the original. Virtual servers on shared hardware similar to VMWare. General purpose computing. ● Associated services: Auto Scaling Groups, Elastic Load Balancers ● Container services:○ECS - Elastic Container Service ● EKS - Elastic Kubernetes Service ● Fargate - Serverless Containers ● Lightsail - actually EC2's but simple as heck Code As A Service ● Lambda - executes individual functions (in a variety of programming languages) on an ad-hoc on-demand basis and you pay by the millisecond of elapsed compute time○Go, Rust, Java, .NET, Python, Node, Ruby, or custom runtimes ● The glue that holds AWS together○Dozens of other services have “hooks” such that “when XYZ event occurs, run this Lambda” ● Little code snippets can augment your S3 buckets, Cognito user pools, SQS queues, and so many more Bundling Services That Deploy Applications With Compute Under The Hood ● Elastic Beanstalk - upload application packages and it provisions Elastic Load Bala...

Service Hosting - KVM documentation

Host System Requirements: Minimum host system requirements 6 GB free disk space. 2 GB RAM. Recommended system requirements One core or thread for each virtualized CPU and one for the host. 2 GB of RAM, plus additional RAM for virtual machines. 6 GB disk space for the host, plus the required disk space for the virtual machine(s). KVM Hypervisor Requirements: an Intel processor with the Intel VT-x and Intel 64 virtualization extensions for x86-based systems; or an AMD processor with the AMD-V and the AMD64 virtualization extensions. Installing the Virtualization Packages: To use virtualization on OL7, at minimum, you need to install the following packages: # yum install qemu-kvm libvirt qemu-kvm: This package provides the user-level KVM emulator and facilitates communication between hosts and guest virtual machines. qemu-img: This package provides disk management for guest virtual machines. The qemu-img package is installed as a dependency of the qemu-kvm package. libvirt: ...

Docker basic commands (podman)

  Docker basic commands. Also use full for podman.   docker search <image-name> - search for image in docker-hub   docker run <options> <image-name> - by default docker will run command foreground. For running background use -d option, - it interact with the container instead of just seeing the output, -- name option for giving friendly name when lunching container docker logs <friendly-name|container-id> - container standard err or standard out messages   docker inspect <friendly-name|container-id> - more detailed information about running container docker ps - list all running docker containers   docker run -p <host-port>:<container-port> - define ports you want to bind, when running conatiner d ocker port <friendly-name|container-id> - list port mappings or a specific port mapping for container   -v <host-dir>:<container-dir> - mounts container-dir to host-d...

3rd Month

    It's very hard for me to begin write something. I think that's in my nature. In this post i will write what happened last three month in new job. Well from my previous post i wrote my expectations for first week. Lets continue. Past three months everything dramatically changed. Year 2020 show us another face of life.  Everyone knows new terminology COVID-19. That's root of changes. Quarantine, quarantine... While writing this post it still continues over the world. In that reason about 50 days we have HO. So, what changed in my life. Actually nothing ))). For person who adopted live in his own world. But during quarantine i study a lot for my carrier purpose. Another great think thanks to quarantine i learned how to properly cook. Even making soup from "axe".    Lets move to the work. What to say i don't know. For past three month about workplace, system, management it's not bad. But one thing is worrying me that i don't have any tasks, work to do...

First week in new Job

Hi     I don't know how to begin. Any way let's begin from beginning of this way. Firstly i want to  thank to all who reached, interviewed, offered this job. Finally after about 6 month i'm here in huge company in the world . Why it took about 6 month after offer. Because visa process took very long time. Once i get visa, bought ticket to fly from Kutaisi (Georgia) to Prague (Czechia) in 25th of January. Staying one night in Prague and tomorrow i came to Brno. And new life began. 3rd of February was New Comers Day which all new employees who begin this day attended this event. Event took about 4 hours where beautiful girls from HR team give us information about company process. In the end team leader of our team took us to our workplace with our new laptops. While writing this post it's my 5th day. Everything goes as expected....

Install Cisco AnyConnect on Ubuntu

Hi   In this post i will show how to  install Cisco AnyConnect on Ubuntu 19.10. First download soft from below link or from cisco.com site https://ftp.tugraz.at/tu-graz/vpn/ Once archive file  downloaded, extract it:     $ tar xvf anyconnect-predeploy-linux-64-3.1.14018-k9.tar.gz cd extracted folder:     $ cd anyconnect-3.1.14018/vpn/ install  Cisco AnyConnect using this command:     $ sudo ./vpn_install.sh After installing you can open application. If application not opening. You have to install libpangox-1.0-0 to solve problem:     $ sudo apt-get install libpangox-1.0-0 That's all.

Linux basic shell commands

Hi everyone In this post i will write about basic shell commands. cp - copy files and directories mv - move files and directories mkdir - create directories ln - make soft and hard links grep - print lines that match patterns touch - create, change and modify timestamps of a file wc - printing newline, word and byte counts for files fdisk - manipulate disk partition table df - manipulate disk partition table free - Display amount of free and used memory in the system top - display Linux processes ps - report a snapshot of the current processes jobs - show jobs running paused jobs in bg mount - mount a filesystem mkfs - build a Linux filesystem ls - list directory contents

My RHCSA certificate

Hi every one.     I created this post last week before my RHCSA exam. Firstly i want write how i become RHCSA. I got some certificates including sport related certificates. My first certificate was CCNA for geting this it took for me about 3 years. Last year of my bachelour degree i began interesting in networking. Of course why , because i fill in lov ewith command promt. From networking it took me to the world of open source . First distro i installed on my pc was Ubuntu . I still you Ubuntu. Beacuse it has most friendly interface. From that time firstly i interested in LPIC certificates which one i got last year. While passing my CompTIA Linux+. Be honestly i made mistake getting this certificate. Itself its not bad cert . While preparing this certificate you learn a lot. Also i read Sanders RHEL cert guide. Which helped me a lot passing my RHCSA.      Let's talk about exam day. Whole night i was unable sleep. In my dreams i only see "lvreduce" comm...

Linux Boot

     In this article, I am going to explain the booting process in detail. I can assure you that, you will get a clear idea about the Linux booting process after reading this post. I would like to divide the Linux booting in the following 5 steps: From power up/reset to login prompt, we can mainly divide the Linux booting process in to five areas. The BIOS , Stage I boot loader , Stage II boot loader , Kernel and Init . These are the important areas behind a booting process. Let us start the Linux booting process with BIOS. Step 1. BIOS (Basic Input Output System) POST-power on self test which bios loads  checking for hardware . Step 2. Stage 1 boot loader (MBR) Master Boot Record , is the first place where boot loaders begins to start. MBR is a 512 byte sector located in the first sector of hard disk.  MBR contains both program code and partition table details. Please see the image added below: ...

How To Reset root pass in RHEL 7 & CentOS 7

        Hi every one in this post i will show you, how to reset  forgot root password in RHEL_7 & CentOS_7 . Short record of the prosses i will post later.     In previous post i used "init=/bin/sh" for resetting but now i will show another way of resetting root pass. Let's begin      First in grub loader menu tab  'e'  enter edit boot options from here go to line beginig with 'linux16' in this line delete words 'rhgb', 'quite' and add  'rd.break' press 'Ctrl+x'  and we boot in emergency mode where system mount to "sysroot" . Enter below commands: mount -o remount,rw /sysroot       #remount as read write /sysroot chroot /sysroot      #change root folder to sysroot passwd   #for resetting root password touch /.autorelabel         #for selinux   exit    #twice enter exit   ...

Resetting the root password on RHEL 7 Systems

How to Reset Root Passwords on RHEL 7 and CentOS 7 Linux Systems If you have forgotten your root password on a RHEL 7 server or a CentOS 7 server, you can reset your root password as long as you have access to the GRUB 2 bootloader. (The following example was performed on a RHEL 7.5 server) To access the GRUB 2 bootloader, boot your system and wait for the GRUB 2 menu to appear: Boot System and wait for GRUB 2 menu Boot your system and wait until the GRUB2 menu appears. On some systems you may need to press the "Escape" key to access the GRUB 2 menu. Highlight OS Entry Highlight your Operating System and then press " e " to edit. Find line beginning linux Find the line beginning with linux . In this example the line begins linux16 . Manually Edit Line Using the arrow keys and the delete key, manually delete the following entries rhgb and quiet from the line. Next, append the following statement to the end of the line init=/bin...