Skip to main content

Posts

Configuring Nginx as Webserver

Hello, Thanks for visiting RvKmR.blogspot.in In this post I am going explain about how to host your websites with nginx. Nginx is web server or we can use it as reverse proxy server. In this post we are discussing Nginx as web server. Let's say I have two web sites that I wish to host with nginx. example.com and test.com are those two websites to be hosted. Environment : Vagrant virtual machine(precise32) ___________________________________________________________________________________ 1. Installing nginx and required libraries to test: We can install it from vagrant provision script or manually from machine itself. I am installing from manually from machine. vagrant@precise32:~$ sudo apt-get install nginx wget links curl 2. Create website directories in document root and index page for those websites: sudo mkdir -p /usr/share/nginx/www/example.com/html sudo mkdir -p /usr/share/nginx/www/test.com/html  I have created simple html pa...

Shebang...... an magic of unix

Hello, Thanks for visiting RvKmR.blogspot.in In this post, I am going to explain about shebang line. We see many of script starts with #! special characters. We are aware of # as a comment but at the start of the script if we use #! then it is not an ordinary comment. It is an instruction to program exec which execute our script. The shebang #! is humanly readable instance of a magic number consisting of the byte string 0x23 0x21. This is passed to exec() to determine the file to be executed is a script or a binary. When shebang line #! is used exec runs the script with executable specified after shebang #!. Ex. #!/bin/bash This is an instruction to exec to start execution of the program with /bin/bash.

R1soft CDP-agent deployment script

Hello, Thanks for visiting RvKmR.blogspot.in . In this blog, I am going to explain about my script for“Idera's R1soft CDP-agent installation ” written in bash. To understand this script you must be familiar with Bash scripting and Linux environment. Q   : I wan to install R1soft cdp-agent on clients server, but I don't have time to execute all commands manually.  OR  I am not familiar with Linux Operating System but I have to install R1soft CDP-agent on client server. Ans :   I have written bash script to install Idera's R1soft cdp-agent on Linux Operating System Launch Terminal with cltr+alt+T in ubuntu or from accessories menu in other Linux OS.There are some prerequisites needed before running this script. We need to know IP address or registered hostname of R1soft cdp-server. Below are steps to use R1soft cdp-agent deployment script: Download or copy r1soft.sh file to client/targeted server. Consider R1soft CDP-server ip address is :192.16...

Reset Multiple Linux server Password

Hello, Thanks for visiting RvKmR.blogspot.in . In this blog, I am going to explain about my script “Reset multiple Linux server password” written in bash. To understand this script you must be familiar with Bash scripting and Linux environment. Q   :  I have 100 's Linux server, I need to reset these Linux server password on weekly.  I know procedure to reset password of single server i.e. Login in to target server and reset password with utility “passwd”.  But here is issue : What if I have 100 's of server ?  it is not efficient way to login to each server and the reset password. Ans :     Written an bash script to automate this task. Details are mentioned below. There are some prerequisites needed before running this script. We need know targeted Linux server IP address and current password of server. Create a file “server_details”  at same location where is your main script located and write IP address and password like : "<I...