Skip to Content

Category Archives: Uncategorized

Add certs to tomcat truststore file [cacerts]

Written on September 27, 2019 at 12:20 AM, by

View the certs: keytool -v -list -keystore /apps/software/jdk1.8.0_92/jre/lib/security/cacerts Add new cert: keytool -importcert -alias TESTNAME -keystore /apps/software/jdk1.8.0_92/jre/lib/security/cacerts -file /tmp/test-public-cert.crt Confirm the addition: keytool -list -keystore /apps/software/jdk1.8.0_92/jre/lib/security/cacerts -alias TESTNAME Note: default password for cacerts file in tomcat is “changeit”

Install and configure SFTP in windows server 2012 R2

Written on August 27, 2019 at 7:41 AM, by

SFTP uses SSH protocol, so first we have to install windows version of openssh the server. Luckily we get the precompiled version of it, so we just have to unzip the contents to a folder. Please note that this installation should be used only in a non-prod environment. Download link : (I find that […]

Useful screen commands in Linux

Written on June 25, 2019 at 4:32 AM, by

Common screen commands that we can use are: Starting Named Session: screen -S session_name Detach from screen session without killing that session: Ctrl+a d Reattaching a screen session: screen -r (works if only one session is present) List all existing screen sessions: screen -ls If there are more than one screen session, we should mention […]

Installing multiple npm versions in linux

Written on May 6, 2019 at 6:35 AM, by

To install multiple npm versions and switch between them, you should use Node Version Manager (nvm) nvm can be installed by the below commands for a particular user where the commands are run: curl -o- | bash After successful completion, if you want to install a specific Node Js version use the below command: […]

Adding/Editing SVN external urls to a directory from Shell

Written on August 18, 2017 at 6:50 AM, by

Sometimes it is useful to create a working copy that is made out of a number of different checkouts. For example, you may want different files or subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. If you want every user to have the same layout, you can define […]

Watch realtime HTTP requests per second

Written on February 27, 2017 at 5:03 AM, by

watch -n 1 ‘a=”$(date +%d/%b/%Y:%H:%M:$(($(date +%S)-1)))”;grep -c “$a” access.log’ reference website :

Give network access to a folder in windows

Written on March 8, 2016 at 4:47 AM, by

To give access for network windows service to a folder use the below command : icacls C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys  /grant “NETWORK SERVICE”:(R)    

Extract cert and key file from java keystore file [.jks]

Written on March 8, 2016 at 4:34 AM, by

In jboss configuration file we are specify ssl certificate and key in the .jks format. In-order to extract cert and key file from the jks file use the below commands: To extract the .crt: keytool -export -alias mydomain -file mydomain.der -keystore mycert.jks .der has to be coverted to .pem : openssl x509 -inform der -in mydomain.der […]

Helpful commands for postfix mail server

Written on November 18, 2015 at 8:38 AM, by

The basic troubleshooting starts with the log : /var/log/maillog Search for errors there. Some basic commands which can be used to check some parameters can be: “mailq” or “postqueue -p” –> list all the emails in the mail queue. postcat -q <mail queue id of that mail>  –> read the contents of an email in queue. […]

Run a logrotate conf manually

Written on November 17, 2015 at 6:32 AM, by

Run a logrotate conf manually without waiting for the default time to lapse by using command:   /usr/sbin/logrotate -f  <path_to_Newlogrotate_conf_file>