Linux/Unix:Server configuration file syntax Checking commands

I have planned to write this post some long time ago, now the time has come to do it. Basically configuring servers in Linux/*nix include editing of configuration files. Once editing the files if there is any syntax error these service will not start and they will show some wearied errors or just dont show(…)

Basic Nginx troubleshooting in Linux/Unix

This is a small post on how to start troubleshooting Nginx server. If you are facing an issue with nginx or any server/service the first thing to conform is if our configurations are correct or not. Nginx have two commands to show if there is any issue with your configuration or not. Checking your configs(…)

Linux:Copy, change permissions and ownership of a file in a command

Today I came across a requirement to copy couple of files and change permissions to execute those files when writing some ansible playbooks. We can do this by using cp, chmod, chown command as shown below. Ownership is changed from root user to normal user surendra. ls -l abc.sh output: -rw-r–r– 1 root root 0(…)

How to force logout a user from Linux/Unix servers

Today I come across a requirement where you have to force a user to logout from a terminal. When I contacted the user and he said he did not logged in. But the thing is I can see the login session from w, last commands. I did this checking before asking him. Then how can(…)

Linux/Unix: How to update timezone in a system

How to update time zone in Linux? Some times it is required to update our timezone when we move our machines(VMs) from one location to other. Recently I came across a situation where I want to move my machine time zone from IST to Sydney time zone. In this post we will see on how(…)

Linux/Unix: Sync system date/time with NTP server

How to sync system time with NTP server? This is small howto on how to setup ntp sync on a Linux box. Before going to do this we should know why we require to sync with NTP server. NTP is a network time protocol server used to sync time across the machines. When we setup(…)

How to open/read epub books in Linux?

This is a small how to on installing epub(Electronic Publications) reader software to read epub books. What is epub means? Epub is a open book standard for reading documents on mobile devices. The beauty of epub books format is that it will adjust its font size to the device display so that user who reads(…)

How to get Linux Docker IP address

Docker is a high level framework for Linux containers which could be next level for virtualising applications and VM's. Some times it is require to get ip address of a docker so that you can try to check a service running on it or try to ssh at 22 port on the IP address assigned(…)

How to install and enable EPEL repo in RHEL/CentOS/Oracle Linux?

What is EPEL repo? EPEL(Extra Packages for Enterprise Linux) is a repo developed by Fedora project to ensure that there is a quality 3rd party packages available for enterprise users such as people who are using RHEL, Cent OS, Oracle Linux and Scientific Linux. These are highly used enterprise Linux OS which are shipped with(…)

Puppet: How to remove node from master

Q) How can I remove a register a puppet agent from puppet master? Some times it is required to remove a host(puppet node) from the register master. To achive this we have to run puppet cert command and have to manually remove entries from site.pp or other *.pp files where that host is register. This(…)

Puppet: List all the nodes in Puppet master

Q)Recently I installed couple of nodes and attached to Puppet master, How can I list all the nodes which are register with Puppet server?  Answer) There are couple of ways to list all the nodes register with master.  1)Through grepping node entries in /etc/puppet/manifests/site.pp(Though not a good way)  2)Through puppet cert command Listing entries though(…)