프로그램 사용/qemu2019. 2. 1. 19:26

kvm에서 사용하는 확장자인데..

원래는 qemu 에서 파생된 녀석인듯..


QEMU Copy On Write

[링크 : https://en.wikipedia.org/wiki/Qcow]

[링크 : https://access.redhat.com/documentation/ko-kr/red_hat_virtualization/4.0/html/technical_reference/qcow2]

'프로그램 사용 > qemu' 카테고리의 다른 글

colo qemu  (0) 2019.03.25
qemu on windows  (0) 2012.04.24
qemu 사용하기  (0) 2012.04.11
qemu / qemu-launcher  (0) 2012.04.08
qemu  (0) 2012.04.07
Posted by 구차니

가상머신의 용량을 늘리는 건 해봤는데..(vmware나 virtualbox)

kvm의 qcow2는 어떻게 늘려야 하나...


[링크 : https://serverfault.com/questions/324281/how-do-you-increase-a-kvm-guests-disk-space]

[링크 : https://www.systutorials.com/241831/how-to-resize-a-virtual-disk-of-kvm/]

[링크 : https://mike42.me/blog/how-to-resize-a-windows-vm-image-with-virt-resize]



+

2019.02.14


줄이기

[링크 : https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files]


스냅샷 테스트

[링크 : https://www.joinc.co.kr/w/Site/cloud/Qemu/Snapshot]


raw로 변환하여 물리 디스크로 복원하기

[링크 : https://idchowto.com/?p=28218]



+

2019.06.03

늘리는건 되지만 줄이는 건 안됨


# ll -h

-rw-------. 1 root root 1.1G  6월  3 12:23 generic.qcow2


# file *

generic.qcow2:       QEMU QCOW Image (v3), 1073741824 bytes



# qemu-img resize generic.qcow2 +19G

Image resized.


# ll -h

합계 32G

-rw-------. 1 root root 1.1G  6월  3 12:25 generic.qcow2


# file *


generic.qcow2:       QEMU QCOW Image (v3), 21474836480 bytes


# qemu-img resize generic.qcow2 -19G

qemu-img: qcow2 doesn't support shrinking images yet

qemu-img: This image does not support resize 


'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm virsh 도메인 목록 확인하기  (0) 2019.02.03
kvm qemu qcow2 vs raw with windows guest  (0) 2019.02.01
virbr0 - libvirt NIC  (0) 2019.01.29
virt-viewer for windows  (0) 2019.01.28
virt-manager 백업 및 복구  (0) 2019.01.28
Posted by 구차니

끄아아아아앙 어렵다!!!!


역사에 대해서 잘 설명되어 있음

(cgroup이 control group 이었구나, jail 이라던가 chroot 라던가 등등)

[링크 : http://blog.drakejin.me/Docker-araboza-1/]


이미지는 컨테이너 실행에 필요한 파일과 설정값등을 포함하고 있는 것으로 상태값을 가지지 않고 변하지 않습니다(Immutable). 


컨테이너는 이미지를 실행한 상태라고 볼 수 있고 추가되거나 변하는 값은 컨테이너에 저장됩니다. 

[링크 : https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html]

[링크 : https://subicura.com/2017/01/19/docker-guide-for-beginners-2.html]

도커 컨테이너는 이미지가 실행된 형태

[링크 : http://swartist.blogspot.com/2018/02/docker.html]



volume

/var/lib/docker/volumes 에 저장되는 듯?

[링크 : http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter06/04]


docker를 계속 사용하다 보면 container의 데이터 휘발성 때문에 volume을 사용하게 됩니다. 

[링크 : https://darkrasid.github.io/docker/container/volume/2017/05/10/docker-volumes.html]

'프로그램 사용 > docker' 카테고리의 다른 글

docker inspect  (0) 2019.02.28
docker 복원하기  (2) 2019.02.27
docker 설명..  (0) 2019.02.01
docker run = create + start  (0) 2019.02.01
docker howto  (4) 2018.11.23
Posted by 구차니

전에 미흡한 부분을 추가로 찾는중..


 도커 이미지 생성

$ docker build -t django-sample .


앱 컨테이너를 실행

$ docker run -it --rm \

    -p 8000:8000 \

    django-sample \

    ./manage.py runserver 0:8000


데이터베이스 컨테이너 실행

$ docker run -it --rm \

    postgres:9.6.1


앱 컨테이너를 실행한 후 PostgreSQL 컨테이너를 실행했습니다. 그런데 컨테이너는 실행 직후부터 컨테이너 외부의 상황과 격리됩니다. 따라서 PostgreSQL 컨테이너가 실행되었는지 알지 못하죠.


db 컨테이너를 지우면, 데이터베이스 데이터가 사라짐

[링크 : http://raccoonyy.github.io/docker-usages-for-dev-environment-setup/]


docker와 docker-compose의 차이

docker 단일 컨테이너를 관리합니다.


docker-compose 은 여러 컨테이너 애플리케이션을 관리합니다.


docker-compose의 사용 에는 3 단계가 필요합니다.


Dockerfile을 사용 하여 앱 환경 정의

docker-compose.yml 에 앱 서비스 정의

docker-compose up 실행하여 앱을 시작하고 실행합니다. 

[링크 : https://code.i-harness.com/ko-kr/q/24352d8]

'프로그램 사용 > docker' 카테고리의 다른 글

docker 복원하기  (2) 2019.02.27
docker 개념 다시 조사..  (0) 2019.02.01
docker run = create + start  (0) 2019.02.01
docker howto  (4) 2018.11.23
docker static ip  (0) 2018.11.23
Posted by 구차니

postgresql은 메타페키지가 없는건가?

아무튼 클라이언트는 postgresql로 깔면되고 서버는 postgresql-server로 깔면된다.

(서버가 docker로 돌고 있어서 접속하려고 고민하다가 찾음..)


# yum search postgresql

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: mirror.kakao.com

 * extras: mirror.kakao.com

 * updates: mirror.kakao.com

======================================================== N/S matched: postgresql =========================================================

freeradius-postgresql.x86_64 : Postgresql support for freeradius

libreoffice-postgresql.x86_64 : PostgreSQL connector for LibreOffice

pcp-pmda-postgresql.x86_64 : Performance Co-Pilot (PCP) metrics for PostgreSQL

postgresql.i686 : PostgreSQL client programs

postgresql.x86_64 : PostgreSQL client programs

postgresql-contrib.x86_64 : Extension modules distributed with PostgreSQL

postgresql-devel.i686 : PostgreSQL development header files and libraries

postgresql-devel.x86_64 : PostgreSQL development header files and libraries

postgresql-docs.x86_64 : Extra documentation for PostgreSQL

postgresql-jdbc.noarch : JDBC driver for PostgreSQL

postgresql-jdbc-javadoc.noarch : API docs for postgresql-jdbc

postgresql-libs.i686 : The shared libraries required for any PostgreSQL clients

postgresql-libs.x86_64 : The shared libraries required for any PostgreSQL clients

postgresql-odbc.x86_64 : PostgreSQL ODBC driver

postgresql-plperl.x86_64 : The Perl procedural language for PostgreSQL

postgresql-plpython.x86_64 : The Python2 procedural language for PostgreSQL

postgresql-pltcl.x86_64 : The Tcl procedural language for PostgreSQL

postgresql-server.x86_64 : The programs needed to create and run a PostgreSQL server

postgresql-static.i686 : Statically linked PostgreSQL libraries

postgresql-static.x86_64 : Statically linked PostgreSQL libraries

postgresql-test.x86_64 : The test suite distributed with PostgreSQL

postgresql-upgrade.x86_64 : Support for upgrading from the previous major release of PostgreSQL

qt-postgresql.i686 : PostgreSQL driver for Qt's SQL classes

qt-postgresql.x86_64 : PostgreSQL driver for Qt's SQL classes

qt3-PostgreSQL.i686 : PostgreSQL drivers for Qt 3's SQL classes

qt3-PostgreSQL.x86_64 : PostgreSQL drivers for Qt 3's SQL classes

qt5-qtbase-postgresql.i686 : PostgreSQL driver for Qt5's SQL classes

qt5-qtbase-postgresql.x86_64 : PostgreSQL driver for Qt5's SQL classes

PyGreSQL.x86_64 : A Python client library for PostgreSQL

apr-util-pgsql.x86_64 : APR utility library PostgreSQL DBD driver

libdbi-dbd-pgsql.x86_64 : PostgreSQL plugin for libdbi

perl-DBD-Pg.x86_64 : A PostgreSQL interface for perl

php-pgsql.x86_64 : A PostgreSQL database module for PHP

python-psycopg2.x86_64 : A PostgreSQL database adapter for Python

python-psycopg2-debug.x86_64 : A PostgreSQL database adapter for Python 2 (debug build)

python-psycopg2-doc.x86_64 : Documentation for psycopg python PostgreSQL database adapter

redland-pgsql.x86_64 : PostgreSQL storage support for Redland

rhdb-utils.x86_64 : Miscellaneous utilities for PostgreSQL - Red Hat Edition

tcl-pgtcl.x86_64 : A Tcl client library for PostgreSQL


  Name and summary matches only, use "search all" for everything. 



[링크 : https://unix.stackexchange.com/questions/249494/install-postgresql-client-psql-only-on-centos]



+ 2020.01.16


[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=31850584]

[링크 : https://www.postgresql.org/download/linux/redhat/] 패키지

[링크 : https://www.manualfactory.net/10153]  방화벽

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

psql로 접속해서 보는중


mysql의 show databases;

\l

[링크 : http://www.postgresqltutorial.com/postgresql-show-databases/]


mysql의 show tables;

\dt


얘랑 같다는데 실제로 해보니 \dt는 자신의 테이블만 보여주도록 WHERE 가 추가된 느낌?

SELECT * FROM pg_catalog.pg_tables; 


굳이 좀더 쓰자면 아래에 가까운?

SELECT * FROM pg_catalog.pg_tables WHERE tableowner='username;' 


[링크 : https://stackoverflow.com/questions/769683/show-tables-in-postgresql]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

설치는 yum install postgresql

psql 이라는 명령어로 실행


[링크 : https://zetawiki.com/wiki/CentOS_PostgreSQL_클라이언트_설치]

[링크 : https://zetawiki.com/wiki/리눅스_PostgreSQL_클라이언트_psql]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

쓸일이.. 생겨부렀네? ㅠㅠ


[링크 : https://www.pgadmin.org/]


온갖 OS를 다 지원은 하는데.. QT라니!!!

pgAdmin 4 is a complete rewrite of pgAdmin, built using Python and Javascript/jQuery. A desktop runtime written in C++ with Qt allows it to run standalone for individual users, or the web application code may be deployed directly on a webserver for use by one or more users through their web browser. The software has the look and feel of a desktop application whatever the runtime environment is, and vastly improves on pgAdmin III with updated user interface elements, multi-user/web deployment options, dashboards and a more modern design. 

[링크 : https://www.pgadmin.org/download/]


+

2019.06.04

python / django 기반

 sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

sudo apt install wget ca-certificates

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add

sudo apt update

sudo apt install pgadmin4


[링크  : https://o7planning.org/en/11353/installing-pgadmin-on-ubuntu]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
Posted by 구차니

docker run 이라고 기본 예제(?)로 도움말이 나와서

그걸로 했었는데 그렇게 하면 자꾸 증식하는 이유를 이제야 알았네..


 docker run 명령이 "create" 와 "start" 명령을 한번에 실행시키는 명령


[링크 : https://www.popit.kr/개발자가-처음-docker-접할때-오는-멘붕-몇가지/]

'프로그램 사용 > docker' 카테고리의 다른 글

docker 개념 다시 조사..  (0) 2019.02.01
docker 설명..  (0) 2019.02.01
docker howto  (4) 2018.11.23
docker static ip  (0) 2018.11.23
freebsd jail / docker  (0) 2015.07.27
Posted by 구차니
파일방2019. 2. 1. 08:51

심심해서(?) linux route 프로젝트 쪽에 REST API로 확장된게 있나 찾다가 나온거

아무튼 요거면.. 리눅스 라우터 하나 만들고 원격으로 방화벽 설정이나 귀찮은(!)

포트 포워딩 설정을 웹에서 간편하게(?) 할 수 있겠다 싶은데..

[링크 : https://github.com/Oxalide/iptables-api]

[링크 : https://github.com/securitykiss-com/rfw]


iptables로 단순하게 방화벽만 하는줄 알았는데 port forwarding도 가능한 거였구나..

[링크 : https://printf.kr/archives/161]

'파일방' 카테고리의 다른 글

extplorer  (0) 2019.02.28
pydio 대체할 녀석들..  (0) 2019.02.25
git sourcetree  (0) 2019.01.30
vworld  (0) 2019.01.13
cairo  (0) 2018.12.20
Posted by 구차니