Thursday, January 29, 2015

How To Stress Test CPU and Memory (VM) On a Linux and Unix With Stress-ng

I want test my Linux, OpenBSD, FreeBSD and Unix-like server entirely for high load and monitoring the health under stress. How can I stress out my CPU, memory, I/O, and disk stress and more with stress test tool on a Linux or Unix-like systems?

Glibc: GHOST Vulnerability Test To See If a Linux Sever Is Secure

The GHOST (CVE-2015-0235) is serious network function vulnerability in Glibc. How do I check and test if a my Linux based server is secure using command line options?

There are two methods to test and find out if your server or desktop powered by Linux is secure or not:
(a) A simple C test program for all Linux based servers (distro independent; generic method).

Wednesday, January 28, 2015

How To Patch and Protect Linux Server Against the Glibc GHOST Vulnerability # CVE-2015-0235

Very serious security problem has been found in the GNU C Library (Glibc) called GHOST. How can I fix GHOST vulnerability and protect my Linux server against the attack? How do I verify that my server has been fixed against the Glibc GHOST vulnerability?

A very serious security problem has been found and patched in the GNU C Library called Glibc. It was announced on 27th January 2015.

How To Add Swap on FreeBSD Unix Systems

I need additional swap space to improve my FreeBSD Unix server/desktop performance. How do I add a swap file to FreeBSD system using command line options without creating a new partitions? How do I encrypt swap space on a FreeBSD Unix server for security purpose?

A swap is nothing but space or file on a disk that can used as virtual memory. In FreeBSD and Unix-like operating systems, it is common to use a whole partition of a hard disk for swapping. When a FreeBSD based server runs out of memory, the kernel can move sleeping or inactive processes into swap area. A dedicated Swap partition goes a long way to avoid system freeze but if you notice you are running out of RAM or your applications are consuming too much of it then you may want to setup a swapfile. This guide helps you add a swap space on FreeBSD based Unix server.

Thursday, January 15, 2015

How To PFSense Configure Network Interface As A Bridge / Network Switch

I have Soekris single board communication embedded computers which is optimized for low power and network usage. The server has four Ethernet ports. I've installed PFSense firewall on it and configure WAN + LAN ports. How do I setup IPv4 software bridge using PFSense so that the rest of ports act as a network switch?

Wednesday, January 14, 2015

How To Change Timezone on a CentOS 6 and 7

I set my time zone to 'America/New_York' on a CentOS Linux 7 server. I want to see date and time in my timezone in log files. How can I change the current timezone from 'America/New_York' to 'America/Chicago' using command line?

You can easily change timezone in CentOS Linux using the following methods.

How to Run and Execute Command When I Log Out Of Linux Session?

I'm using CentOS 7 server. I need to run a command when I logout using ssh or bash shell. So in Linux and Unix-like systems, how can I run a command to execute when I log out my session?

You can easily get a command or shell script executed when you logout of the system. This is a shell specific feature and you need to add your command or script as per your shell version:

Monday, January 12, 2015

Unix / Linux: Initialize Dot Files Without Restarting The Current Shell Session

I'm a new Linux, OS X or Unix-like system users. I'm using bash shell. I made changes to my $HOME/.profile ($HOME/.bash_profile) file. How can I restart my session without doing logout and login again?

You can always initialize your shell startup files without restarting a Unix or Linux based session. The command and input file name depends upon your shell you are using. You can use the following command to find out your shell name:

How To Install MariaDB Databases on a FreeBSD v10 Unix Server

I'm a new FreeBSD unix user. How can I install MariaDB database server on a FreeBSD unix based system?

MySQL is a very fast, multi-threaded, multi-user and robust SQL database server. The latest version is located at /usr/ports/databases/mysql56-server/.


Sunday, January 11, 2015

Saturday, January 10, 2015

Friday, January 2, 2015

How To Extract a Tar Files To a Different Directory on a Linux/Unix-like Systems

I want to extract tar file to specific directory called /tmp/data. How can I extract a tar archive to a different directory using tar command on a Linux or Unix-like systems?

You do not need to change the directory using cd command and extract files. Untarring a file can be done using the following syntax: