Your wish is my command

whitekid's blog

Archive for January, 2012

Ubuntu 11.10에 ganglia가 설치 실패한다.

without comments

munin 대신 ganglia를 검토해보려고 ganglia를 설치하려는데 아래 메시지를 내뿜으며 설치가 제대로 안된다.
Adding group: ganglia.
Adding system user: ganglia.
useradd: group ganglia exists - if you want to add this user to that group, use -g.
dpkg: error processing gmetad (--configure):
subprocess installed post-installation script returned error exit status 9
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
gmetad
E: Sub-process /usr/bin/dpkg returned an error code (1)

https://bugs.launchpad.net/ubuntu/+source/ganglia/+bug/854866/comments/20 에 있는데로 하고 다시 설치하면 된다.
sudo useradd ganglia -g ganglia

음.. 우분투 실망일세~~

Written by whitekid

January 30th, 2012 at 11:55 am

Posted in Uncategorized

CentOS bootstraping in Ubuntu

without comments

$ apt-get install yum rpm python-m2crypto
$ mkdir -p /tmp/centos/var/lib/rpm
$ rpm –root /tmp/centos –initdb
$HOME/.rpmdb 가 만들어지는데 그거는 마지막 삭제한다.

rpmfind.net에서 원하는 버전의 rpm 찾아서 다운로드
$ wget ftp://195.220.108.108/linux/centos/5.7/os/x86_64/CentOS/centos-release-5-7.el5.centos.x86_64.rpm
$ rpm -ivh –force-debian –nodeps –root /tmp/centos centos-release-5-7.el5.centos.x86_64.rpm
$ ln -s /tmp/centos/etc/pki /etc/pki
$ yum –installroot /tmp/centos install yum
$ mount -t proc foo /tmp/centos/proc
$ mount -t sysfs foo /tmp/centos/sys

$ chroot /tmp/centos /bin/bash –login
$ rm -rf /home/choe/.rpmdb # 위에서 initdb한것 지우기
$ rpm –initdb
$ echo nameserver 168.126.63.1 > /etc/resolv.conf
$ yum install yum
$ yum install vim-minimal less

참고: http://www.lucas-nussbaum.net/blog/?p=385

Written by whitekid

January 20th, 2012 at 2:26 pm

Posted in Uncategorized

Tagged with ,

클라우드 컴퓨팅의 장점

without comments

Naver Platform Day 2011을 훑어보다 정리합니다.

구체적으로 사용자 측면에서 클라우드 서비스의 장점

  • 자본 비용과 운용, 유지의 부담 없이 저렴하게 고기능의 정보 처리 기능을 이용할 수 있다.
  • 시스템 구축, 개발 기간이 단축되고 수요 변동에 유연하고 즉각적으로 대응할 수 있다.
  • 네트워크를 통해 협업, 데이터 수집, 제어가 용이하다.
  • 장비 분실 등에 따른 정보 유출 위험을 감소시킨다.
  • 클라우드 기반의 지속성에 의해 사업의 연속성이 향상된다.
  • 사용한 비용만 청구받고 지불하면 된다.

사업자 측면에서의 장점

  • 가상화, 분산 처리 기술을 활용함으로써 다양한 정보 처리 수요에 대해 자원을 효율적으로 제공할 수 있다.
  • 애플리케이션 표준화를 통해 소프트웨어 자원을 효율적으로 활용할 수 있다.
  • 서비스 자동화 및 지속성을 통해 운용, 보수, 갱신을 합리화할 수 있다
  • 다른 클라우드 서비스를 사업자 측에 결합해 저렴한 가격으로 다양한 서비스를 제공할 수 있다.
  • 사용자의 수와 상관없이 서비스를 공급할 수 있는 분산, 가상화의 특징이 있다.

결국 합리화, 최적화, 비용 절감!

쓸데없이 자원 관리하는데 노력을 들이지 말고 클라우드에 맞기고, 남는 시간에 당신의 비지니스에 집중하라~

클라우드 호스팅과 클라우드 IaaS의 차이는

  • on-demand self-service로 사용할 수 있느냐?
  • 사용랑 기반으로 과금하느냐?

Written by whitekid

January 10th, 2012 at 3:19 pm

Posted in Uncategorized

Tagged with

쓸데없는 트래픽 유발하기… ㅋㅋ

without comments

ssh 192.168.0.24 cat /dev/zero > /dev/null

Written by whitekid

January 5th, 2012 at 3:24 pm

Posted in Uncategorized

rsyslog가 CPU를 100%먹는 증상

without comments

Ubuntu 11.04 natty 서버가 있는데, 여기서 rsyslog가 CPU를 100% 먹는 증상이 발생한다. syslog에 아래 메시지가 지속적으로 쌓이면서 생기는 현상이다.

Cannot read proc file system: 1 - Operation not permitted.

특정 커널과 rsyslog의 특정 버전의 조합이면 이러한 문제가 발생한다고.. 결론은 커널을 업그레이드 하단거, 아니면 rsyslog를 업그레이드 하던가…

그런데 커널을 업그레이드하면 리부팅해야하고… 돌아가는 서비스는 중단할 수 없고.. 결국은 rsyslog를 downgrade하기로 했다.

조사해보니 natty에 있는 버전은 모두 같은 버전이라 maverick으로 가기로 했다. 그래서 sources.list를 아예 maverick으로 이동..

$ perl -p -i -e "s/natty/maverick/g" /etc/apt/sources.list
$ apt-get update

그리고 어떤 버전이 있는지 확인해보고..

$ apt-cache show rsyslog | grep Version
Version: 4.6.4-2ubuntu4
Version: 4.6.4-2ubuntu4.1
Version: 4.2.0-2ubuntu8

그 버전으로 다운그레이드한다.

$ apt-get install rsyslog=4.2.0-2ubuntu8

그리고 나중에 혹시나 자동으로 업그레이드 될 지 모르니 업그레이드 금지

$ echo 'rsyslog hold' | dpkg --set-selections

스크립트로 한방

#!/bin/bash
release=`lsb_release -c | awk '{print $2}'`
if [ "$release" != 'natty' ]; then
        echo 'rsyslog download only apply to natty!'
        exit
fi

if [ `grep -c 'natty' /etc/apt/sources.list` == 0 ]; then
        echo 'something wrong in sources.list'
        exit
fi

perl -p -i -e 's/natty/maverick/g' /etc/apt/sources.list
apt-get update
apt-get install -y --force-yes rsyslog=4.2.0-2ubuntu8
perl -p -i -e 's/maverick/natty/g' /etc/apt/sources.list
echo 'rsyslog hold' | dpkg --set-selections

Written by whitekid

January 2nd, 2012 at 12:24 pm

Posted in Uncategorized

Tagged with ,