Category: Unix / Linux

  • centos 9 dev env (en Castellano)

    Hola Lectores,

    Hoy, el tema serán como obtener un servidor centos 9 para desenrollar rpm.

    sudo yum install rpm-build

    sudo yum install gcc make

    Ahora, tenemos que crear un directorio para hacer todo trabajo. Estos ejemplos son con stream.

    sudo yum install redhat-rpm-config

    mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

    Tenemos que crear en el directorio ($HOME) para prevenir el estropiamento en la “root”.

  • CentOS 9 build a rpm dev-env

    Hello readers,

    Today we are going to see how to build an rpm dev environment.

    sudo yum install rpm-build

    sudo yum install gcc make

    Now, we are going to build a directory to work with an rpm building. In the next article, we will learn how to build and install an rpm on the centOS 9 stream.

    sudo yum install redhat-rpm-config

    mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

    We must build on the ($HOME) directory to avoid damage on the fly under the installment of the centOS 9. In the next article, we will learn how to build an rpm package under the $HOME folder.

  • CentOS 9 stream web

    Hello readers,

    Today, we came to deliver one more article about POSIX. We are going to teach how to enable web dashboard on CentOS 9 stream.

    sudo systemctl enable –now cockpit.socket

    In the end, we will have the same dash on every address. You must see the IP address of your machine. For us, it’s a 10.xx.xx.xx.

    You must go to your browser at https://10.xx.xx.xx:9090. If you have 192.xx.xx.xx:9090, use it. You can find mine in the example above.

  • Useful commands for macOS

    Hello readers and followers at linkedin,

    Today, I will show a few useful commands for your zsh terminal. You can test them on iTerm or the terminal itself.

    • ls
    • when you type ls you can list the folder files even the folders inside of it.

    For instance, this command shows my $HOME directory.

    If you are a coder, you can use this helpful command. It’s called git. You can install it over brew.

    • brew install cmake git
    • I have shown cmake because it’s helpful for C/C++ projects under macOS.

    /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”

    With this command, you can install them on your mac the brew command.

    • mkdir command is helpful to create directories.

    Now, we are going to see the cd command, this command can be helpful to switch directories.

    For last, the pwd command. I will release few articles about commands over here at coder by gleentech.

    With this command, you can see the location of the directory, where you are. In this example, you can see /Users/pedro/tests. This directory belongs to my file structure for example.

  • How to create a qemu snapshot

    Hello readers,

    Today, we will learn how to make a snapshot of your qemu images under macOS.

    First, you must run terminal or iterm2. Then follow my instructions.

    qemu-system-x86_64 \
    -m 4G \
    -vga virtio \
    -cdrom Fedora-Workstation-Live-x86_64-36-1.5.iso \
    -accel hvf \
    -show-cursor \
    -usb \
    -device usb-tablet \
    -drive file=fedora.qcow2,if=virtio

    qemu-system-x86_64 \
    -m 4G \
    -vga virtio \
    -accel hvf \
    -show-cursor \
    -usb \
    -device usb-tablet \
    -drive file=fedora.qcow2,if=virtio -snapshot

    These first commands will be to run and install the fedora 36 on your qemu machine.

    In the final line with -snapshot, you can run snapshots on the fly.

    You can also boot and install on the cloud ubuntu 20.04 LTS. Now, I am going to show to do that.

    #!/bin/bash -e

    qemu-img create -f qcow2 ubuntu.img 60G
    curl -L -o ubuntu-20.04.5-desktop-amd64.iso https://releases.ubuntu.com/20.04/ubuntu-20.04.5-desktop-amd64.iso

    qemu-system-x86_64 \
    -m 4G \
    -vga virtio \
    -cdrom ubuntu-20.04.5-desktop-amd64.iso \
    -accel hvf \
    -show-cursor \
    -usb \
    -device usb-tablet \
    -drive file=ubuntu.img,if=virtio

    qemu-system-x86_64 \
    -m 4G \
    -vga virtio \
    -accel hvf \
    -show-cursor \
    -usb \
    -device usb-tablet \
    -drive file=ubuntu.img,if=virtio -snapshot

    You must break the lines for each step on the ubuntu 20.04 LTS cloud image. Remember, qemu is very good for testing emulators. With this article, I want to teach how to build emulators Linux for cloud computing or testing structures.

    In the next article, I will teach how to code and manage coding under the emulator connected to the terminal from macOS.

  • Fedora 37 Installation

    Hello readers.

    Today, we are going to install Fedora 37 beta under Parallels. I am using Parallels since 2015. Now, I build my VMs under it.

    First, you must get the iso netinstall from getfedora.

    https://getfedora.org/en/workstation/download/

    Then, open Parallels and create a new VM.

    After testing the live iso I needed to redo the netinstall from 37 Beta

    Click Begin

  • IRC scripting

    Hello, it’s coder by gleentech again. Today we are going to talk about kvirc IRC scripting.

    The following code is the script itself.

    alias(j){ join $0-; };
    j  #plv
    echo This is me
    event (OnIRC, enable)
    {
        echo Auto-spying my channels...
        action.enable
    }
    
    event (OnIRC, ver)
    {
        echo Auto Knowing version...
        about.kvirc
    }
    
    
    event (OnIRC, hosting)
    {
        echo Auto-spying my channels...
        ahost
    }
    
    event (OnIRC, spy)
    {
        echo Auto-spying my channels...
        socketspy.open
    }
    
    
    event(OnIRC,autojoin)
    {
        echo Auto-joining my preferred channels...
        j #plv
    }
    
    event(OnIRC,lookforplv)
    {
        echo Looking for plvicente...
        whois plvicente
    }
    
    event (OnIRC, awake)
    {
        echo Away off my channels...
        away I fell asleep... Don't wake me up
    }
    
    event (OnIRC, banning)
    {
        echo banning  on my channels...
        ban $0
    }
    
    

    First of all, we must do two things before seeing the script.

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    brew install kvirc

    Now we have our IRC client to code our script.

    We must open the kvirc on the macOS. Then link to your favorite network server.

    I am going to show how to use the script on ptnet the Portuguese network. We can use this on any network. Now, we have the script on our side.

    We must go to the events tab and choose onIRC event. Click on the right side and create a new event default.

    Rename the default event name to spy on onIRC events. Then copy the onIRC spy event to the file you just created. The apply and close.

    For instance, this spy function will log your status and everything you do on the IRC server network.

    You can copy the event clicks to your side to see how we can use IRC scripting. I write first a kvs file before copy the functions and events or even aliases.

  • Parallels Debian

    Today, we will learn how to install Debian on Parallels.

    If you follow the screenshots carefully you can have a VM with 8GB Ram and 64GB trim SSD.

  • Data Recovery

    It’s coder by gleentech again. Today, I will talk about data recovery.

    I opened a store to fix and build computers. I had in my hands one acer aspire to make a backup. This aspire 5050 had an issue, it’s old too. I needed to recover data from there.

    First I tried ubuntu, fedora, and Gentoo in USB to recover the data inside. In the end, I found Debian version 11. I flashed the iso into a USB drive. After the flashing completion, I ran it on Acer’s laptop. I booted the live iso, I installed it, then I did some steps to get it on.

    This version worked because I made a few changes.

    Why?

    This Acer had an issue with wifi, HDD SATA corruption, and fat32 second partition. I needed to install Debian because the Windows 7 got corrupted. The fat32 shouldn’t even exist but in NTFS. I pulled out the fat32 into an ext4 partition.

    To copy this data. I needed to compile the CPU, Wi-Fi, ati Radeon GPU, and trackpad. To get the hands-on that.

    As this laptop is old, I needed to make some research. I am doing some research to have this old laptop working with Microsoft, instead of Linux. I made a tailored distro just for data recovery.

  • FreeBSD kernel setup

    Hello again. It’s coder by gleentech. Today, we are going to set up a FreeBSD kernel dev machine.

    First of all, we must see the devices:

    -> sudo dmesg

    -> sudo psm

    -> sudo apropos

    With those two commands, we can see our devices. In Windows is there a machine device application. Here we must check them with a terminal. The last command is useful too.

    It’s there another good tool also, which is :

    -> sudo pciconf -lv

    All the tools are good to know our machine. I used them for my HP. For instance, I used them to check my realtek wifi adapter built-in. Not working yet. I am studying a way to fix it.

    The FreeBSD comes with everything to build our kernel. cmake, make, clang, gdb but I made my own gdb. Based on the code from the official repository.

    FreeBSD kernel

    type this on the terminal:

    -> svnlite checkout https://svn.freebsd.org/base/releng/13.0 /usr/src

    or:

    -> git clone https://github.com/freebsd/freebsd-src.git /usr/src

    Now you must type always on the terminal

    -> cd /usr/src

    -> make buildkernel KERNCONF=MYKERNEL

    -> make installkernel KERNCONF=MYKERNEL


    You must do this always with root, sudo account. Next week I will teach how to set up from the ground up a FreeBSD machine to do all this.

coder by Gleentech
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.