HostOnNet Blog

Category Archives: Linux

Bash

Bash Script to restart stopped service Bash show command with set -x Check if a command was successful


Bash Script to restart stopped service

Here is a quick bash script that will monitor if a process is running. If not restart it. It only work if process completely crashed. If process hangs, it won’t help. Create file monitor-service.sh with following content. The code look


Creating a .pem File for SSL Certificate

Some applications require you to provide SSL in .pem file format. This can be easily created your own by combining SSL cerifcate provided by your SSL provider. Open a text file, paste content of your SSL certificate in following order.


Managing Software with yum on Linux

Python Script to update yum yum stuck forever Yum Error Fatal error, run database recovery Auto update CentOS 6 server with yum yum is command used to install software on RHEL, CentOS and Fedora Servers. To install software, use command


List all UDP Connections

To list all UDP connections, run Example Scan All UDP Ports To scan all UDP ports using nmap, use


How to change language in Linux Terminal

To change language on linux terminal to English, run or Here i run a command on linux server with German language After running export LC_ALL=C, all command result will be displayed in English. You can verify the language settings with


hash – refresh path environment variable.

hash -r command is used to refresh path environment variable in linux systems. On FreeBSD, the command is rehash. I have a file create-vm in both /usr/bin and /usr/local/bin folders. This i actually copied by accident, now i run create-vm


azure list locations using command line

To list Data center locations in Microsoft Azure using command line tool, run


Memcached

To install memcached on Ubuntu, run Configuration file Restart memcached Check Memcached Stats To check stats for memcached installation, run Now type in Example root@ip-198-12-157-208 [~]# telnet 127.0.0.1 11211 Trying 127.0.0.1… Connected to 127.0.0.1. Escape character is ‘^]’. stats STAT


RabbitMQ

RabbitMQ is an open source message broker. https://www.rabbitmq.com To install RabbitMQ server on Ubuntu, run To create a user, run User “hostonnet” will be created with password “superman123” To set permission, run