Linux Docker.

참고문서:
https://docs.docker.com/engine/installation/ubuntulinux/
https://docs.docker.com/engine/userguide/
https://docs.docker.com/engine/userguide/basics/

 

I. 설치

1. 설치(ubuntu 14.04 에서).

아래 커맨드로, docker repository를 위한 pgp key를 등록한다.

# apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.fq7Qgn6cd8 --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server pgp.mit.edu
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

docker repository를 등록한다. /etc/apt/sources.list.d/docker.list 화일을(없으면 만들고) 아래와 같이 편집한다. os version이 ubuntu14.04이므로 trusty repository를 등록.

#vi /etc/apt/sources.list.d/docker.list
# Ubuntu Trusty
deb https://apt.dockerproject.org/repo ubuntu-trusty main

ubuntu 14.04 이전 버전에서는 설치 시 커널을 업그레이드 해 주어야 하지만, 여기서는 14.04 이기 때문에, 커널 업그레이드는 필요 하지 않다.

# apt-get install docker-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  aufs-tools cgroup-lite git git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-arch git-bzr git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  aufs-tools cgroup-lite docker-engine git git-man liberror-perl
0 upgraded, 6 newly installed, 0 to remove and 3 not upgraded.
Need to get 9,067 kB of archives.
After this operation, 50.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Continue reading

dmidecode 로 알 수 있는 것 들.

dmidecode 는 컴퓨터의 DMI(또는 SMBIOs) 테이블의 정보를 사람이 볼 수 있도록 보여주는 tool 이다.

옵션 없이 사용하면 DMI의 모든 테이블이 표시된다. 결과는 아래 양식으로 표시된다.

Record Header: Handle {record id}, DMI type {dmi type id}, {record size} bytes
Record Value: {multi line record value}
Continue reading

puppet

puppet – 루비로 만든 서버 설정 자동화 툴

MySQL Replication (master – slave, master-master 구성)

구성환경
OS: CentOS6.6
mysql : rpm package 설치
server1: fox1 , 192.168.0.94
server2: fox2 , 192.168.0.95
mysql Replication : master-slave 방식 구성. server1 이 master, server2를 slave로 설정.(slave 는 여러 대를 설정 할 수 있지만, 여기서는 1대만 설정한다.)
참고 문서: https://dev.mysql.com/doc/refman/5.0/en/replication-howto.html

I. Mysql Master-Slave Replication

1. MySQL 설치(server1, server2)
RPM 패키지로 설치하기로 함. 설치 후에는 mysql_secure_installation 커맨드로, root 비밀번호를 설정하고, 불필요한 database, 계정 등을 제거한다.

Continue reading

centos 6.5 minimal version에서 x11 forwarding 오류.

centos 6.5 minimal version 에서 아래와 같이 X11 포워딩이 안되는 문제가 발생.

WARNING! The remote SSH server rejected X11 forwarding request.

sshd_config 화일에서, x11 forwarding을 허용하도록 설정이 되어 있다.

# cat /etc/ssh/sshd_config | grep -i x11
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#       X11Forwarding no

확인 결과 xorg-x11-xauth, xorg-x11-fonts-*, xorg-x11-utils 패키지가 필수라고 한다. 이들 필수 패키지를 설치한다.

# yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils

이후, desktop 실행하면 잘 된다.


CentOS 7 minimal 에서 위의 패키지 설치후 아래 오류 발생할 경우

X11 forwarding request failed on channel 0

xauth 패키지를 설치하면 됨.

# yum install xauth

linux powerpath 설치 – CentOS6

사용환경
CentOS Linux release 6.5 64bit, Minimal version
EMC powerpath

1. naviagentcli 설치

naviagentcli rpm 패키지가 있는 디렉토리로 이동하여, 패키지를 설치한다.

# yum install ./naviagentcli-6.26.32.0.72-1.noarch.rpm
Loaded plugins: fastestmirror
S...
Installed:
  naviagentcli.noarch 0:6.26.32.0.72-1

Complete!

navisphere agent를 실행한다.

# /etc/init.d/naviagent start
Starting Navisphere agent:                                 [  OK  ]

Continue reading

bash history에 시간 넣기

보통 history 커맨드를 내리면, 아래처럼 보인다.

  999  ls
 1000  ls -l
 1001  history
 1002  clear
 1003  history

Continue reading

보호된 글: sec. check 임시

이 콘텐츠는 비밀번호로 보호되어 있습니다. 이 콘텐츠를 보려면 아래에 비밀번호를 입력해주세요:

AIX paging space(swap) 관련 명령어 정리

1.현재 paging device 확인

# lsps -a
Page Space      Physical Volume   Volume Group    Size %Used Active Auto  Type Chksum
hd6             hdisk0            rootvg        2048MB     0   yes    no    lv     0

Continue reading

리눅스 multipath 설정.

참고문서: https://access.redhat.com/documentation/ko-KR/Red_Hat_Enterprise_Linux/6/html-single/DM_Multipath/

구성: CentOS7, 1HBA, EMC cx4-120 스토리지, SAN 스토리지

1. multipath 패키지 설치

# yum install device-mapper-multipath

Continue reading