Skip to content

Instantly share code, notes, and snippets.

View ruo91's full-sized avatar

Yongbok Kim ruo91

View GitHub Profile
@ruo91
ruo91 / gist:6087253
Created July 26, 2013 08:34
devstack - localrc
ENABLED_SERVICES=q-meta,q-lbaas,n-obj,n-cpu,n-sch,n-cauth,horizon,mysql,rabbit,sysstat,cinder,c-api,c-vol,c-sch,n-cond,quantum,q-svc,q-agt,q-dhcp,q-l3,n-novnc,n-xvnc,q-lbaas,g-api,g-reg,key,n-api,n-crt
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password
# Compute Service
NOVA_BRANCH=stable/grizzly
# Volume Service
CINDER_BRANCH=stable/grizzly
@ruo91
ruo91 / gist:6255559
Created August 17, 2013 06:25
ubuntu lucid source list
deb http://ftp.daum.net/ubuntu lucid main multiverse restricted universe
deb-src http://ftp.daum.net/ubuntu lucid main multiverse restricted universe
deb http://ftp.daum.net/ubuntu lucid-backports main multiverse restricted universe
deb-src http://ftp.daum.net/ubuntu lucid-backports main multiverse restricted universe
deb http://ftp.daum.net/ubuntu lucid-proposed main multiverse restricted universe
deb-src http://ftp.daum.net/ubuntu lucid-proposed main multiverse restricted universe
deb http://ftp.daum.net/ubuntu lucid-security main multiverse restricted universe
deb-src http://ftp.daum.net/ubuntu lucid-security main multiverse restricted universe
deb http://ftp.daum.net/ubuntu lucid-updates main multiverse restricted universe
deb-src http://ftp.daum.net/ubuntu lucid-updates main multiverse restricted universe
@ruo91
ruo91 / squid.conf
Last active December 22, 2015 15:49
squid.conf (3.3.8 stable)
# 프록시 포트 ( 기본 포트는 3128 )
http_port 3128
# 프록시 호스트명
visible_hostname ruo91
#캐시에 사용될 메모리 지정
# 512 MB = 160 MB, 1024 MB = 320 MB
cache_mem 320 MB
@ruo91
ruo91 / check_disk.sh
Created September 22, 2013 12:28
Check disk
- code
#!/bin/bash
df -h | awk '/%/ {
limit = 70
percent = sprintf("%d",$5)
if ( percent > limit ) {
print "Warning: ",$6," (",$1,") is to ",percent,"% full:"
print $0
}
@ruo91
ruo91 / nginx.example
Last active December 24, 2015 23:08
nginx example conf
- nginx.conf 설정파일
[root@localhost ~]# vim /etc/nginx/nginx.conf
user nobody;
pid logs/nginx.pid;
error_log logs/error.log;
access_log off;
worker_processes 2;
events {
@ruo91
ruo91 / php-fpm.conf
Created October 8, 2013 12:34
php fpm config
# php
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
@ruo91
ruo91 / mongodb-test-import.txt
Created October 13, 2013 14:30
mongodb test import
일단 이건 테스트
logs 데이터베이스에 nginx json 로그를 import
[root@dev mongodb]# mongoimport --host localhost --db logs --collection logs < /usr/local/nginx/logs/mirror-json-access.log
connected to: localhost
Sun Oct 13 23:25:01.874 check 9 4688
Sun Oct 13 23:25:01.891 imported 4688 objects
쿼리 해서 값이 잘 들어갔는지 확인
[root@dev mongodb]# mongo
@ruo91
ruo91 / hdfs-site.xml
Created October 15, 2013 05:08
hdfs-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>dfs.data.dir</name>
<value>/opt/hadoop/dfs/name/data</value>
<final>true</final>
@ruo91
ruo91 / flume.debug
Created October 24, 2013 13:03
Flume 1.4.0 stable : ERROR hdfs.HDFSEventSink: process failed
[root@dev conf]# flume-ng agent --conf $FLUME_HOME/conf -f $FLUME_HOME/conf/flume.conf -Dflume.root.logger=DEBUG,console -n YongbokAgent
Info: Sourcing environment configuration script /home/hadoop/flume/conf/flume-env.sh
Info: Including Hadoop libraries found via (/home/hadoop/2.2.0/bin/hadoop) for HDFS access
Info: Excluding /home/hadoop/2.2.0/share/hadoop/common/lib/slf4j-api-1.7.5.jar from classpath
Info: Excluding /home/hadoop/2.2.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar from classpath
+ exec /usr/local/jdk/bin/java -Xmx20m -Dflume.root.logger=DEBUG,console -cp '/home/hadoop/flume/conf:/home/hadoop/flume/lib/*:/home/hadoop/2.2.0/etc/hadoop:/home/hadoop/2.2.0/share/hadoop/common/lib/activation-1.1.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/asm-3.2.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/avro-1.7.4.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/home/hadoop/2.2.0/share/hadoop/common/l
@ruo91
ruo91 / flume.txt
Created October 24, 2013 13:04
Flume 1.4.0 stable : ERROR hdfs.HDFSEventSink: process failed
[root@dev conf]# flume-ng agent --conf $FLUME_HOME/conf -f $FLUME_HOME/conf/flume.conf -Dflume.root.logger=DEBUG,console -n YongbokAgent
Info: Sourcing environment configuration script /home/hadoop/flume/conf/flume-env.sh
Info: Including Hadoop libraries found via (/home/hadoop/2.2.0/bin/hadoop) for HDFS access
Info: Excluding /home/hadoop/2.2.0/share/hadoop/common/lib/slf4j-api-1.7.5.jar from classpath
Info: Excluding /home/hadoop/2.2.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar from classpath
+ exec /usr/local/jdk/bin/java -Xmx20m -Dflume.root.logger=DEBUG,console -cp '/home/hadoop/flume/conf:/home/hadoop/flume/lib/*:/home/hadoop/2.2.0/etc/hadoop:/home/hadoop/2.2.0/share/hadoop/common/lib/activation-1.1.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/asm-3.2.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/avro-1.7.4.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/home/hadoop/2.2.0/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/home/hadoop/2.2.0/share/hadoop/common/l