Posts

Log rotate (catalina.out) of Tomcat

Rotate Catalina.out of tomcat on On Linux (Centos 7) server By default, Catalina.out file will not be rotated. To rotate it I have used logrotate. First, understand the  logrotate utility   Create tomcat file under /etc/logrotate.d/  using below command                               sudo vi /etc/logrotate.d/tomcat Press i to enable insert mode, past below script into file                                                                /opt/app/tomcat/logs/catalina.out {  su myuser myusergroup  missingok  notifempty  copytruncate  daily  size 5M  rotate 7 } Here /opt/app/tomcat/logs/catalina.out is path to your log file. press Esc key, then : wq!  to write and quite ...

Apache setup to remove/add application context

I have configured the Apache to respond multiple applications deployed on the same tomcat server. All web application have different application context. I want to hide application context from end user as I have different subdomain for both application <VirtualHost *:443>     ServerName iot.project.in     ServerAlias www.iot.project.in   ErrorLog ${APACHE_LOG_DIR}/error.log     CustomLog ${APACHE_LOG_DIR}/access.log combined     #Configure SLL certificate     SSLEngine on     SSLCertificateFile /ssl/wildcard_ssl/IoT.crt     SSLCertificateKeyFile /ssl/wildcard_ssl/IOT.key     #rewrite application context URL shown in browser so user will      #always redirect to new URL (if not POST method)     RewriteEngine  on     RewriteCond %{REQUEST_METHOD} !POST     RewriteRule ^(\/iot)(.*)$ $2 [NE,R]   ...

Git Auto Increment tag

If you want GIT tag autoIncrement with one version number after each build you can use below shell script(./gittag.sh) as the hook. Scrip will find last committed TAG which starts with  ENV_TAG_PREFIX ( QA_V) and creates next release TAG then push tag to GIT. VERSION_MODE   [major|minor|revision|buildNumber - These are the possible value. each time one version is a tag with GIT. By default, buildNumber is pass which increment last digit in release tag like(x.x.x.1 to x.x.x.2). So if you want major release then you can pass major as option which tag GIT with major release  like (1.x.x.x to 2.x.x.x)] e.g. ./gittag.sh major       ./gittag.sh minor #!/bin/bash VERSION_MODE = $1 ENV_TAG_PREFIX = QA_V # "major": 1, # "minor": 0, # "revision": 0, # "buildNumber": 1 if [ "$VERSION_MODE" = "" ] ; then VERSION_MODE = "buildNumber" fi cd /path/to/your/git/checkout ...

How To e-File Income Tax Return in India FY 2015-16

Image
Filing  of  Income Tax Return  For F Y 2015 - 16 Prerequisites ·          Form 16(Part A and B) ·          Bank Account details 1.     You need to register yourself to file Income tax return. Click here to register . If you have already registered then skip this step. 2.     Now you are ready to file your Income tax return. Click here to login 3.     You will see below screen after loged in. 4.     Prepare and submit online Ø    ITR Form Name as:- ITR -1 Ø   Assessment Year as:- 2016-17 (Assessment Year: 2016-17 means the Financial year 2015-16) Ø   Prefill address with:- From PAN database(If you are filling the first time) or else From Previous Return Filled Ø   Do you want digital sign:- No Ø   Now press the submit button 5.   ...

Set up GIT server in local

Image
If you want to learn GIT, so you can create GIT server in you local system only!! Just download GIT  Install GIT download Tortoise GIT for command GUI & Install it Create folder say GIT_SERVER in your drive Inside that create server repository by > right click > create repository here..  Select check box "Make it bare" as this is server repository where user can't commit directly Make it Bare  Click on OK it will initialise your repository  Git Clone for local repository, Right click > Git Clone Set GIT_Server full path & give local repository name say "GIT_Client" Now add your work/file inside this local/client repository Now it's time to commit your work and move it to server Right click on GIT_Client repository As first time it will prompt you for set user name, email  Set required Information as per blow Click OK, it will prompt the commit window On success commit it will prompt for push! Push your chang...

GIT Commit Push Pull

Image
Using Tortoise GIT  For Taking latest code from server GIT Sync  (It will open GIT sync UI) Stash Save  (it will save your changes to some temp folder) Pull  (It will get latest code into your repo) Stash Pop  (It will bring your changes back to your repo from the temp folder) While doing Stash Pop there may be conflict( ) on some files which is committed by other users, that you need to resolve Now you can start working on latest code  For Commit something GIT Sync  (It will open GIT sync UI) Stash Save  (it will save your changes to some temp folder) Pull  (It will get latest code into your repo) Stash Pop  (It will bring your changes back to your repo from the temp folder) While doing Stash Pop there may be conflict( ) on some files which is committed by other users, that you need to resolve Commit  (It will Open the git commit UI, Select only those files that you want to commit ...