How to use ChatGPT with the API in the Linux command line interface

Exercises to complete: Obtain an API key Make sure that you have the OpenAI Python client installed Create a python 3 script Create a Bash script Make scripts executable and run the Bash script To be able to run chatGPT in command line, you can follow these steps. Please note that you need to have sudo privileges or root access. Obtain an API key To use the OpenAI API, you need an API key. If you don’t have one, you can sign up on the OpenAI website and create a new API key. ...

May 25, 2023 · 3 min · 527 words · sysadmin

How to install Docker

Exercises to complete: Update your system Add the Docker repository and refresh repositories if needed Install Docker Enable and start Docker service Verify the Docker installation To install Docker, you can follow these steps. Please note that you need to have sudo privileges or root access. SLES Debian RedHat SLES 15 / openSUSE Leap 15.4 Update your system: Firstly, make sure your package list and the system is up to date. ...

May 24, 2023 · 4 min · 791 words · sysadmin

Web Server - Nginx

Exercises to perform: Install Nginx. Enable and start Nginx. Add a port to firewalld. Create a simple website. Check if the page displays correctly using the IP address. Install Nginx SLES Debian RedHat SLES To install Nginx, type: # refresh repositories sudo zypper ref # install Nginx sudo zypper -n in nginx # enable Nginx at system startup sudo systemctl enable nginx # start Nginx sudo systemctl start nginx Debian To install Nginx, type: ...

April 21, 2023 · 2 min · 384 words · admin

Web Server - Apache2

Exercises to complete: Install Apache2 Enable and start Apache2 Add a port to firewalld Create a simple website Check does the website display correctly using IP address Install Apache2 SLES Debian RedHat SLES To install Apache2 type: # refresh repositories sudo zypper ref # install Apache2 sudo zypper -n in apache2 # enable Apache2 on boot sudo systemctl enable apache2 # start the Apache2 sudo systemctl start apache2 Debian To install apache2 type: ...

April 6, 2023 · 2 min · 347 words · admin

SSH server

Exercises to complete: generate an RSA key pair using ssh-keygen export the public key from the client to the server using ssh-copy-id log in with the password via ssh to the server and switch to the root account using the sudo - su or sudo -i command enable key login and disable password login. Save the changes and restart the ssh service. do not close the current session. Open a new ssh session and log in to the server with your private key. if you have successfully logged in, secure the server using the information below and then restart the ssh service on the second session. remember to keep the first ssh session open all the time so you can undo changes if necessary. restart the ssh service and check if you can log in with the third session to the server. If so, you have successfully configured the ssh server correctly. if you are willing, write a script using sed or awk to make server-side changes to the sshd_config file so that you don’t have to manually apply the changes. OpenSSH : KeyBoard-Intereractive Auth OpenSSH is already installed by default, so it’s not necessarry to install new packages. You can login with KeyBoard-Intereractive Authentication by default, but change some settings for security like follows. ...

April 1, 2023 · 12 min · 2430 words · sysadmin

Welcome to the Sysadmin blog

Hi, What follows is history. More than 3 years have passed since then. Is that a lot or a little? For me it has changed a lot, as I managed to move to the third line at Fujitsu and worked more than a year in the Linux team and then moved to Research and Development, where I now work as Quality Assurance, but basically my work is still related to Linux, only that I now work with SLES and open SUSE. At home, I currently have a Raspberry Pi 4b rev 1.4 with 8 GB RAM and a 120 GB SSD, on which Debian 11, Home Assistant Supervised and a couple of other things are installed, and a Fujitsu Esprimo Q920 with 16 GB RAM and a 512 GB SSD, on which I have Proxmox with virtual machines such as a multi-node Wazuh cluster though, and Portainer, which I use to quickly put up Docker containers. I’ve managed to get through installing the system on several VPS I’ve purchased. I’ve set up a mail server on Postfix as well as Dovecot, Dovecot Sieve, Postgrey, SpamAssassin, ClamAV, etc. I also installed Apache and Nginx, which I then secured, so called hardening. I learned about OpenvSwitch, Qemu KVM, Proxmox, ESXi, Zabbix, Zephyr Enterprise, Jenkins, Selenium Grid, Confluence, Jira and many other tools and solutions. I have gone through the management of old machines such as Solaris, SCO_SV, old CentOS and Red Hat (versions 4, 5, 6, 7). I’ve learned a lot of things and I’m still learning. I am not standing still. I’m developing the Technology Stack. I’m learning AWS and how to configure environments that are already more advanced in terms of security. I don’t program, although writing code in Java, Python, Bash, C is not a problem for me. It’s just that programming is not my passion. My passion is Linux and the extensive security associated with it. OSINT, although I know it, is not something I do either, because it’s not a challenge for me and it’s not my role to seek people out over the Internet. If someone has more knowledge than me, but does not respect me, is not cultured and hides behind an illness, which I have personally encountered, in addition, shows elementary deficiencies in reading with understanding, is a dinosaur and presses SELinux or AppArmor to beginners, this person has nothing to look for here. Netiquette such a person should have learned at the very beginning, because it is the basis of the Internet. Let’s respect each other, because this is the way to professionalism. Plus the ability to control one’s own emotions, and the quote of Master Yoda “Do or do not, there is no try” - is the road to success. ...

March 19, 2023 · 3 min · 594 words · sysadmin

How to install properly a virtual machine in QEMU KVM

In this video I explained how to properly install the QEMU KVM virtual machine. I provided two methods of installation and described in details how to make it work. preallocation=metadata – allocates the space required by the metadata but doesn’t allocate any space for the data. This is the quickest to provision but the slowest for guest writes. Read the article: https://www.jamescoyle.net/how-to/181… ...

October 25, 2022 · 1 min · 67 words · sysadmin

How to fix QEMU KVM virtual machine network configuration through the xml

In this video I explained the QEMU KVM network configuration issue connected with type direct and provided a solution by editing a configuration in xml file

October 22, 2022 · 1 min · 26 words · sysadmin

Issue with a type direct in QEMU KVM network configuration explained

In this video I explained the QEMU KVM network configuration issue connected with type direct. Manual for virt-install command: https://www.mankier.com/1/virt-install#Networking_Options

October 22, 2022 · 1 min · 20 words · sysadmin

How to install QEMU KVM and configure virtual machine in openSUSE 15.4

How to install QEMU KVM and configure virtual machine in openSUSE 15.4

October 17, 2022 · 1 min · 12 words · sysadmin