Skip to content

Instantly share code, notes, and snippets.

View ruo91's full-sized avatar

Yongbok Kim ruo91

View GitHub Profile
@ruo91
ruo91 / sysdeputil.o: In function `vsf_sysdep_has_capabilities':
Created May 17, 2014 06:01
ubuntu - vsftpd sysdeputil.o: In function `vsf_sysdep_has_capabilities':
- Problem
root@ruo91:~# cd /opt
root@ruo91:~# wget https://security.appspot.com/downloads/vsftpd-3.0.2.tar.gz
root@ruo91:~# tar xzvf vsftpd-3.0.2.tar.gz && cd vsftpd-3.0.2
root@ruo91:~# make
sysdeputil.o: In function `vsf_sysdep_has_capabilities':
sysdeputil.c:(.text+0x1da): undefined reference to `cap_get_proc'
sysdeputil.c:(.text+0x1e5): undefined reference to `cap_free'
sysdeputil.o: In function `vsf_sysdep_adopt_capabilities':
sysdeputil.c:(.text+0x219): undefined reference to `cap_init'
@ruo91
ruo91 / ubuntu bind9 custom logging
Last active August 29, 2015 14:01
Ubuntu - Bind9 Custom logging
root@ruo91:~# grep query.log /etc/bind/named.conf.options
channel query_logging {
file "/var/log/named/query.log" versions 3 size 10m;
query_logging;
root@ruo91:~# mkdir /var/log/named && chown -R bind:bind /var/log/named
root@ruo91:~# nano /etc/apparmor.d/usr.sbin.named
# vim:syntax=apparmor
# Last Modified: Fri Jun 1 16:43:22 2007
#include <tunables/global>
@ruo91
ruo91 / naver-arcus-deploy-issue
Created May 19, 2014 06:38
Naver - Arcus deploy issue - !!! Parallel execution exception under host
root@ruo91:~# export ARCUS="/opt/arcus"
root@ruo91:~# $ARCUS/scripts/arcus.sh deploy $ARCUS/scripts/conf/ruo91.json
Server Roles
{'zookeeper': ['172.30.1.8', '172.30.1.9'], 'memcached': [u'172.30.1.8', u'172.30.1.8', u'172.30.1.9', u'172.30.1.9']}
[172.30.1.8] Executing task 'deploy'
[172.30.1.9] Executing task 'deploy'
!!! Parallel execution exception under host '172.30.1.9':
!!! Parallel execution exception under host '172.30.1.8':
Process 172.30.1.9:
@ruo91
ruo91 / Apache_Nutch-2.x_cannot_find_symbol.patch
Created June 3, 2014 05:20
Apache Nutch - src/java/org/apache/nutch/indexer/elastic/ElasticWriter.java:104: error: cannot find symbol
# Apache Nutch 2.x - Elasticsearch issue
--- src/java/org/apache/nutch/indexer/elastic/ElasticWriter.java.orig 2014-06-03 14:14:25.290594999 +0900
+++ src/java/org/apache/nutch/indexer/elastic/ElasticWriter.java 2014-06-03 14:14:32.000000000 +0900
@@ -101,7 +101,7 @@
BulkResponse actionGet = execute.actionGet();
if (actionGet.hasFailures()) {
for (BulkItemResponse item : actionGet) {
- if (item.failed()) {
+ if (item.isFailed()) {
throw new RuntimeException("First failure in bulk: "
@ruo91
ruo91 / npm_ERR!_error_installing_express
Created June 4, 2014 10:53
npm ERR! error installing express
npm ERR! error installing [email protected]
npm ERR! error rolling back [email protected] Error: UNKNOWN, unknown error '/usr/local/lib/node_modules/express'
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: [email protected]
npm ERR! Required: {"node":">= 0.8.0"}
npm ERR! Actual: {"npm":"1.1.4","node":"0.6.12"}
npm ERR!
npm ERR! System Linux 3.8.0-39-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "express"
@ruo91
ruo91 / apache-nutch-2.2.1-issue-1
Last active August 29, 2015 14:02
Apache Nutch 2.2.1 - ERROR crawl.InjectorJob: InjectorJob: org.apache.gora.util.GoraException: java.lang.RuntimeException: java.lang.NumberFormatException: For input string
root@hadoop:/opt/apache-nutch-2.2.1/runtime/deploy/bin# ./nutch inject urls
14/06/07 16:19:24 INFO crawl.InjectorJob: InjectorJob: starting at 2014-06-07 16:19:23
14/06/07 16:19:24 INFO crawl.InjectorJob: InjectorJob: Injecting urlDir: urls
14/06/07 16:19:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/06/07 16:19:25 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
14/06/07 16:19:25 INFO zookeeper.ZooKeeper: Client environment:host.name=hadoop
14/06/07 16:19:25 INFO zookeeper.ZooKeeper: Client environment:java.version=1.8.0_05
14/06/07 16:19:25 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation
14/06/07 16:19:25 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/local/jdk/jre
14/06/07 16:19:25 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/opt/hadoop-2.4.0/etc/hadoop:/opt/hadoop-2.4.0/share/hadoop/common/lib/jetty-ut
@ruo91
ruo91 / apache-kafka-producer_connection.txt
Created August 8, 2014 13:41
Apache Kafka - ERROR Producer connection to hostname:9092 unsuccessful (kafka.producer.SyncProducer)
root@kafka-producer:~# kafka-console-producer.sh \
> --sync \
> --topic ruo91 \
> --broker-list 172.17.1.169:9092,172.17.1.170:9092,172.17.1.171:9092
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
hellp
[2014-08-08 09:52:54,167] ERROR Producer connection to kafka-broker-3:9092 unsuccessful (kafka.producer.SyncProducer)
java.nio.channels.UnresolvedAddressException
@ruo91
ruo91 / openresty_stable_build.sh
Last active August 29, 2015 14:06
The build automation scripts for OpenResty
#!/bin/bash
echo
echo -ne "\033[33m ################################################\033[0m \n"
echo -ne "\033[33m # The build automation scripts for OpenResty #\033[0m \n"
echo -ne "\033[33m # Maintainer: Yongbok Kim ([email protected]) #\033[0m \n"
echo -ne "\033[33m ################################################\033[0m \n"
echo
# Step 1. Please enter configure variable of OpenResty
function configure_variable_of_openresty {
@ruo91
ruo91 / docker_static_ip
Last active August 29, 2015 14:07
Docker - static ip
Docker v0.9 이상에서 LXC를 강제로 사용하는 방법이 아닌 libcontainer 드라이버에서 제가 쓰고있는 static ip 할당 방법입니다.
(버전업이 됨에 따라 기능이 추가 되면 이짓은 안해도 되긴 합니다.)
무튼.. Dockerfile 만들어 빌드하거나, Repository에서 받던간에 일단 Container 실행시 -d(Detached mode) 옵션을 통해 Container를 여러개 실행 합니다.
# docker run -d --name="redis-1" -h "redis-1" ruo91/redis
# docker run -d --name="redis-2" -h "redis-2" ruo91/redis
# docker run -d --name="redis-3" -h "redis-3" ruo91/redis
# docker run -d --name="redis-4" -h "redis-4" ruo91/redis
# docker run -d --name="redis-5" -h "redis-5" ruo91/redis
# docker run -d --name="twemproxy" -h "twemproxy" \
@ruo91
ruo91 / cpan-config.pm
Created October 24, 2014 01:35
CPAN - Config.pm
# This is CPAN.pm's systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
# configuration file. The user-config file is being looked for as
# /root/.cpan/CPAN/MyConfig.pm.
$CPAN::Config = {
'applypatch' => q[],
'auto_commit' => q[0],
'build_cache' => q[100],
'build_dir' => q[/root/.cpan/build],