Skip to content

Instantly share code, notes, and snippets.

View amolkhanorkar's full-sized avatar

Amol Khanorkar amolkhanorkar

View GitHub Profile
@amolkhanorkar
amolkhanorkar / Convert openssl .key file to .pem
Created April 10, 2014 12:12
Convert openssl .key file to .pem
For converting .key file to .pem file,
Your keys may already be in PEM format, but just named with .crt or .key.
If they begin with -----BEGIN and you can read them in a text editor (they use base64, which is readable in ASCII, not binary format), they are in PEM format.
If the file is in binary, for the server.crt, you would use
openssl x509 -inform DER -outform PEM -in server.crt -out server.crt.pem
For server.key, use openssl rsa in place of openssl x509.
@amolkhanorkar
amolkhanorkar / PG::Error: ERROR: new encoding (UTF8) is incompatible
Last active November 29, 2023 17:57
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
Nagios check nrpe error could not complete ssl handshake
When you are tying to connect remote host from nagios server using check_nrpe you may get following error.
$ /usr/lib/nagios/plugins/check_nrpe -H remotehostIP
Output:
check_nrpe error could not complete ssl handshake
@amolkhanorkar
amolkhanorkar / Apache tomcat setup
Created March 12, 2014 06:15
Apache tomcat setup
Apache tomcat setup
Pre-requisites
JDK (java) should be install.
1. To Install Java
Download tarball package.
Goto the downloaded directory. Extract tarball jdk-6u31-linux-x64.tar.gz
@amolkhanorkar
amolkhanorkar / Capistrano_Installation_Manual.md
Last active March 20, 2022 15:43
Deployment Of ROR application with Capistrano By Using Remote Database Server

Deployment Of ROR application with Capistrano By Using Remote Database Server**

Steps To Deploy Application:

Prerequisites : 1. Ruby Installation Firstly install rvm using following command

Install dependencies

$ sudo apt-get install curl
@amolkhanorkar
amolkhanorkar / Deploy app on glassfish by creating virtual server
Created March 12, 2014 06:34
Deploy app on glassfish by creating virtual server
Deploy App(war) in Glassfish & run through virtual server
open glassfish admin console
http://<server-ip>:<admin-port>
eg http://192.168.10.1:4848
Set environment for domain
Goto Enterprise server/Server admin -> System properties tab -> click Add propertie
Enter: Name=environment, value=testing/development
Deploy war file
- Goto -> Application -> click on deploy
@amolkhanorkar
amolkhanorkar / Installing Oracle Instaclient with OCI8 drivers for PHP application.
Created April 28, 2014 14:22
Installing Oracle Instaclient with OCI8 drivers for PHP application.
Introduction
Contents
Introduction
Install RPMs
Integrate Oracle Libraries
ORACLE_HOME
SDK fix
Oracle Instant Client is a free Oracle database client. The current version is 11.2.0.1.0, and several versions back to 10.1.0.5 are available.
Start and stop the server on Windows
Start and stop the server on Linux
Start and stop Apache
Start and stop the server on Windows
Start the server from the Start menu
Choose Start > All Programs > Adobe > Flash Media Server 4.5 > Start Adobe Flash Media Server 4.5.
Choose Start > All Programs > Adobe > Flash Media Server 4.5 > Start Flash Media Administration Server 4.5.
Stop the server from the Start menu
I got an error while setting up an site, which is having some changes with their file names (Diff. in Upper/Lower case).
[Thu Oct 31 00:29:59 2013] [error] [client x.x.x.x] script '/var/www/www.abcd.com/wwwroot/mlbteamstandings_data.php' not found or unable to stat, referer: http://demo-abcd.xyz.com/index.php?option=com_content&view=article&id=86&Itemid=839
So, issue has been resolved by adding apache2 CheckSpelling and CheckCaseOnly module into the virtualhost file.
<VirtualHost *:80>
ServerName demo-abcd.xyz.com
DocumentRoot /var/www/www.abcd.com/wwwroot
<Directory /var/www/www.abcd.com/wwwroot>
@amolkhanorkar
amolkhanorkar / Quick Installation of OpenVZ CentOS 6
Last active December 26, 2015 07:59
This quick installation quide assumes you have CentOS 6 64-bit installed with SELinux and Firewall disabled, and that the containers will be on the same subnet as the host node.
Quick OpenVZ setup on CentOS 6
This quick installation quide assumes you have CentOS 6 64-bit installed with SELinux and Firewall disabled, and that the containers will be on the same subnet as the host node.
The node's IP is 192.168.1.99/24 and the gateway is 192.168.1.1. The containers will have 192.168.1.101, 192.168.1.102, etc...
Add the OpenVZ yum repo
# wget -O /etc/yum.repos.d/openvz.repo http://download.openvz.org/openvz.repo
# rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ