HostOnNet Blog

Bash show command with set -x

In bash script, some times you need to print out the command that is executed. This is useful when you want to debug some dynamically generated commands. This can be done with set -x statement. set +x will disable this.


locale: Cannot set LC_CTYPE to default locale: No such file or directory

When i login to a server, i get following error To verify en_US.UTF-8 is available on the system, run locale -a On this server en_US.UTF-8 is not installed. To enable this, run You will get screen with all available locales,


OpenNebula Cannot check QEMU binary /usr/bin/qemu-system-x86_64

When creating Virtual Machine on OpenNebula KVM Node running CentOS 7, i get error Thu Sep 21 22:38:03 2017 [Z0][VM][I]: New state is ACTIVE Thu Sep 21 22:38:03 2017 [Z0][VM][I]: New LCM state is PROLOG Thu Sep 21 22:38:08 2017


Amazon AWS

Amazon EC2 regions Uploading files to Amazon s3 with s3cmd Amazon Ec2 Cpanel FTP I won’t open a connection to X (only to Y) Amazon Elastic File System Backup Site to Amazon S3


NGINX Unit – Application Server from Nginx

Nginx one of the popular web server used by high traffic web sites have come up with NGINX Unit, an application server that can serve PHP, Python And Go language web applications. To Install Nginx Unit on Ubuntu 16.04, first


Python Script to update yum

Some times when you update server software with yum, it fail to update due to few package conflicts. This will result in none of the packages getting updated. When i update a cpanel server, i get following error I normally


Access OpenVZ Virtual Machine from Node

To get List all of running OpenVZ Virtual machine, run Example To connect to any of the Virtual machines, all you need to do is Example Now you are inside the VM. You can run all commands or even change


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