Posts

Showing posts with the label Alma

https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Navigating IBM i with VS Code

Image
The following procedure shows how to connect to an IBM i (AS400) server and explore it using the Visual Studio Code Integrated Development Environment. ========== 1. INSTALLATION 1.1. Download and install the Visual Studio Code IDE. https://code.visualstudio.com/ 2. PREPARATION 2.1. On the VS Code menu, go to [ Go -> Go to File... ] or press Ctrl+P, and input the command below to install the "Code for IBM i" extension. ext install HalcyonTechLtd.code-for-ibmi 2.2. On the left sidebar, click on the IBM i icon to show the IBM i Servers panel and click on the plus "+" sign at the top to create a connection. 2.3. On the Login tab, input the following IBM i server details and click [ Connect ]. Connection Name: (just a placeholder name for easy identification) Host or IP Address: (network address of IBM i server)   SSH Port: 22 (usually) Username: (username on IBM i server) Password: (password on IBM i server) 3. UTILIZATION 3.1. User Library List Libraries are requir...

Installing the Eclipse IDE on Linux

Image
The following procedure shows how to quickly install the Eclipse Integrated Development Environment on desktop Linux distributions. ========== 1. Download the Eclipse tarball at [ https://www.eclipse.org/downloads/ ]. 2. Open a terminal and extract the installer folder. user@host: $ tar -xf eclipse-inst-jre-linux64.tar.gz 3. Run the installer to launch the graphical user interface. user@host: $ cd eclipse-installer user@host: $ ./eclipse-inst 4. On the GUI, choose the desired package. 4.1. For C/C++ programming, select [ Eclipse IDE for Embedded C/C++ Developers ]. 4.1.1. Use the suggested defaults and click [ Install ]. 4.1.2. When the installation is finished, click [ Launch ]. 4.1.3. Use the suggested Workspace and click [ Launch ]. ==========

Monitoring network traffic with tcpdump

Image
The following procedure demonstrates how to use tcpdump to sniff and log packets going in and out of a machine's network interfaces. ========== 1. Identify the network interfaces available. user@host: $ tcpdump --list-interfaces 1.wlp6s0 [Up, Running] 2.lo [Up, Running, Loopback] 3.any (Pseudo-device that captures on all interfaces) [Up, Running] 4.enp5s0 [Up] 2. Set the sniffing tool to listen on a network interface for packets and send the output to a file for easy review later. 2.1. To and from a target port, such as HTTP, regardless of host. user@host: $ sudo tcpdump -A -i any -l -s 0 -vvv tcp port 80 > mytcpdumpout.txt 2>&1 2.2. To and from a target host, regardless of port. user@host: $  sudo tcpdump -A -i any -l -s 0 -vvv host nameOfMachine > mytcpdumpout.txt 2>&1 2.3. The flags used to adjust the behavior of tcpdump are as follows. [ -A ] prints packets in ASCII format and make them readable, excluding data link layer headers. [ -i any ] c...

Using cURL for response timing

Image
cURL is a command-line tool that connects to a uniform resource locator (URL) for data transfer. Although this tool is commonly used to quickly check if websites are up and running, it can also be used to time the response of services. This may help administrators gather data for analysis to match against baseline response times for performance tuning. cURL has many options or flags available to adjust its behavior. For the purpose of timing, the following flags shall be utilized. [ -k ] tells cURL to disable peer verification of the SSL/TLS certificate. This is useful for connecting to URLs that have  self-signed certificates . [ -s ] tells cURL to operate in silent mode. This suppresses standard error messages and the progress meter. [ -o /dev/null ] tells cURL to dump its standard output to the null device. All messages are effectively discarded and no output file is produced. [ -w '%{time_total}\n' ] tells cURL to write the declared variables to standard output after all tr...

Installing Node.js on Linux

Image
Node.js is a runtime environment that allows JavaScript to be executed directly on the operating system. This enables the use of JavaScript to develop server-side applications. In some Linux distributions, the Node.js implementation may not be properly maintained and may lag from the releases of its official website. The following procedure shows how to manually acquire and install Node.js in order to have the most recent packages. ========== 1. Download the desired Node.js version. 1.1. Node.js x64 and other 64-bit Long-term Support (LTS) https://nodejs.org/en/download/ user@host: $ wget https://nodejs.org/dist/v [ ersionNum ] /node-v [ ersionNum ] -linux-[CPU64].tar.xz user@host: $ tar -xf node-v [ ersionNum ] -linux-[CPU64].tar.xz user@host: $ cd node-v [ ersionNum ] -linux-[CPU64] 1.2. Node.js x64 and other 64-bit previous LTS https://nodejs.org/download/release/ user@host: $ wget https://nodejs.org/download/release/latest-v [ ersionMaj ].x /node-v[ersionNum]-linux-[C...

Running Linux Commands at Startup

Image
The following procedure enables Linux programs to start automatically after booting, without requiring users to log in first. This method is useful when automating custom daemons to act as servers with user-specific privileges. This can also be done on the FreeBSD crontab , with some slight changes to account for the behavior of other shells. ========== 1. Edit the user crontab file. user@host: $ crontab -e 2. Add the @reboot line with the desired command. # BEGIN CODE @reboot /myfolder/mydaemon.sh > /dev/null 2>&1 & # "> /dev/null" discards standard output by redirecting to the null device. # "2>&1" redirects standard error to standard output. # Terminating with "&" executes the command in the background. # END CODE 3. Save and exit crontab, then reboot the machine. ==========

Making Self-Signed Digital Certificates

Image
The need for TLS/SSL certificates may arise when developing server projects that need encryption, like the Apache web server on  Debian-based  or Red Hat-based Linux distributions, on the  FreeBSD  operating system, and the Home Assistant  home automation system. The following procedure shows how to create and install self-signed certificates, if acquiring them from a Certificate Authority (CA) is either too expensive or too complicated. It is important to keep in mind, however, that self-signing may be deemed UNTRUSTWORTHY in a production environment. ========== 1. Create the certificate and key. 1.1.  [OPTION A] One-step process, skipping the Certificate Signing Request (CSR). user@host: $  openssl req -new -x509 -days 36500 -nodes -keyout server.key -out server.crt 1.2.  [OPTION B] Separate CSR for submission to CAs, if planning to legitimize later on. 1.2.1. Generate keys for the CSR. user@host:...