setup-static-ip-address-in-debian-linux.webp

Setup Static IP Address in Debian Linux

Setting up static IP address in Debian Linux is easy. In this simple guide, I will be configuring the IP address using the old way (ifconfig) and requires that you have system administration rights to do the following steps: Open the network interface file with the following command: sudo vi /etc/network/interfaces Once opened you might see something similar like this Your interface label might be different from the example but in this case we are interested in making interface ens33 to have a static IP....

June 12, 2021 · John Pili
Allow user or group to run sudo on specific applications in Linux

Allow user or group to run sudo on specific applications in Linux

In some situation, we may want to delegate a sudo capability to Linux users or groups without completely giving them full access to the operating system. We can achieve this by using User_Alias inside the /etc/sudoers configuration file. I will share the simple settings that I used in my RHEL server. ## Sudoers allows particular users to run various commands as ## the root user, without needing the root password. ## ## Examples are provided at the bottom of the file for collections ## of related commands, which can then be delegated out to particular ## users or groups....

May 2, 2021 · John Pili
Remove Source Path From Go's Panic Stack Trace

Remove Source Path From Go's Panic Stack Trace

I would like to share the Golang’s build flag to remove the source path (GOPATH) from panic stack trace output. In production environments or commercial projects it is sometimes not ideal to display the source path because of privacy, security or other reasons. Below is an example of a stack trace output that reveals the GOPATH location which is located inside the developer’s home directory. In this case /home/johnpili/go/ panic: Aw, snap goroutine 1 [running]: main....

February 19, 2021 · John Pili
Generate text to image in Go

Generate text to image in Go

In this blog post, I’ll share how to generate text to image in Go programming language (Golang). I have a previous and similar blog post using Python. You can check that post here I created this application to generate images of my Linux configuration files or source code snippets and share it via WhatsApp or other messaging platforms. Another reason is to generate featured images for my social media posts in Twitter, Facebook or LinkedIn....

February 12, 2021 · John Pili
create-a-linux-systemd-entry-for-your-application.webp

Create a Linux systemd entry for your application

Systemd is a Linux software suite that handles system services (daemon) and timers; it enables you to start, stop and restart your application using systemctl command. It can also start your application during operating systems boot-up sequence. Note that you will need to have root or sudo privileges for this operation. To create a systemd unit file, create a service file inside the directory /etc/systemd/system/. The filename must end with ....

January 4, 2021 · John Pili
Linux systemd entry for your Go application

Linux systemd entry for your Go application

Systemd is a Linux software suite that handles system services (daemon) and timers; it enables you to start, stop and restart your application using systemctl command. It can also start your application during operating systems boot-up sequence. Note that you will need to have root or sudo privileges for this operation. To create a systemd unit file, create a service file inside the directory /etc/systemd/system/. The filename must end with ....

January 4, 2021 · John Pili
setup-static-ip-address-in-red-hat-enterprise-linux-8.webp

Setup static IP address in Red Hat Enterprise Linux 8

Setting up a static IP address in your RHEL or CentOS is simple. Prerequisite This how-to guide requires that you have administrative access to the Linux operating system. Steps Inside the RHEL Operating system, open the terminal and head to /etc/sysconfig/network-scripts. Using ls command, you can see the available network devices in the directory. cd /etc/sysconfig/network-scripts ls Use a text editor to edit the specific network device configuration vi ifcfg-ens192 A network configuration should look like similar to this In this sample configuration, we will need to specifically change or add the following: BOOTPROTO=none ONBOOT=yes IPADDR=x....

October 20, 2020 · John Pili
How to change MySQL’s root to use mysql_native_password in Ubuntu

How to change MySQL’s root to use mysql_native_password in Ubuntu

In some MySQL installation in Ubuntu. You cannot login as root because it is not configured to use mysql_native_password. In this post, I will teach you how to enable mysql_native_password. Log in to MySQL via terminal with sudo mysql -u root Once inside MySQL, we will need to change the default plugin authentication to mysql_native_password and set a password for root. mysql> ALTER USER [email protected] IDENTIFIED BY 'password'; mysql> exit You can now login in MySQL as root using the password you set....

October 8, 2020 · John Pili
jenkins-featured-image.webp

Login as Jenkins in Linux Terminal

You may need to setup an SSH keys or environment variables to your Jenkins installations. One of the easy way to do this is to setup those environment variables inside the jenkins user account. If you installed Jenkins in CentOS or Ubuntu via YUM or APT; These package managers will setup a jenkins user account without login capability and shell. That means you cannot simply SSH to it. Using your other Linux account you can login as jenkins using the command snippet below....

August 14, 2020 · John Pili
golang-linux-daemon.webp

Golang Linux Daemon

You build your first Golang web application and running in a remote server via SSH. The problem with that is once the SSH session is terminated it also kill any running programs associated with that SSH session. Using nohup solves this problem but I think this is okay during development and testing phase. A better way to deploy your Golang application into a Linux production environment is create a systemd entry making it as a daemon program....

July 28, 2020 · John Pili