Posts

Showing posts from 2017

Docker: Quickstart

OS: CentOS 7 lets create a docker yum repo. # cd /etc/yum.repos.d/ # vim docker.repo [dockerrepo] name= Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg ###save & exit # yum update # yum install docker-engine -y ### in EL 6 disabled SELINUX or add chcon # systemctl enable docker # systemctl start docker # docker --version # docker images # cd /var/run/ # ls -al dock* # usermod -a -G docker user # cat /etc/group | grep docker -. as username : user ### relogin with username as user and try again # docker images -. as username : user $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$ BASE IMAGES $$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ [as username: user] $ docker images $ docker search centos $ docker search apache $ docker search httpd - pull images from docker hub $ docker pull $ docker pull hello-world $ docker i

BASH: Extract only IP Address from ip addr command

Hello , You can use below shell script to extract only IP address from ip command. Command :  ip addr show  | grep -oP 'inet \K[^/]+' Example: [root@server cgi-bin]# ip addr show  | grep -oP 'inet \K[^/]+' 127.0.0.1 10.0.2.15 192.168.56.102 Note: If you are trying to use ip command in cron jobs, please use as /sbin/ip  Hope it helps  you. 

Fix: Command not found for whois and dig

Image
Hello, If you have not installed bind-utils then you wont be able to execute dig commands. basically dig command can be used to DNS information and reverse lookup of a host etc. To install dig commands , type below commands in your terminal yum install bind-utils Then you can try with dig google.com dig -x google.com  If you have executed those commands, you will see sample output as below and if who is command not working then you have to install jwhois package. yum install jwhois and you can test command usage with whois google.com Hope it helps you some day!!!!!!!!!!!!!!

Root CA and Wildcard Certificate Generation in CentOS/RHEL 6&7

     Hi folks ! this is one of the best method to create your own RootCA server and generating self-signed wildcard certificates.The greatest advantage of following this method: this would not make any system level changes, as everything is stored in files mentioned in the commands. At any stage if something went wrong, clear all the files and perform the steps once again. There are two sections 1. RootCA Server   --  Need to perform only once. 2. Generating wildcard certificates for xyz.com domain -- Need to perform once per domain to create wildcard certificates. Need to perform once per site per domain to create individual certificates per site. RootCA Server ============ 1. Install required packages. # yum install openssl -y 2. Generate XYZRootCA certificates # mkdir /opt/XYZRootCA # cd /opt/XYZRootCA # openssl genrsa -out XYZRootCA.key 2048 # openssl req -x509 -new -nodes -key XYZRootCA.key -sha256 -days 10950 -out XYZRootCA.pem #Provide information as g

A Go-Ready vagrant setup

Hello, I hope you know what is a Vagrant. If you don't , please visit https://www.vagrantup.com/intro/index.html. For a Vagrant setup Vagrantfile is important. In the Vagrantfile we can define so many parameters for the VM we would like to build, for example IP Address, Hostname, Port Forwarding and while spinning the VM itself we can install the new packages and make our development or testing environment ready when ever we want. I dont write Installation of Vagrant here, because their documentation is excellent and I dont want to duplicate it. If you want to install Vagrant , look at https://www.vagrantup.com/downloads.html and VirtuboxVM is one of pre-requisite for Vagrant and I hope you know how to install VirtualBox, if you dont know then look at https://www.virtualbox.org/wiki/Downloads. Now I assume , you have installed Vagrant and VirtulBox.  Whether you are using Windows or Linux commands are same , just use your senses at path format which is different for Windo

Dell iDRAC Web GUI Error – ERR_SSL_SERVER_CERT_BAD_FORMAT

Image
Issue :-  iDRAC web GUI console unable to launch due to the SSL Certificate issue. Error: - doesn’t adhere to security standards. ERR_SSL_SERVER_CERT_BAD_FORMAT Reconfigure Self Signed Cert :– 1 )  ssh to iDRAC ip  and supply iDRAC user and password ( default is user:root , pass : calvin ).         ssh -o "IdentitiesOnly yes "  root@<drac ip> Ex :-    [somasekhar.a@test ~]$  ssh -o "IdentitiesOnly yes"   root@1 92.168.0.122 2) Run the below command.     /admin1->  racadm sslresetcfg      Certificate regenerated successfully and webserver restarted   Now try to relaunch iDRAC web GUI console. Still if its not working then have to soft reset iDRAC system. Run the below command    racadm racreset soft Ex:- /admin1->  racadm racreset soft RAC reset operation initiated successfully. It may take up to a minute  for the RAC to come back online again. Wait for 2/3 minutes then try to relaunch iDRAC web GUI console.

Prefork Multi Processing Module for Apache

MPM stands for Multi Processing Module and this module implements a non-threaded pre-forking web server. MPM isolate each request , so single request wont effect any other request. MaxRequestWorkers is proportional to Physical RAM. More value more requests so make sure we got more RAM available for that server. =====How it Works There is a process named as "Control Process" and it is responsible for launching child process and these child processes will listen for requests and serve them once they arrive. And Apache by default will maintain serveral spare child process so that client request doesn't have to wait until new child process created. And following parameters are responsible for regulating these child process. 1. StartServers 2.MinSpareServers 3.MaxSpareServers 4.MaxRequestWorkers The default value for MaxRequestWorkers is 256 , so a server with untouched MaxRequestWorkers parameter can handle 256 requests at a time and you can define your cust