Skip to content

Instantly share code, notes, and snippets.

View ruo91's full-sized avatar

Yongbok Kim ruo91

View GitHub Profile
@ruo91
ruo91 / nagios-4.0.20130912.utf8.patch
Last active August 29, 2015 13:56
opsview-base-4.5.0.397 utf-8 patch (nagios-4.0.20130912)
# By.ruo91 (Yongbok Kim)
--- nagios-4.0.20130912/cgi/avail.c.orig2 2014-02-25 22:28:47.574430847 +0900
+++ nagios-4.0.20130912/cgi/avail.c 2014-02-25 22:28:24.000000000 +0900
@@ -1033,7 +1033,7 @@
printf("Expires: %s\r\n", date_time);
if(output_format == HTML_OUTPUT)
- printf("Content-type: text/html\r\n\r\n");
+ printf("Content-type: text/html;charset=UTF-8\r\n\r\n");
else {
@ruo91
ruo91 / opsview-core-3.20131016.0.14175.utf8.patch
Created February 26, 2014 03:48
opsview-core-3.20131016.0.14175 utf8 patch
--- lib/Opsview/Keyword.pm.orig 2014-02-26 12:34:43.925685716 +0900
+++ lib/Opsview/Keyword.pm 2014-02-26 12:45:36.000000000 +0900
@@ -25,7 +25,7 @@
use strict;
__PACKAGE__->table( "keywords" );
-
+__PACKAGE__->utf8_columns(qw/description/);
__PACKAGE__->columns( Primary => qw/id/ );
__PACKAGE__->columns(
@ruo91
ruo91 / build_os
Last active August 29, 2015 13:56
opsview-core - build_os scripts
#!/usr/bin/perl
$os = "ubuntu12";
print $os, $/;
@ruo91
ruo91 / logstash-1.4.0-shipper.conf
Created April 22, 2014 11:43
logstash shipper - File -> Redis
input {
file {
path => "/storage/logs/www-access.json"
type => nginx
format => json
# message_format => json
# format => msgpack_event
# message_format => json_event
}
}
@ruo91
ruo91 / logstash-1.4.0-indexer.conf
Created April 22, 2014 11:44
logstash indexer - Redis -> ElasticSearch
input {
redis {
host => "127.0.0.1"
port => "6379"
data_type => "list"
key => "logstash"
codec => json
}
}
output {
@ruo91
ruo91 / How_to_install_own_private_git_server_on_Ubuntu_12.04_LTS.txt
Last active August 29, 2015 14:00
How to install own private git server on Ubuntu 12.04 LTS
How to install own private git server on Ubuntu 12.04 LTS
1. 필요 패키지 설치
root@ruo91:~# apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev \
libreadline-dev libncurses5-dev libffi-dev curl git-core openssh-server redis-server \
checkinstall libxml2-dev libxslt1-dev libcurl4-openssl-dev libicu-dev
2. Ruby 설치
기존 패키지 방식으로 설치시 버전이 낮으므로 최신버전으로 함.
make install시 SSH 원격이 끊어질수 있으므로 tmux나 screen으로 세션을 유지하는걸 추천.
@ruo91
ruo91 / Docker SSH.txt
Created April 29, 2014 09:06
Docker - Running an SSH service
root@ruo91:~# nano Dockerfile
#------- Dockerfile start -------#
#
# Docker SSH Daemon
#
# 해당 Images를 선택
# docker pull images-name과 같다고 보면 됌.
# 이미 이미지가 있다면 docker images 명령어로 해당 Image ID를 적으면 된다.
#
# 예제1) 이미지가 없을 경우
@ruo91
ruo91 / centos-bind-logging.txt
Created May 1, 2014 08:49
CentOS 6.5 - BIND logging
[root@ruo91 ~]# nano /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
@ruo91
ruo91 / centos-bind.txt
Created May 1, 2014 12:53
CentOS 6.5 - BIND
- BIND 설치
[root@ruo91 ~]# yum install bind* -y
- named.conf 설정
[root@ruo91 ~]# nano /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
@ruo91
ruo91 / Ubuntu_-_refusing_to_run_with_writable_root_inside_chroot
Last active October 6, 2022 11:20
Ubuntu - refusing to run with writable root inside chroot()
Step 1. Remove the vsftpd
root@ruo91:~# apt-get remove vsftpd
Step 2. Install vsftpd v3.x
root@ruo91:~# wget http://us.archive.ubuntu.com/ubuntu/pool/main/v/vsftpd/vsftpd_3.0.2-14ubuntu1_amd64.deb
root@ruo91:~# dpkg -i vsftpd_3.0.2-14ubuntu1_amd64.deb
Step 3. Add in the vsftpd.conf
root@ruo91:~# echo "seccomp_sandbox=NO" >> /etc/vsftpd.conf