Set Up a TFTP Server on Linux | Linux.com

Most users are familiar with FTP, but if you want to kickstart Red Hat installs, PXE boot systems, auto-provision VoIP phones or unbrick a Linux-based router, you want a Trivial File Transfer Protocol (TFTP) server. Setting one up on Linux is easy, and a perfect project to take on over the weekend. Source: Weekend Project: Set Up a TFTP Server on Linux | Linux.com | The source for Linux information

How To Record Everything You Do In Terminal - OSTechNix

Synopsis: script -a my_history mkdir test cd test touch hello_world.txt echo 'Hello World' ./hello_world.txt # This closes the "script -a my_history" file exit Source: How To Record Everything You Do In Terminal - OSTechNix

Developing email applications on Windows, targeted for Linux environment - email, mailx, sendmail

If you’re developing on a Windows platform for an application targeted for Linux or Unix that deals with email, then this article will be useful. Let us begin by¬†understand the problem. Problem If you are a Java/Spring developer, (developing in Java is platform independent - runs on any platform where a JVM is available) then you have two options in front of you for sending emails from a Java application:

CentOS7 missing Net-Tools Package and why you should not install it moving forward

In CentOS 7, a lot of the command-line utilities for configuring and troubleshooting network properties like arp, ifconfig, iptunnel, iwconfig, nameif, netstat, route - are no longer there in the new CentOS 7 version. While still included in many Linux Distributions, (and you may be tempted to run - ‘yum install net-tools’ - to get them back into your Linux footprint). But they are considered deprecated and therefore should be phased out in favor of more modern replacements.

CentOS 6.8 & 7 - Change Timezone

Here is a cheat sheet on changing the timezone in a linux system (CentOS 6.8 or 7): # Remove the current timezone file rm /etc/localtime # Create a symbolic link to the new timezone you want # ls -la /usr/share/zoneinfo/ # ls -la /usr/share/zoneinfo/US/ # For GMT ln -s /usr/share/zoneinfo/GMT /etc/localtime # For EST ln -s /usr/share/zoneinfo/EST /etc/localtime # For UTC ln -s /usr/share/zoneinfo/UTC /etc/localtime # For GMT ln -s /usr/share/zoneinfo/GMT /etc/localtime # For New York (Eastern) ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime # For Central ln -s /usr/share/zoneinfo/US/Central /etc/localtime # For Mountain time ln -s /usr/share/zoneinfo/US/Mountain /etc/localtime # For Pacific time ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime # Set Date and Time (as needed) # MMDDHHmmYYYY date 072522172010 hwclock --systohc # If you're using NTPD Service # CentOS 6.

How to sync your date when you restore a VirtualBox snapshot?

This article focuses on synchronizing/updating the clock in your guest linux VM after you restore a VirtualBox snapshot. When you create a VirtualBox snapshot, it’s essentially a photo taken and frozen in time. All bits including the date and time are frozen to that instant. When you restore a snapshot, the Linux guest VM system is restored back to that snapshot including the date and time. This may not be desired all the time especially if the purpose is to restore the configuration and settings to an earlier time but your want to roll forward the clock on the VM to the present instance.

Two useful links comparing CentOS 6.X's - SysV-Init vs CentOS 7.X - SystemD - init systems

In CentOS 6.8, the init system that brings up all the services (link autoexec files in Windows) was called SysV- Init. This has been the foundation for ages as long I’ve been using CentOS. But in the latest release of CentOS (CentOS 7+) the init engine has been moved to a more favorable engine labeled SystemD. SystemD is the init engine behind Ubuntu, Fedora, Red Hat and CentOS. So the standardization is good for the Linux community but moving from CentOS 6.

WaitUntilPortOpens() - How to wait until process A runs and binds to a port before spawning process B?

Sometimes we have situations where you need to wait until one application is loaded that may bind to a certain port before kicking off a second application that may depend on that port. This process is typically described as “Wait-Until-Port-Opens” (or it could be the reverse - where you want to wait until a port closes). Here are some use-cases for this method or script: You have a Java web application (Jetty, Tomcat, WildFly, etc) that listens on port 8080 and you want your Nginx or Apache HTTPd server to start as a proxy-server once that back-end web server is bound to port 8080.

merging bash ssh session history

You may have observed once in a while that when you SSH onto a server and you try to look up a command you ran earlier (maybe the previous day) in the “history” output but you do not see it. This is because of how a SSH session works! Each time you ssh into a server, it leverages a set of TTY screens to maintain an individual history for that session.

CentOS 7 - How to open ports in firewalld?

Prior to CentOS 7, “iptables” and “shorewall” were the two options avaiable. Since CentOS-7, the default firewall tool is “firewalld”. Here is a short-guide on how to open two ports in the firewalld application: firewall-cmd --get-active-zones # Lets open Jetty Web Server port firewall-cmd --zone=public --add-port=8080/tcp --permanent # Lets open some other port 4242 for TCP firewall-cmd --zone=public --add-port=4242/tcp --permanent # Commit changes firewall-cmd --reload firewall-cmd --list-all Cheers.

How to configure OpenTSDB (or any process) as a systemd service in CentOS 7?

CentOS 7 uses Systemd for managing services (prior to CentOS 7 it was using upstart-init.d to manage the services). Step-1: Create CentOS 7 Service file: vim /usr/lib/systemd/system/opentsdb.service [Unit] Description=OpenTSDB Service After=network.target hbase.service [Service] Type=forking PrivateTmp=yes ExecStart=/usr/share/opentsdb/etc/init.d/opentsdb start ExecStop=/usr/share/opentsdb/etc/init.d/opentsdb stop Restart=on-abort [Install] WantedBy=multi-user.target Step-2: Let’s test the start and stop of this new OpenTSDB service $ sudo systemctl start opentsdb # If it starts up good, you should see the website when you goto http://<servername>:4242/ ps -leaf | grep "tsdb" # shows you something similar then you can add it as a service to auto-start sudo systemctl enable opentsdb Step-3: (optional) Reboot node and make sure that the service starts up accordingly after a reboot.