Skip to content

Instantly share code, notes, and snippets.

View bugcy013's full-sized avatar
🪄
Focusing

Dhanasekaran Anbalagan bugcy013

🪄
Focusing
View GitHub Profile
[root@dvtelx2dataware70 ~]# cat /var/log/httpd/ssl_request_log
[root@dvtelx2dataware70 ~]# cat /var/log/httpd/ssl_error_log
[Sun Jan 06 04:02:07 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jan 06 04:02:07 2013] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Jan 07 15:29:07 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Jan 07 15:29:07 2013] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Mon Jan 07 15:29:07 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Jan 07 15:29:07 2013] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Tue Jan 08 14:27:27 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Jan 08 14:27:27 2013] [warn] RSA server certificate CommonName (CN) `loc
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@bugcy013
bugcy013 / gist:4529719
Created January 14, 2013 12:25
Whirr-ec2
http://whirr.apache.org/docs/0.7.0/whirr-in-5-minutes.html
thrift repo : http://people.apache.org/~rawson/repo
git clone https://github.com/apache/whirr.git
git checkout -b branch-0.7 -t origin/branch-0.7
git clone git://github.com/apache/whirr.git && cd whirr && git co branch-0.7
@bugcy013
bugcy013 / gist:4585907
Created January 21, 2013 13:07
EC2 with Apace hadoop notes
ec2-api-tools used in scripts
-----------------------------
launch-hadoop-cluser <cluster name> <cluser slave node (No.of slave nodes)>
launch-hadoop-cluster dhanaHadoop 500
dhanaHadoop --> Masternode
500 --> No.of Slave nodes (Data nodes)
@bugcy013
bugcy013 / gist:4656876
Created January 28, 2013 16:17
oprofile
sudo opcontrol --start-daemon
sudo opcontrol --shutdown
sudo opcontrol --status
sudo opcontrol --vmlinux=/usr/lib/debug/lib/modules/2.6.18-164.el5debug/vmlinux
sudo opcontrol --start --callgraph=5
@bugcy013
bugcy013 / oProfile
Last active December 11, 2015 20:58
oProfile
oProfile
========
oPrifile required to vmlinux it's not avaliable in ubuntu 12.04
you need to install some kerenel related packages
If there is no -dbg package:
Create an /etc/apt/sources.list.d/ddebs.list by running the following line at a terminal:
# Cluster name goes here
whirr.cluster-name=testcluster
# Change the number of machines in the cluster here
# Using 3 DN and TT and 1JT and NN# Ganglia is configured
whirr.instance-templates=1 hadoop-jobtracker+hadoop-namenode+ganglia-monitor+ganglia-metad,3 hadoop-datanode+hadoop-tasktracker+ganglia-monitor
# Install JAVA
whirr.java.install-function=install_openjdk
whirr.java.install-function=install_oab_java
sudo -u hdfs hadoop fs -mkdir /tmp
sudo -u hdfs hadoop fs -chmod -R 1777 /tmp
sudo -u hdfs hadoop fs -mkdir /var
sudo -u hdfs hadoop fs -mkdir /var/lib
sudo -u hdfs hadoop fs -mkdir /var/lib/hadoop-hdfs
sudo -u hdfs hadoop fs -mkdir /var/lib/hadoop-hdfs/cache
sudo -u hdfs hadoop fs -mkdir /var/lib/hadoop-hdfs/cache/mapred
sudo -u hdfs hadoop fs -mkdir /var/lib/hadoop-hdfs/cache/mapred/mapred
sudo -u hdfs hadoop fs -mkdir /var/lib/hadoop-hdfs/cache/mapred/mapred/staging
On Ubuntu:
1.sudo apt-get install lzop liblzo2-dev
2.download and build: https://github.com/kevinweil/hadoop-lzo
3.copy the resulted jar to: <yourhadoop>/lib/, typically: /usr/lib/hadoop/lib/
4.download: http://code.google.com/a/apache-extras.org/p/hadoop-gpl-compression/
5.cp ./hadoop-gpl-compression-0.1.0/lib/native/Linux-<your_acrh_type>/*.* /usr/lib/hadoop/lib/native/Linux-<your_acrh_type>/
6.Add the following properties to core-site.xml:
<property>
<name>io.compression.codecs</name>
<value>org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,com.hadoop.compression.lzo.LzoCodec,com.hadoop.compression.lzo.LzopCodec,org.apache.hadoop.io.compress.BZip2Codec</value>
echo "sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true" | debconf-set-selections
DEBIAN_FRONTEND=noninteractive aptitude install -y -f sun-java6-jre sun-java6-bin sun-java6-jdk